Error when running train.sh
Cathyttt opened this issue · 7 comments
when running train.sh, it came up with a error:
Traceback (most recent call last):‘
File "./train_nmt.py", line 4, in <module>
from nmt import train
File "/home/tyt/style-trans/text_style_transfer-master/model/style_transfer/session_multi_decoder/nmt.py", line 4, in <module>
import theano
File "/usr/local/lib/python2.7/dist-packages/theano/__init__.py", line 111, in <module>
theano.sandbox.cuda.tests.test_driver.test_nvidia_driver1()
File "/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda/tests/test_driver.py", line 39, in test_nvidia_driver1
raise Exception("The nvidia driver version installed with this OS "
Exception: The nvidia driver version installed with this OS does not give good results for reduction.Installing the nvidia driver available on the same download page as the cuda package will fix the problem: http://developer.nvidia.com/cuda-downloads
I think it's something wrong with theano or cuda, but I don't know how to fix it.
It seems the problem comes from theano. I recommend you to search "The nvidia driver version installed with this OS" in google. Some pages like "https://devtalk.nvidia.com/default/topic/1025598/mac-os-the-nvidia-driver-version-installed-with-this-os-does-not-give-good-results-for-reduction/" may help you solve the problem.
I fixed the bug above but here comes a new fault:
Traceback (most recent call last):
File "./train_nmt.py", line 55, in <module>
'reload': [False]})
File "./train_nmt.py", line 42, in main
style_adv=True)
File "/home/tyt/style-trans/text_style_transfer-master/model/style_transfer/session_multi_decoder/nmt.py", line 1348, in train
**params)
TypeError: savez() argument after ** must be a mapping, not NoneType
Can you provide the tendency of the ppl and the time the error happens (eg,, epoch)?
At the first of the training, here is the full log:
WARNING (theano.gof.compilelock): Overriding existing lock by dead process '7763' (I am process '8031')
Using cuDNN version 7102 on context None
Mapped name None to device cuda2: GeForce GTX 1080 Ti (0000:09:00.0)
/home/tyt/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_perform_ext.py:76: UserWarning: The file scan_perform.c is not available. This donot happen normally. You are probably in a strangesetup. This mean Theano can not use the cython code for scan. If youwant to remove this warning, use the Theano flag'cxx=' (set to an empty string) to disable all ccode generation.
"The file scan_perform.c is not available. This do"
/home/tyt/style-trans/text_style_transfer-master/model/style_transfer/session_multi_decoder/nmt.py:1338: RuntimeWarning: Mean of empty slice.
model_options, valid).mean()
/home/tyt/style-trans/text_style_transfer-master/model/style_transfer/session_multi_decoder/nmt.py:1340: RuntimeWarning: Mean of empty slice.
model_options, valid).mean()
Traceback (most recent call last):
File "./train_nmt.py", line 55, in <module>
'reload': [False]})
File "./train_nmt.py", line 42, in main
style_adv=True)
File "/home/tyt/style-trans/text_style_transfer-master/model/style_transfer/session_multi_decoder/nmt.py", line 1348, in train
**params)
TypeError: savez() argument after ** must be a mapping, not NoneType
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@python.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
{'use-dropout': [False], 'dim': [32], 'optimizer': ['adadelta'], 'dim_word': [64], 'reload': [False], 'n-words': [100000], 'model': ['models/model.npz'], 'learning-rate': [0.0001], 'decay-c': [0.0]}
Loading data
Building model
Building sampler
Building f_init... Done
Building f_next.. Done
Building f_init... Done
Building f_next.. Done
Building f_log_probs... Done
Building f_cost... Done
Computing gradient... Done
Building optimizers... Done
Optimization
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Seen 0 samples
Valid nan
As the warning said, have you tried use the Theano flag'cxx=' (set to an empty string) to disable all ccode generation
? I think the error comes from the theano environment.
I tried it and then it told me pygpu was disable.
problem solved. Data format.