x=np.array(np.arange(200))
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import LSTM, Dense
model = Sequential()
model.add(LSTM(10, activation='relu',input_shape=(look_back,1)))
model.add(Dense(1))
model.compile(optimizer='adam', loss='mse')
num_epochs = 100
model.fit_generator(x, epochs=num_epochs, verbose=1)
NotImplementedError: Cannot convert a symbolic Tensor (lstm_4/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported
Hi, I have posted my code and error , I am getting this error on model.add(LSTM(....)) line. I tried different version of tensorflow and numpy for sorting this error, but Ithe error remains in all the versions.
If we do not use model.add (LSTM(...)),the code works properly.
Please help in cleaning this error.
Thanks ,
Shubham