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

ConvLSTM rnn update #2

Merged
merged 1 commit into from
Jan 30, 2016
Merged

ConvLSTM rnn update #2

merged 1 commit into from
Jan 30, 2016

Conversation

nicholas-leonard
Copy link
Contributor

Hi @viorik ,

The rnn package has changed since the last time you ran your code. I updated your ConvLSTM to work with it but when I run the code I get :

th main-mnist.lua
8000 20 64 64
Loaded 8000 images
==> training model
Number of parameters 703651
Number of grads 703651
/home/nicholas14/torch/install/bin/luajit: ...all/share/lua/5.1/extracunn/SpatialConvolutionNoBias.lua:94: bad argument #2 to 'SpatialConvolutionMMNoBias_updateOutput' (3D or 4D (batch mode) tensor is expected)
stack traceback:
        [C]: in function 'SpatialConvolutionMMNoBias_updateOutput'
        ...all/share/lua/5.1/extracunn/SpatialConvolutionNoBias.lua:94: in function 'updateOutput'
        ...holas14/torch/install/share/lua/5.1/nn/ParallelTable.lua:12: in function 'updateOutput'
        ...nicholas14/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'updateOutput'
        ...icholas14/torch/install/share/lua/5.1/nn/ConcatTable.lua:11: in function 'updateOutput'
        ...nicholas14/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'updateOutput'
        ...icholas14/torch/install/share/lua/5.1/nn/ConcatTable.lua:11: in function 'updateOutput'
        ...nicholas14/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'updateOutput'
        ...icholas14/torch/install/share/lua/5.1/nn/ConcatTable.lua:11: in function 'updateOutput'
        ...nicholas14/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'updateOutput'
        /home/nicholas14/torch/install/share/lua/5.1/rnn/LSTM.lua:162: in function 'updateOutput'
        ...nicholas14/torch/install/share/lua/5.1/rnn/Sequencer.lua:47: in function 'updateOutput'
        ...nicholas14/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'updateOutput'
        ...icholas14/torch/install/share/lua/5.1/nn/ConcatTable.lua:11: in function 'updateOutput'
        ...nicholas14/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'updateOutput'
        main-mnist.lua:78: in function 'opfunc'
        ...nicholas14/torch/install/share/lua/5.1/optim/rmsprop.lua:32: in function 'rmsprop'
        main-mnist.lua:106: in function 'main'
        main-mnist.lua:162: in main chunk  
        [C]: in function 'dofile'
        ...as14/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
        [C]: at 0x00406670

I also automated the process of overwriting the BilinearSamplerBHWD. Can you help me get this working again?

@nicholas-leonard
Copy link
Contributor Author

@viorik did you get it working?

@viorik
Copy link
Owner

viorik commented Jan 30, 2016

@nicholas-leonard looking into it now.

@viorik
Copy link
Owner

viorik commented Feb 1, 2016

@nicholas-leonard I think it runs now. The issue is in updateOutput. You made ConvLSTM inherit LSTM and use the updateOutput of LSTM, but the resizing of the zeroTensor in LSTM does not accommodate spatial data. So as a quick solution, I've added back the updateOutput in ConvLSTM with the appropriate resizing. Maybe a more elegant solution would be to change the resizing in LSTM directly and make it more generic?

@nicholas-leonard
Copy link
Contributor Author

@viorik Nice! Sorry about that. I will keep this in mind next time I work on improving LSTM. Thanks for your patience!

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.

None yet

2 participants