Closed petteriTeikari closed 7 years ago
What version of tensorflow are you using? We currently only supports 0.12.0. Will add support to the latest 1.0 version soon.
Aah, explaining factor then. Yes I switched to the latest 1.xx version already @flyyufelix
Hello, Check https://github.com/flyyufelix/cnn_finetune/issues/2 or my repo here for an update to Keras 2.0.3 and Tensorflow 1.1.0
Apologize for the delay @petteriTeikari . I've already made the necessary changes to get the code to work with the latest versions of Keras (2.0.5) and TensorFlow (1.2.1)
hey @flyyufelix I am getting the same issue on tensorflow backend
On theano, it is
AttributeError: 'TensorConstant' object has no attribute 'set_value'
my keras version is 2.0.4 tf : 1.2.1 th: 0.9.0
Oh yes, I forgot to erase a line in custom_layers.py which caused the error above. It should work now!
Hey @flyyufelix, I am getting the below error: AttributeError: 'Tensor' object has no attribute 'assign' for generator.fit( noise_input, target_ohe, batch_size=batch_size, epochs = pre_generator_rounds, validation_split=0.1 ) line. I am using tensorflow version '1.4.1'. Could you please help or provide your views for resolving the error.
@chhayac I had this error when my data was accidentally empty :(
Traceback (most recent call last):
File "script.py", line 187, in <module>
callbacks=[])
File "/anaconda3/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/anaconda3/lib/python3.6/site-packages/keras/engine/training.py", line 1415, in fit_generator
initial_epoch=initial_epoch)
File "/anaconda3/lib/python3.6/site-packages/keras/engine/training_generator.py", line 39, in fit_generator
model._make_train_function()
File "/anaconda3/lib/python3.6/site-packages/keras/engine/training.py", line 498, in _make_train_function
loss=self.total_loss)
File "/anaconda3/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/anaconda3/lib/python3.6/site-packages/keras/optimizers.py", line 197, in get_updates
self.updates.append(K.update(m, v))
File "/anaconda3/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 971, in update
return tf.assign(x, new_x)
File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/state_ops.py", line 217, in assign
return ref.assign(value, name=name)
AttributeError: 'Tensor' object has no attribute 'assign'
@ubershmekel did you manage to sort this out? I'm having the same problem : , (
I didn't solve the bug in Tensorflow. But I did notice it was only occurring in a degenerate scenario. E.g. if the matrix had no rows, no columns, no shape. If I sent in an empty iterator. I didn't debug exactly to figure out what. Just make sure whatever you're feeding into keras or tf isn't empty.
@ubershmekel Thanks! I had the same issue and you were right: this error occurs in a degenerate scenario, in my case I controlled the number of filter in a layer through a variable that was null at a moment.
Hi,
Thanks a lot for the repo, but I hit the following error when trying the
python test_inference.py
with the densenet169:So when printing the types of the variables in the saved weights I got the following:
And the
batch_set_value(tuples)
from the backend hit the Tensor problem with "conv1_scale", is there a fix for this to allow the assigning or are the weights somewhat weirdly saved?: