-
Notifications
You must be signed in to change notification settings - Fork 264
RuntimeError: torch.cuda.FloatTensor is not enabled. #22
Comments
Hi, |
Done. I follow https://github.com/facebookresearch/UnsupervisedMT/pull/9/files. Moreover, I also change the line 209 to: |
@ehsanzare I'm trying to run the same experiments , Did you benchmark on different no of CPU's . Just curious if it is linearly scalable. Cheers. Mohammed Ayub |
No, I did not try that on no of CPU's. |
@ehsanzare @glample I'm trying to run in in Windows, |
Hi,
I get the following error when I ran the code on my Mac machine (no GPU):
INFO - 09/19/18 10:23:37 - 0:00:16 - ============ Building transformer attention model - Decoder ...
INFO - 09/19/18 10:23:37 - 0:00:16 - Sharing decoder input embeddings
INFO - 09/19/18 10:23:38 - 0:00:17 - Sharing decoder transformer parameters for layer 0
INFO - 09/19/18 10:23:38 - 0:00:17 - Sharing decoder transformer parameters for layer 1
INFO - 09/19/18 10:23:38 - 0:00:17 - Sharing decoder transformer parameters for layer 2
INFO - 09/19/18 10:23:38 - 0:00:18 - Sharing decoder projection matrices
Traceback (most recent call last):
File "main.py", line 242, in
encoder, decoder, discriminator, lm = build_mt_model(params, data)
File "/Users/Ehsan/Documents/Ehsan_General/HMQ/HMQ_Projects/UnSup_MT/UnsupervisedMT/NMT/src/model/init.py", line 98, in build_mt_model
return build_attention_model(params, data, cuda=cuda)
File "/Users/Ehsan/Documents/Ehsan_General/HMQ/HMQ_Projects/UnSup_MT/UnsupervisedMT/NMT/src/model/attention.py", line 801, in build_attention_model
encoder.cuda()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 249, in cuda
return self._apply(lambda t: t.cuda(device))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 182, in _apply
param.data = fn(param.data)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 249, in
return self._apply(lambda t: t.cuda(device))
RuntimeError: torch.cuda.FloatTensor is not enabled.
Is there any way that I can run this code on CPU?
Regards
The text was updated successfully, but these errors were encountered: