transformers
transformers copied to clipboard
Add MaskedImageModelingOutput
What does this PR do?
- Adds
MaskedImageModelingOutput
andTFMaskedImageModelingOutput
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?
The documentation is not available anymore as the PR was closed or merged.
Pinging @NielsRogge for the final approval
@NielsRogge could you take another look? I think all comments are addressed