I am trying to run my first machine learning model. However I am getting the error below.
return_sequences=True)) TypeError: init() missing 1 required positional argument: 'units'
from tensorflow.python.keras.models import Sequential
from tensorflow.python.keras.layers import Dense, LSTM, Dropout
model = Sequential()
model.add(LSTM(input_dim=1,
output_dim=50,
return_sequences=True))
model.add(Dropout(0.2))
model.add(LSTM(100, return_sequences=False))
model.add(Dropout(0.2))
model.add(Dense(output_dim=1))
model.add(Activation('linear'))
start = time.time()
model.compile(loss="mse", optimizer="rmsprop")
Since it said the parameter units was missing I have also tried the below line,
model.add(LSTM(100,
input_dim=1,
output_dim=50,
return_sequences=True))
Then get this error message but I don't understand why that doesn't come in my first attempt. What am I missing?
TypeError: ('Keyword argument not understood:', 'input_dim')