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

fix unbroadcastable UserWarning in inception.py #231

Merged
merged 1 commit into from
Aug 25, 2017
Merged

fix unbroadcastable UserWarning in inception.py #231

merged 1 commit into from
Aug 25, 2017

Conversation

corenel
Copy link
Contributor

@corenel corenel commented Aug 25, 2017

Now on PyTorch 0.2.0, when I import inception v3 model from torchvision.models, it will warn as following:

UserWarning: src is not broadcastable to dst, but they have the same number of elements.  Falling back to deprecated pointwise behavior.

It seems that it's because the value and m.weight.data is not as the same shape (value is flatten) when using copy_() function, and the unbroadcastable UserWarning occurs. I just reshape the value variable with the shape of m.weight.data, and the warning disappears.

@soumith soumith merged commit 25f81c2 into pytorch:master Aug 25, 2017
@soumith
Copy link
Member

soumith commented Aug 25, 2017

thanks for fixing this!

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