transformers icon indicating copy to clipboard operation
transformers copied to clipboard

Add MaskedImageModelingOutput

Open alaradirik opened this issue 1 year ago • 3 comments

What does this PR do?

  • Adds MaskedImageModelingOutput and TFMaskedImageModelingOutput classes for masked image modeling / completion / in-painting models.
  • Replaces the inaccurate MaskedLMOutput used for ViT and DeiT MIM heads with the new output class
  • Ensures backward compatibility by adding logits as a property to the new output class

Before submitting

  • [X ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [X ] Did you read the contributor guideline, Pull Request section?
  • [X ] Was this discussed/approved via a Github issue or the forum? Please add a link to it if that's the case.
  • [ X] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • [ ] Did you write any new necessary tests?

alaradirik avatar Mar 16 '23 18:03 alaradirik

The documentation is not available anymore as the PR was closed or merged.

Pinging @NielsRogge for the final approval

alaradirik avatar Mar 20 '23 08:03 alaradirik

@NielsRogge could you take another look? I think all comments are addressed

alaradirik avatar Mar 21 '23 07:03 alaradirik