project environment
SherlockHua1995 opened this issue · 4 comments
hello ,would u plz give detailed information about the project environment ,such as keras and tensorflow version ,cuda and cudnn?
when i run "python3 SSRNET_train.py --input /home/xd/workspace/SSR-Net/data/imdb.npz --db imdb --netType1 4 --netType2 4", the folloing errors occur:
Epoch 1/90
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/home/xx/.local/lib/python3.5/site-packages/keras/engine/training.py", line 606, in data_generator_task
generator_output = next(self._generator)
File "/home/xx/workspace/SSR-Net/training_and_testing/TYY_generators.py", line 49, in data_generator_reg
yield augment_data(np.array(p)),np.array(q)
File "/home/xx/workspace/SSR-Net/training_and_testing/TYY_generators.py", line 27, in augment_data
images[i] = tf.contrib.keras.preprocessing.image.random_rotation(images[i], 20, row_axis=0, col_axis=1, channel_axis=2)
AttributeError: module 'tensorflow.contrib' has no attribute 'keras'
File "/home/xx/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1852, in fit_generator
str(generator_output))
ValueError: output of generator should be a tuple (x, y, sample_weight)
or (x, y)
. Found: None
Your reply would be appreciated greatly.
tensorflow/tensorflow#16614
[AttributeError: module 'tensorflow.contrib' has no attribute 'keras']
According to the tensorflow issue, it should be at least tensorflow 1.4.
My currenet version of them are:
tensorflow 1.10.0
keras 2.2.2
Thanks for your response.
And your cuda and cudnn version ? python2 or python3? Maybe my current environment doesn't match your project so I am eager to find their difference.
Thanks again.
cuda 9.0, cudnn 7.1.2, python 3.5
I use anaconda to install the virtual environment to avoid the trouble. You could consider to use anaconda.
Best wishes.
I will try to use anaconda , and your reply is very timely and useful.