add tensorboard to train cluster

master
ml server 2020-01-17 23:01:40 -07:00
parent 47c2cb329d
commit b085401e6e
1 changed files with 25 additions and 3 deletions

View File

@ -24,9 +24,9 @@
"from __future__ import absolute_import, division, print_function, unicode_literals\n",
"from __future__ import print_function\n",
"import os\n",
"from datetime import datetime\n",
"import numpy as np\n",
"import simplejson as json"
"import simplejson as json\n",
"from datetime import datetime"
]
},
{
@ -214,6 +214,18 @@
"#plotImages(sample_val_images[0:3])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%load_ext tensorboard\n",
"#os.mkdir(\"cluster-logs\")\n",
"logdir = \"cluster-logs\"\n",
"tensorboard_callback = tensorflow.keras.callbacks.TensorBoard(log_dir=logdir)"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -242,7 +254,8 @@
" epochs=epochs,\n",
" validation_data=val_data_gen,\n",
" validation_steps=total_val // batch_size,\n",
" verbose=2\n",
" verbose=2,\n",
" callbacks=[tensorboard_callback]\n",
" )"
]
},
@ -273,6 +286,15 @@
"Image.LOAD_TRUNCATED_IMAGES = True"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%tensorboard --logdir cluster-logs/"
]
},
{
"cell_type": "code",
"execution_count": null,