Skip to content

Instantly share code, notes, and snippets.

@previtus
Created February 17, 2017 13:07
Show Gist options
  • Save previtus/c5082b570de5fd8c4fd45867be80cd1c to your computer and use it in GitHub Desktop.
Save previtus/c5082b570de5fd8c4fd45867be80cd1c to your computer and use it in GitHub Desktop.
def saveHistory(history_dict, filename):
to_be_saved = data = {'S': history_dict}
np.save(open(filename, 'w'), to_be_saved)
def loadHistory(filename):
loaded = np.load(open(filename))
return loaded[()]['S']
hi = model.fit(...)
saveHistory(hi.history, 'tmp_saved_history.npy')
visualize_history(loadHistory('tmp_saved_history.npy'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment