I have all the necessary libraries and modules but I keep getting Invalid Syntax. See code below:
from tensorflow.keras.layers import Dense
# training the best tuned model
# input the best parameters reported before
tuned_model = tf.keras.Sequential([
Input(X_train.shape[1]),
Dense(units= 106, activation='relu'),
Dropout(0.40197),
Dense(units= 106, activation='relu'),
Dropout(0.40197)
Dense(units=10, activation='softmax')
])
# input the best learning rate and decay
opt = tf.keras.optimizers.RMSprop(lr=0.00011, decay=0.00020)
tuned_model.compile(loss='categorical_crossentropy', optimizer=opt, metrics=['accuracy',f1_m])
# report the accuracy and f-measure using the test set as validation data
history_tuned = tuned_model.fit(X_train, y_train,
batch_size=16, epochs=100,
validation_data=(X_test, y_test), callbacks=[stop_early])
Output:
Input In [44]
Dense(units=10, activation='softmax')
^
SyntaxError: invalid syntax