Skip to content

Instantly share code, notes, and snippets.

@ahmadmustafaanis
Created August 17, 2020 01:12
Show Gist options
  • Save ahmadmustafaanis/51cb533ecba7585f5cb5ab1494f20a0d to your computer and use it in GitHub Desktop.
Save ahmadmustafaanis/51cb533ecba7585f5cb5ab1494f20a0d to your computer and use it in GitHub Desktop.
model1 = Sequential([
Dense(512, activation='tanh', input_shape = X_train[0].shape),
Dense(512//2, activation='tanh'),
Dense(512//4, activation='tanh'),
Dense(512//8, activation='tanh'),
Dense(32, activation='relu'),
Dense(3, activation='softmax')
])
print(model1.summary())
model1.compile(optimizer='sgd',loss='categorical_crossentropy', metrics=['acc', 'mse'])
hist = model1.fit(X_train, y_train, epochs=350, batch_size=128, validation_data=(X_test,y_test))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment