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

clearState breaks nn.MV #390

Open
Morpheus3000 opened this issue Mar 6, 2018 · 0 comments
Open

clearState breaks nn.MV #390

Morpheus3000 opened this issue Mar 6, 2018 · 0 comments

Comments

@Morpheus3000
Copy link

I am trying to save my network at specific intervals, but it fails on the backward pass of the next iteration, immediately after saving the model with the following error

> ~/torch/install/bin/luajit: ~/torch/install/share/lua/5.1/nn/Container.lua:67: 
> In 1 module of nn.Sequential:
> ~/torch/install/share/lua/5.1/nn/MV.lua:50: attempt to index a nil value
> stack traceback:
> 	~/torch/install/share/lua/5.1/nn/MV.lua:50: in function <~/torch/install/share/lua/5.1/nn/MV.lua:47>
> 	[C]: in function 'xpcall'
> 	~/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
> 	~/torch/install/share/lua/5.1/nn/Sequential.lua:58: in function 'updateGradInput'
> 	~/torch/install/share/lua/5.1/nngraph/gmodule.lua:420: in function 'neteval'
> 	~/torch/install/share/lua/5.1/nngraph/gmodule.lua:454: in function 'updateGradInput'
> 	~/torch/install/share/lua/5.1/nn/Module.lua:31: in function 'backward'
> 	trainLoop.lua:225: in function 'opfunc'
> 	~/torch/install/share/lua/5.1/optim/adadelta.lua:31: in function 'solver'
> 	trainLoop.lua:228: in main chunk
> 	[C]: in function 'dofile'
> 	~/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
> 	[C]: at 0x00405d50
> 
> WARNING: If you see a stack trace below, it doesn't point to the place where this error occurred. Please use only the one above.
> stack traceback:
> 	[C]: in function 'error'
> 	~/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'
> 	~/torch/install/share/lua/5.1/nn/Sequential.lua:58: in function 'updateGradInput'
> 	~/torch/install/share/lua/5.1/nngraph/gmodule.lua:420: in function 'neteval'
> 	~/torch/install/share/lua/5.1/nngraph/gmodule.lua:454: in function 'updateGradInput'
> 	~/torch/install/share/lua/5.1/nn/Module.lua:31: in function 'backward'
> 	trainLoop.lua:225: in function 'opfunc'
> 	~/torch/install/share/lua/5.1/optim/adadelta.lua:31: in function 'solver'
> 	trainLoop.lua:228: in main chunk
> 	[C]: in function 'dofile'
> 	~/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
> 	[C]: at 0x00405d50

After some digging around found that switching off the network:clearState() fixes that.
I looked around for it, but all the issues that states the problem has been closed, so I assuming they are fixed. Yet I face this error.
Any work around for this, till it gets fixed?

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

1 participant