-
Notifications
You must be signed in to change notification settings - Fork 67
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
keras 0.2.0 will not work with Theano - Github version #4
Comments
I'm using version 0.2.0 of keras now without these problems. Can you give me more information to go on so I can try to troubleshoot the problem? How did you checkout Keras? |
So, I managed to solve by changing the Theano version. The version from github wasn't working for me, and I changed it to version 0.7.0 from version 0.9 that is the current in github. In addition I commented out line 1258 " if keras.version == '0.2.0': " since that seemed to cause a problem and I was able to train my network. Thanks for sharing your work. It is really helpful. |
I do getting following error with Keras (0.2.0), Theano (0.8.2) . It seems go_backwards function is compatible with later version of Keras, but not with 0.0.2. Could you please share exactly which version of these libraries you are using ?
|
@mmetince thanks for letting my know about this. Its currently a todo for me to improve the compatibility with different versions of keras and theano and upgrade it to the new version. I added this to the readme. It would really help if you could let me know if this solves your issue.
|
@wrmelicher Thank you for your quick response. I've installed keras with with following command.
Now I'm getting following error.
I've tried with both Theano 0.7 and 0.8 but result remained same. |
downsample module has been moved to the theano.tensor.signal.pool module.")
Warning, cannot import Bidirectional model. You may need to install or use a different version of keras
/usr/local/lib/python3.4/dist-packages/Theano-0.9.0dev2-py3.4.egg/theano/tensor/signal/downsample.py:6: UserWarning: downsample module has been moved to the theano.tensor.signal.pool module.
"downsample module has been moved to the theano.tensor.signal.pool module.")
Warning, cannot import Bidirectional model. You may need to install or use a different version of keras
WARNING:root:Cannot remove /tmp/tmp_ubasbd5 because it is not empty.
/usr/lib/python3.4/unittest/case.py:577: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tmpusug2512' mode='w' encoding='UTF-8'>
testMethod()
.........................ERROR:root:Cannot find intermediate data 'empirical_weighting'. Looking in :memory:
..ERROR:root:Cannot find intermediate data 'empirical_weighting'. Looking in /tmp/tmpgx3n9_gc
.ERROR:root:Cannot find intermediate data 'empirical_weighting'. Looking in /tmp/tmp6i2aw0ry
.ERROR:root:Cannot find intermediate data 'empirical_weighting'. Looking in /tmp/tmpn89cy223
.ERROR:root:Cannot find intermediate data 'empirical_weighting'. Looking in /tmp/tmptk7qm2ex
........./usr/lib/python3.4/unittest/case.py:577: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tmptsrdx4km' mode='w' encoding='UTF-8'>
testMethod()
...s/usr/lib/python3.4/unittest/case.py:577: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tmp_1avask8' mode='w' encoding='UTF-8'>
testMethod()
./usr/lib/python3.4/unittest/case.py:577: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tmpse90wyja' mode='w' encoding='UTF-8'>
testMethod()
.s...........EFFFF..E..EEssE.......
ERROR: test_accuracy (main.TrainerTest)
Traceback (most recent call last):
File "pwd_guess_unit.py", line 729, in test_accuracy
self.assertEqual(0.5, t.train_model_generation())
File "/root/neural_network_cracking/pwd_guess.py", line 1364, in train_model_generation
x_all, y_all, w_all = self.next_train_set_as_np()
File "/root/neural_network_cracking/pwd_guess.py", line 1247, in next_train_set_as_np
y_vec = self.prepare_y_data(y_str_list)
File "/root/neural_network_cracking/pwd_guess.py", line 1258, in prepare_y_data
if keras.version == '0.2.0':
AttributeError: 'module' object has no attribute 'version'
ERROR: test_output_as_np (main.TrainerTest)
Traceback (most recent call last):
File "pwd_guess_unit.py", line 798, in test_output_as_np
t.next_train_set_as_np()
File "/root/neural_network_cracking/pwd_guess.py", line 1247, in next_train_set_as_np
y_vec = self.prepare_y_data(y_str_list)
File "/root/neural_network_cracking/pwd_guess.py", line 1258, in prepare_y_data
if keras.version == '0.2.0':
AttributeError: 'module' object has no attribute 'version'
ERROR: test_tokenize (main.TrainerTest)
Traceback (most recent call last):
File "pwd_guess_unit.py", line 747, in test_tokenize
xv, yv, wv = t.next_train_set_as_np()
File "/root/neural_network_cracking/pwd_guess.py", line 1247, in next_train_set_as_np
y_vec = self.prepare_y_data(y_str_list)
File "/root/neural_network_cracking/pwd_guess.py", line 1258, in prepare_y_data
if keras.version == '0.2.0':
AttributeError: 'module' object has no attribute 'version'
ERROR: test_train_model (main.TrainerTest)
Traceback (most recent call last):
File "pwd_guess_unit.py", line 758, in test_train_model
t.train_model(pwd_guess.ModelSerializer())
File "/root/neural_network_cracking/pwd_guess.py", line 1329, in train_model
accuracy = self.train_model_generation()
File "/root/neural_network_cracking/pwd_guess.py", line 1364, in train_model_generation
x_all, y_all, w_all = self.next_train_set_as_np()
File "/root/neural_network_cracking/pwd_guess.py", line 1247, in next_train_set_as_np
y_vec = self.prepare_y_data(y_str_list)
File "/root/neural_network_cracking/pwd_guess.py", line 1258, in prepare_y_data
if keras.version == '0.2.0':
AttributeError: 'module' object has no attribute 'version'
ERROR: test_train_set_np_two (main.TrainerTest)
Traceback (most recent call last):
File "pwd_guess_unit.py", line 830, in test_train_set_np_two
t.next_train_set_as_np()
File "/root/neural_network_cracking/pwd_guess.py", line 1247, in next_train_set_as_np
y_vec = self.prepare_y_data(y_str_list)
File "/root/neural_network_cracking/pwd_guess.py", line 1258, in prepare_y_data
if keras.version == '0.2.0':
AttributeError: 'module' object has no attribute 'version'
FAIL: test_build_model (main.TrainerTest)
Traceback (most recent call last):
File "pwd_guess_unit.py", line 803, in test_build_model
t.build_model()
File "/root/neural_network_cracking/pwd_guess.py", line 1277, in build_model
go_backwards=self.config.train_backwards))
File "/usr/local/lib/python3.4/dist-packages/Keras-0.2.0-py3.4.egg/keras/layers/recurrent.py", line 510, in init
super(JZS1, self).init(**kwargs)
File "/usr/local/lib/python3.4/dist-packages/Keras-0.2.0-py3.4.egg/keras/layers/core.py", line 23, in init
assert kwarg in {'input_shape'}, "Keyword argument not understood: " + kwarg
AssertionError: Keyword argument not understood: go_backwards
FAIL: test_build_model_bidirectional (main.TrainerTest)
Traceback (most recent call last):
File "pwd_guess_unit.py", line 822, in test_build_model_bidirectional
t.build_model()
File "/root/neural_network_cracking/pwd_guess.py", line 1277, in build_model
go_backwards=self.config.train_backwards))
File "/usr/local/lib/python3.4/dist-packages/Keras-0.2.0-py3.4.egg/keras/layers/recurrent.py", line 510, in init
super(JZS1, self).init(**kwargs)
File "/usr/local/lib/python3.4/dist-packages/Keras-0.2.0-py3.4.egg/keras/layers/core.py", line 23, in init
assert kwarg in {'input_shape'}, "Keyword argument not understood: " + kwarg
AssertionError: Keyword argument not understood: go_backwards
FAIL: test_build_model_deep (main.TrainerTest)
Traceback (most recent call last):
File "pwd_guess_unit.py", line 809, in test_build_model_deep
t.build_model()
File "/root/neural_network_cracking/pwd_guess.py", line 1277, in build_model
go_backwards=self.config.train_backwards))
File "/usr/local/lib/python3.4/dist-packages/Keras-0.2.0-py3.4.egg/keras/layers/recurrent.py", line 510, in init
super(JZS1, self).init(**kwargs)
File "/usr/local/lib/python3.4/dist-packages/Keras-0.2.0-py3.4.egg/keras/layers/core.py", line 23, in init
assert kwarg in {'input_shape'}, "Keyword argument not understood: " + kwarg
AssertionError: Keyword argument not understood: go_backwards
FAIL: test_build_model_deep_no_layers (main.TrainerTest)
Traceback (most recent call last):
File "pwd_guess_unit.py", line 815, in test_build_model_deep_no_layers
t.build_model()
File "/root/neural_network_cracking/pwd_guess.py", line 1277, in build_model
go_backwards=self.config.train_backwards))
File "/usr/local/lib/python3.4/dist-packages/Keras-0.2.0-py3.4.egg/keras/layers/recurrent.py", line 510, in init
super(JZS1, self).init(**kwargs)
File "/usr/local/lib/python3.4/dist-packages/Keras-0.2.0-py3.4.egg/keras/layers/core.py", line 23, in init
assert kwarg in {'input_shape'}, "Keyword argument not understood: " + kwarg
AssertionError: Keyword argument not understood: go_backwards
Ran 156 tests in 24.590s
FAILED (failures=4, errors=5, skipped=6)
The text was updated successfully, but these errors were encountered: