Skip to content

Update galleries to use Multi-weight idioms #6030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 17, 2022

Conversation

datumbox
Copy link
Contributor

@datumbox datumbox commented May 16, 2022

Resolves partially #6014

This PR:

  • Updates the preprocessing description for RAFT
  • Fixes the incorrect examples for detection models (passing tensors vs List[tensor])
  • Updates the preprocessing descriptions and the meta-data usage of viz-utils gallery

@datumbox datumbox changed the title [WIP] Update galleries to use Multi-weight idioms Update galleries to use Multi-weight idioms May 17, 2022
@datumbox datumbox marked this pull request as ready for review May 17, 2022 08:59
Copy link
Contributor Author

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments to highlight important changes:


grid = make_grid([dog1_int, dog2_int, dog1_int, dog2_int])
grid = make_grid(dog_list)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we were showing twice the picture of each dog previously.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be in favour of removing this section about make_grid entirely. We shouldn't encourage our users to use it anymore, there are much better alternatives

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me, let's do this on a separate PR to explore what the better recommended alternative is. cc @oke-aditya

@datumbox datumbox requested a review from NicolasHug May 17, 2022 09:06
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @datumbox , LGTM


grid = make_grid([dog1_int, dog2_int, dog1_int, dog2_int])
grid = make_grid(dog_list)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be in favour of removing this section about make_grid entirely. We shouldn't encourage our users to use it anymore, there are much better alternatives

]

inst_class_to_idx = {cls: idx for (idx, cls) in enumerate(inst_classes)}
inst_class_to_idx = {cls: idx for (idx, cls) in enumerate(weights.meta["categories"])}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we print it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot. Actually I don't know why this was here. We never printed it. I think I'll just remove it rather than printing a big mapping table on the docs.

@datumbox datumbox merged commit d9a6950 into pytorch:main May 17, 2022
@datumbox datumbox deleted the docs/update_galleries branch May 17, 2022 11:11
@datumbox datumbox linked an issue May 17, 2022 that may be closed by this pull request
6 tasks
facebook-github-bot pushed a commit that referenced this pull request Jun 1, 2022
Summary:
* Update the preprocessing decription for RAFT.

* Fixing incorrect usage of models.

* Fixing the content of viz utils

* Addressing review comments

Reviewed By: NicolasHug

Differential Revision: D36760941

fbshipit-source-id: 6e3bcf535a13799a34e4ca45ff7bdc64c2901c63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve documentation for Multi-weight support
3 participants