1

In line where I try to add LSTM layer to my Sequential model from tensorflow.keras in this way:

from tensorflow.keras import Sequential
from tensorflow.keras.layers import Dense, LSTM, Dropout, GRU, TimeDistributed
#...
modelX1 = Sequential()
modelX1.add(LSTM(LSTM_neurons[0],input_shape=(dataX1.shape[1],dataX1.shape[2]), activation='tanh', recurrent_activation='tanh', use_bias=True, return_sequences = True))     

This error appears:

File "C:\Users\mroso\Anaconda3\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py", line 168, in _variable_handle_from_shape_and_dtype handle_data.shape_and_type.append(

AttributeError: 'google.protobuf.pyext._message.RepeatedCompositeCo' object has no attribute 'append'

I am using Tensorflow 2.1.0, protobuf 3.11.4, Spyder 4 and I am working on Windows 10. When I was using Tensorflow 1.4 (90% sure, that was this version) everything was all right. Does anyone know how to fix this error? Thank you in advance for your help.

Maciek Rosoł
  • 11
  • 1
  • 3

1 Answers1

0

You might want to look at the solution stated at this link

As the solution suggests, you can try rolling back your TensorFlow version to 2.0.0

TF_Support
  • 1,794
  • 1
  • 7
  • 16
  • Thank You, last weekend I've cline up my whole computer, install anaconda again with TensorFlow version 1.15 and now everything is working fine. :) – Maciek Rosoł Mar 25 '20 at 14:12
  • Your welcome @MaciekRosoł. If you find this useful you might want to put an upvote. Thanks! – TF_Support Mar 26 '20 at 00:58