Skip to content
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

Loading pytorch model from torchvision #409

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

vbhavank
Copy link
Collaborator

Using PyTorch model currently requires the user to define the architecture for some commonly used models. Therefore, we make use of torchvision library to import PyTorch models using labels specifying the name of the model (i.e., resnet50, vgg16) and return layer for feature collection (i.e., avgpool, classifier.4).

@lgtm-com
Copy link

lgtm-com bot commented Apr 22, 2020

This pull request introduces 10 alerts when merging 615a1cc into 9697837 - view on LGTM.com

new alerts:

  • 8 for Unused import
  • 1 for Unused local variable
  • 1 for Except block handles 'BaseException'

@lgtm-com
Copy link

lgtm-com bot commented Apr 23, 2020

This pull request introduces 1 alert when merging f189e49 into 9697837 - view on LGTM.com

new alerts:

  • 1 for Unused import

@vbhavank vbhavank requested a review from Purg April 24, 2020 15:51
@Purg
Copy link
Member

Purg commented Apr 27, 2020

Not sure what happened for it to look like it stalled, but the Travis-CI run failed, which should be viewable here. I'd suggest creating a virtualenv that does not have pytorch installed and check that the unit tests pass in that environment.

@vbhavank
Copy link
Collaborator Author

vbhavank commented Apr 28, 2020 via email

@Purg
Copy link
Member

Purg commented Apr 28, 2020

I'm not sure why github isn't showing the link appropriately anymore, but please see the CI results for this PR here: https://travis-ci.org/github/Kitware/SMQTK/builds/680724077

Basically pytest is hitting every file and there are some that still have unprotected imports of torch/torchvision.

Copy link
Member

@Purg Purg left a comment

Choose a reason for hiding this comment

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

It would also be good to add some unit tests for this class. For example, initializing it with different "model_name" and "return_layer" values, testing for expected module results.

@lgtm-com
Copy link

lgtm-com bot commented May 5, 2020

This pull request introduces 3 alerts when merging 6f741d3 into 9697837 - view on LGTM.com

new alerts:

  • 3 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Jul 14, 2020

This pull request introduces 1 alert when merging c629a35 into 9697837 - view on LGTM.com

new alerts:

  • 1 for Unused import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants