Call ViTMAE Forward Embedding

I would like to save the mask produced by the ViTMAEForPreTraining forward pass on one image, and apply that mask on another image. To do so, I believe that need to gain access to the forward_encoder and decoder. However, the pretrained model doesn’t have forward_encoder as an attribute. Any ideas on how to work around this?

Solved this. Was looking at the FB MAE code rather than huggingface’s.