I am trying to build a simple LSTM based model but I am getting "can't set attribute error" on the line to add LSTM layer to the model. I am unable to figure the reason as to why this error is appearing. This is the code I am using.

left = Sequential()
left.add(Dense(dim, activation='linear'))
left.compile(loss='mean_squared_error', optimizer='rmsprop')

I do not think there is an issue with code. The version of Keras is 2.0.7 with tensorflow backend. It is difficult to trace the cause of error.


1 Answer 1


Install the latest Keras version: https://github.com/keras-team/keras/issues/7736#issuecomment-324989522


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.