You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You pass matrix to BCECriterionLoss which accepts only one-dimensional vector, which throws an error ""weights input should be 1-D Tensor"
Fulle Error:
/home/prashant/torch/install/bin/luajit: ...prashant/torch/install/share/lua/5.1/nn/BCECriterion.lua:12: weights input should be 1-D Tensor
stack traceback:
[C]: in function 'assert'
...prashant/torch/install/share/lua/5.1/nn/BCECriterion.lua:12: in function '__init'
/home/prashant/torch/install/share/lua/5.1/torch/init.lua:91: in function </home/prashant/torch/install/share/lua/5.1/torch/init.lua:87>
[C]: in function 'BCECriterion'
train.lua:339: in function 'opfunc'
/home/prashant/torch/install/share/lua/5.1/optim/adam.lua:37: in function 'adam'
train.lua:591: in main chunk
[C]: in function 'dofile'
...hant/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50
I tried to reshape the vector to one dimensional which throws up an error.
The line 339: criterionDDiscriminator = nn.BCECriterion(weightsDiscriminator)
is expecting 1-D tensor as input to BCECriterion whereas the "weightsDiscriminator" is not one-dimensional
I an running CUDA 9.0 with cuDNN 5. It doesn't look like any compatibility issue with CUDA or any such thing.
Can you shed some light here? It would of great help.
Thanks,
Prashant
The text was updated successfully, but these errors were encountered:
Hi @BertaBescos
Thanks for open sourcing your code.
I came across an issue at Line 340, in train.lua
You pass matrix to BCECriterionLoss which accepts only one-dimensional vector, which throws an error ""weights input should be 1-D Tensor"
Fulle Error:
/home/prashant/torch/install/bin/luajit: ...prashant/torch/install/share/lua/5.1/nn/BCECriterion.lua:12: weights input should be 1-D Tensor
stack traceback:
[C]: in function 'assert'
...prashant/torch/install/share/lua/5.1/nn/BCECriterion.lua:12: in function '__init'
/home/prashant/torch/install/share/lua/5.1/torch/init.lua:91: in function </home/prashant/torch/install/share/lua/5.1/torch/init.lua:87>
[C]: in function 'BCECriterion'
train.lua:339: in function 'opfunc'
/home/prashant/torch/install/share/lua/5.1/optim/adam.lua:37: in function 'adam'
train.lua:591: in main chunk
[C]: in function 'dofile'
...hant/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50
I tried to reshape the vector to one dimensional which throws up an error.
The line 339: criterionDDiscriminator = nn.BCECriterion(weightsDiscriminator)
is expecting 1-D tensor as input to BCECriterion whereas the "weightsDiscriminator" is not one-dimensional
I an running CUDA 9.0 with cuDNN 5. It doesn't look like any compatibility issue with CUDA or any such thing.
Can you shed some light here? It would of great help.
Thanks,
Prashant
The text was updated successfully, but these errors were encountered: