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

reshape after view is wrong #76

Open
ShuangLiu1992 opened this issue May 14, 2019 · 2 comments
Open

reshape after view is wrong #76

ShuangLiu1992 opened this issue May 14, 2019 · 2 comments
Labels

Comments

@ShuangLiu1992
Copy link

ShuangLiu1992 commented May 14, 2019

Describe the bug
Linear followed by a view leads to incorrect result, tensorflowjs complains shape mismatch [NULL, output_size]. changing
reshape = keras.layers.Reshape([-1], name=tf_name) to match the input shape seems to fix the problem

To Reproduce
Snippet of your code

x = x.view(self.batch_size, -1)
self.output = nn.Linear(x.shape[1], output_size)
@ShuangLiu1992 ShuangLiu1992 changed the title reshape fater view is wrong reshape after view is wrong May 14, 2019
@ifve
Copy link

ifve commented Aug 28, 2019

I find the same problem,so how can you handle it?

@ShuangLiu1992
Copy link
Author

#77

had a pull request, fixed my problem but didn't get merged

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

No branches or pull requests

2 participants