-
Notifications
You must be signed in to change notification settings - Fork 7
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
/nn/WeightedMSECriterion.lua:10: bad argument #1 to 'copy' #8
Comments
@gxyEPFL why did you set pad=0? Does it work with the original configuration? Just trying to localise the issue. |
@viorik yes, if I turn the pad back to |
I see. When using pad=0, I'd say the problem comes from the definition of SpatialConvFistaL1, line 118 in my demo code, 4th and 5th parameters. Now they are given the size of the input |
@viorik hi again, I tried to change the input of the decoder to |
Yes, several things probably need to be changed there. Did you un-pad the targets to have the reduced size? Targets should not have the same size as input. |
@viorik , I am terribly sorry. I may misunderstand at the beginning.
why? Could you explain a little bit, thanks I once thought the input and target in |
Sorry, maybe it was not correct what I said. |
@viorik , good afternoon~~ could you kindly tell me in |
@gxyEPFL self.code is resized in SpatialConvFistaL1, lines 43-47. In that file you first create the object FistaL1 through |
Hi, i am new to torch, I want to do unsupervised learning of images. The input image size is (38*_78) gray scale. the train dataset is a cuda tensor with size(1800_38*78). For the convolution layer, the kernel filter size is (7 7), padding 0, stride by default is 1. Code as following:
`
`
At the end of the code, we upddatGradInput I get the size mismatch problem.
/install/share/lua/5.1/nn/WeightedMSECriterion.lua:10: bad argument #1 to 'copy' (sizes do not match at torch/extra/cutorch/lib/THC/generic/THCTensorCopy.cu:10) stack traceback: [C]: in function 'copy' ...ch/install/share/lua/5.1/nn/WeightedMSECriterion.lua:10: in function 'updateOutput' ...oxi/torch/install/share/lua/5.1/unsupgpu/FistaL1.lua:51: in function 'f' .../deguoxi/torch/install/share/lua/5.1/optim/fista.lua:83: in function 'FistaLS' ...oxi/torch/install/share/lua/5.1/unsupgpu/FistaL1.lua:119: in function 'updateOutput' .../torch/install/share/lua/5.1/unsupgpu/psd.lua:52: in function 'updateOutput' main.lua:182: in main chunk
I check the size equal of inputs_ and targets_, and they are equal. Any clue to solve this problem?
The text was updated successfully, but these errors were encountered: