master
ml server 2020-01-21 13:06:05 -07:00
parent ec81a82567
commit 17b2b4f68d
1 changed files with 4 additions and 93 deletions

View File

@ -126,16 +126,6 @@
"options = tf.data.Options()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#from tensorflow.python.framework.ops import disable_eager_execution\n",
"#disable_eager_execution()"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -143,18 +133,7 @@
"outputs": [],
"source": [
"strategy = tf.distribute.experimental.MultiWorkerMirroredStrategy(\n",
" tf.distribute.experimental.CollectiveCommunication.RING)\n",
"#\n",
"# MultiWorkerMirroredStrategy needs TF_CONFIG\n",
"#multiworker_strategy = tf.distribute.experimental.MultiWorkerMirroredStrategy()\n",
"# Central Storage Strategy\n",
"#central_storage_strategy = tf.distribute.experimental.CentralStorageStrategy()\n",
"# ParameterServerStrategy needs TF_CONFIG\n",
"#ps_strategy = tf.distribute.experimental.ParameterServerStrategy()\n",
"# OneDeviceStrategy No cluster\n",
"#strategy = tf.distribute.OneDeviceStrategy(device=\"/CPU:0\")\n",
"# Mirrored Strategy\n",
"#mirrored_strategy = tf.distribute.MirroredStrategy()"
" tf.distribute.experimental.CollectiveCommunication.RING)"
]
},
{
@ -260,8 +239,8 @@
" plt.tight_layout()\n",
" plt.show()\n",
" \n",
"#plotImages(sample_train_images[0:3])\n",
"#plotImages(sample_val_images[0:3])"
"plotImages(sample_train_images[0:3])\n",
"plotImages(sample_val_images[0:3])"
]
},
{
@ -276,7 +255,7 @@
"log_dir=\"clusterlogs\"\n",
"#tensorboard_callback = tensorflow.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)\n",
"tensorboard_callback = tensorflow.keras.callbacks.TensorBoard(log_dir=log_dir)\n",
"#%tensorboard --logdir clusterlogs --port 6006"
"%tensorboard --logdir clusterlogs --port 6006"
]
},
{
@ -358,15 +337,6 @@
" return model"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#model = get_compiled_model()"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -407,50 +377,6 @@
"#return model"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#with strategy.scope():\n",
"# get_uncompiled_model()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#with strategy.scope():\n",
"# get_compiled_model()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#with strategy.scope():\n",
"# get_fit_model()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#multi_worker_model = get_compiled_model()\n",
"#multi_worker_model.fit(\n",
"# x=train_data_gen,\n",
"# epochs=epochs,\n",
"# steps_per_epoch=total_train // batch_size\n",
"# )"
]
},
{
"cell_type": "code",
"execution_count": null,
@ -469,21 +395,6 @@
" )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#with strategy.scope():\n",
"# multi_worker_model = get_compiled_model()\n",
"# multi_worker_model.fit(\n",
"# x=train_data_gen,\n",
"# epochs=epochs,\n",
"# steps_per_epoch=total_train // batch_size\n",
"# )"
]
},
{
"cell_type": "code",
"execution_count": null,