Skip to content

Instantly share code, notes, and snippets.

@tridungduong16
Last active August 3, 2018 02:52
Show Gist options
  • Save tridungduong16/96e76a1dc281ea2ce922cc104b5be23e to your computer and use it in GitHub Desktop.
Save tridungduong16/96e76a1dc281ea2ce922cc104b5be23e to your computer and use it in GitHub Desktop.
Python Note
### Create model in Keras
model = Sequential()
model.add(Dense(100, activation='relu', input_shape = input_shape))
model.add(Dense(100, activation='relu'))
model.add(Dense(2, activation='softmax'))
#model.compile(optimizer, loss=None, metrics=None, loss_weights=None, sample_weight_mode=None, weighted_metrics=None, target_tensors=None)
model.compile(optimizer = 'adam', loss = 'categorical_crossentropy',metrics=['accuracy'] )
### Interactive Shell
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment