Closed lfloeer closed 7 years ago
same here.
tributeError Traceback (most recent call last) /usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py in concatenate(tensors, axis) 1424 try: -> 1425 return tf.concat_v2([to_dense(x) for x in tensors], axis) 1426 except AttributeError:
AttributeError: module 'tensorflow' has no attribute 'concat_v2'
I met the similar problem when writing code like below:
“up6 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)”
Seems that there are lots of api changes in new version of tensorflow according to: https://groups.google.com/a/tensorflow.org/forum/#!msg/discuss/OePXmC9kJ7o/SRErOoYCDQAJ
Keras 2 is coming soon, so you should use that. It's developed for TF 1.0.
On 11 March 2017 at 18:41, qjin notifications@github.com wrote:
I met the similar problem when writing code like below:
“up6 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)”
Seems that there are lots of api changes in new version of tensorflow according to: https://groups.google.com/a/tensorflow.org/forum/#!msg/ discuss/OePXmC9kJ7o/SRErOoYCDQAJ
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fchollet/keras/issues/5238#issuecomment-285917235, or mute the thread https://github.com/notifications/unsubscribe-auth/AArWb6e4MJPvFPm4thRpzH7A84nK79WYks5rk1tQgaJpZM4Lzo0n .
Thanks for reply. I had planed to make a pull request. But I found the fix for my problem is already in the newest code.
Looking forward to embrace Keras 2 :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.
Because the call signature of
tf.concat
has changed to the one of the deprecatedtf.concat_v2
, the creation of a bidirectional RNN layer fails. This happens in either Version 1.2.1 or the latest master versions.Example:
This fails with
TypeError: Expected int32, got <tensorflow.python.ops.variables.Variable object at 0x7f162824e588> of type 'Variable' instead.
since the arguments of value and axis are switched: https://www.tensorflow.org/versions/r1.0/api_docs/python/array_ops/slicing_and_joining#concat https://www.tensorflow.org/api_docs/python/array_ops/slicing_and_joining#concat