How to use SegFormer encoder and decoder?
I am looking into SegFormer model, and I am able to fine tune itSegformerForSemanticSegmentation. Now I want to split the model into encoder-decoder and use them separately for my task, how can I use encoder or decoder part of the model?
2024-08-26T20:01:36Z
As shownhere, you can access them using thesegformeranddecode_headattributes respectively.
2024-08-26T20:26:24Z
Thank you for sharing this link, I seeSegformerDecodeHeadrely onnum_encoder_blocksandencoder_hidden_state; most likely this and other parameters would be defined inconfig.Is there a documentation on how to use encoder and decoders or how this model was implemented or code walk-through? Maybe a documentation or sample code from another model usage might also help.