Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Last active February 6, 2019 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/92d3f2bd282beb76d09a8f0444b9aed6 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/92d3f2bd282beb76d09a8f0444b9aed6 to your computer and use it in GitHub Desktop.
Train Model
filename = 'model.h1.24_jan_19'
# set checkpoint
checkpoint = ModelCheckpoint(filename, monitor='val_loss',
verbose=1, save_best_only=True,
mode='min')
# train model
history = model.fit(trainX, trainY.reshape(trainY.shape[0], trainY.shape[1], 1),
epochs=30, batch_size=512, validation_split = 0.2,
callbacks=[checkpoint], verbose=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment