-
Notifications
You must be signed in to change notification settings - Fork 214
in exportsd.py, call detach() before numpy() #1289
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
Conversation
|
I'm not sure why the tensors are in computation graphs... but the error do occur and it could be solved by adding |
|
@yueyinqiu |
Right. We have no unit tests for the Python export / import code at all. I've just assumed it works... :-) |
|
Actually I think a simple unit test could not find this out. In most cases the problem does not occur and I don't know why the pretrained model are in computation graphs... Also I'm not really sure whether we should modify this, since we do not use |
|
Calling detach seems like a safe, harmless thing to do. |
|
just to make a note here: |
However it seems that |
|
Well I think it's fine. The .net format does not save |
|
Ready to merge? |
I suppose yes |
An error occurred when trying to save the downloaded pretained model:
(where
weightis something liketorchvision.models.AlexNet_Weights.IMAGENET1K_V1)(full codes here)