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

Crash on 2nd epoch: invalid arguments: DoubleTensor number FloatTensor - adam.lua #75

Open
TTN- opened this issue Mar 15, 2017 · 1 comment

Comments

@TTN-
Copy link

TTN- commented Mar 15, 2017

user@pc:~/Scripts/neuralconvo$ th train.lua --dataset 1000 --hiddenSize 500 --maxEpoch 10
-- Loading dataset	
Loading vocabulary from data/vocab.t7 ...	

Dataset stats:	
  Vocabulary size: 2536	
         Examples: 1569	

-- Epoch 1 / 10  (LR= 0.001)	
	
 [================ 1569/1569 ==========>]  Tot: 3m17s | Step: 128ms     


Finished in 3m18s 7.9049796615389 examples/sec.	

Epoch stats:	
  Errors: min= 4.3083517415234	
          max= 19.967736960488	
       median= 9.4001431829178	
         mean= 10.031499396177	
          std= 3.1296645971186	
          ppl= 22731.329274047	

(Saving model ...)	

-- Epoch 2 / 10  (LR= 0.0009505)	
	
/home/user/Scripts/torch/install/bin/luajit: ...user/Scripts/torch/install/share/lua/5.1/optim/adam.lua:59: invalid arguments: DoubleTensor number FloatTensor 
expected arguments: *DoubleTensor* [DoubleTensor] double | *DoubleTensor* [DoubleTensor] [double] DoubleTensor
stack traceback:
	[C]: in function 'add'
	...user/Scripts/torch/install/share/lua/5.1/optim/adam.lua:59: in function 'adam'
	train.lua:131: in main chunk
	[C]: in function 'dofile'
	...ipts/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x00406670

Anyone know how to fix this or a work around?

@TTN-
Copy link
Author

TTN- commented Mar 15, 2017

@macournoyer if you could accept the pull request once you're happy with it that would be great :-)

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