How to use Transformers for Dense Regression
I would like to train a Transformer such as Segformer for a dense regression task in pytorch. Specifically, I have 1 channel image input (dtype = float) and I would like a 1 channel image output (dtype = float). This is an Image-to-Image task however I am not using the usual uint8 RGB images.I suppose I would have to set classes = 1, and the loss to a regression loss. However, I am new to HuggingFace and not sure where to start and if this is possible.Thanks.