When running a Keras LSTM model, I am getting the above error. Here's the gist of the model:
inp = Input(shape=(170,200))
out = LSTM(25, activation='relu')(inp)
main_out = Dense(4, activation='sigmoid')(out)
model = Model(inputs = [inp], outputs = [main_out])
# optimizer, model.fit etc. etc.
model.fit([img_data, ], [y_train],
epochs=500, batch_size=1, callbacks = callbacks,
verbose=1, validation_split=0.1)
My input is a list of 250 sets of 170 vectors, each of length 200. The shape seems correct:
X.shape = (170, 200, 250)
However, when I run the model, I get
Traceback (most recent call last):
File "lstm_trials.py", line 62, in <module>
model = Model(inputs = [inp], outputs = [main_out])
File ".../keras/legacy/interfaces.py", line 88, in wrapper
return func(*args, **kwargs)
File ".../keras/engine/topology.py", line 1485, in __init__
inputs_set = set(self.inputs)
TypeError: unhashable type: 'numpy.ndarray'
What is going wrong?