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

Invalid argument 2: 3D or 4D input tensor expected but got: [32 x 784] #39

Open
JeffreyYH opened this issue Nov 6, 2017 · 1 comment

Comments

@JeffreyYH
Copy link

Hi Hugh, thanks for this nice software, when I run the example code of MNIST, it shows the following error,

Connected to pydev debugger (build 171.4694.67)
$ Invalid argument 2: 3D or 4D input tensor expected but got: [32 x 784] at /tmp/luarocks_nn-scm-1-8028/nn/lib/THNN/generic/SpatialConvolutionMM.c:33

How to deal with it

@JeffreyYH JeffreyYH changed the title Connected to pydev debugger (build 171.4694.67) $ Invalid argument 2: 3D or 4D input tensor expected but got: [32 x 784] at /tmp/luarocks_nn-scm-1-8028/nn/lib/THNN/generic/SpatialConvolutionMM.c:33 Invalid argument 2: 3D or 4D input tensor expected but got: [32 x 784] Nov 6, 2017
@hughperkins
Copy link
Owner

the error message means it expects a tensor of dimension 32 * 28 * 28, rather than 32 * 784.

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

No branches or pull requests

2 participants