Skip to content

Commit

Permalink
Tensorboard logging
Browse files Browse the repository at this point in the history
  • Loading branch information
AnanthVivekanand committed Oct 21, 2020
1 parent c17305a commit c21fe29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"metadata": {},
"outputs": [],
"source": [
"from keras.callbacks import ModelCheckpoint\n",
"from keras.callbacks import ModelCheckpoint, TensorBoard\n",
"from datetime import datetime \n",
"\n",
"num_epochs = 72\n",
Expand All @@ -231,7 +231,9 @@
"checkpointer = ModelCheckpoint(filepath='saved_models/weights.best.basic_cnn.hdf5', \n",
" verbose=1, save_best_only=True)\n",
"start = datetime.now()\n",
"model.fit(x_train, y_train, batch_size=num_batch_size, epochs=num_epochs, validation_data=(x_test, y_test), callbacks=[checkpointer], verbose=1)\n",
"\n",
"tbCallBack = TensorBoard(log_dir='./tensorboard_graphs', histogram_freq=0, write_graph=True, write_images=True)\n",
"model.fit(x_train, y_train, batch_size=num_batch_size, epochs=num_epochs, validation_data=(x_test, y_test), callbacks=[checkpointer, tbCallBack], verbose=1)\n",
"\n",
"\n",
"duration = datetime.now() - start\n",
Expand Down

0 comments on commit c21fe29

Please sign in to comment.