Commit 41b8e351 authored by Raymond Yuan's avatar Raymond Yuan
Browse files

update comments and code fixes

parent 9909bcf3
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
}, },
"source": [ "source": [
"# Get all the files \n", "# Get all the files \n",
"Since this tutorial will be using a dataset from Kaggle, it requires [creating an API Token](https://github.com/Kaggle/kaggle-api#api-credentials) for your Kaggle acccount, and uploading it. " "Since this tutorial will be using a dataset from Kaggle, it requires [creating an API Token](https://github.com/Kaggle/kaggle-api#api-credentials) for your Kaggle account, and uploading it. "
] ]
}, },
{ {
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"# Download data from Kaggle and create a DataFrame.\n", "# Download data from Kaggle and unzip the files of interest. \n",
"def load_data_from_zip(competition, file):\n", "def load_data_from_zip(competition, file):\n",
" with zipfile.ZipFile(os.path.join(competition, file), \"r\") as zip_ref:\n", " with zipfile.ZipFile(os.path.join(competition, file), \"r\") as zip_ref:\n",
" unzipped_file = zip_ref.namelist()[0]\n", " unzipped_file = zip_ref.namelist()[0]\n",
...@@ -1177,7 +1177,7 @@ ...@@ -1177,7 +1177,7 @@
"1. Since our model architecture is already in memory, we can simply call `load_weights(save_model_path)`\n", "1. Since our model architecture is already in memory, we can simply call `load_weights(save_model_path)`\n",
"2. If you wanted to load the model from scratch (in a different setting without already having the model architecture in memory) we simply call \n", "2. If you wanted to load the model from scratch (in a different setting without already having the model architecture in memory) we simply call \n",
"\n", "\n",
"```model = models.load_model(save_model_path, custom_objects={'bce_dice_loss': bce_dice_loss, 'mean_iou': mean_iou,'dice_coeff': dice_coeff})```, specificing the necessary custom objects, loss and metrics, that we used to train our model. \n", "```model = models.load_model(save_model_path, custom_objects={'bce_dice_loss': bce_dice_loss, 'dice_loss': dice_loss})```, specificing the necessary custom objects, loss and metrics, that we used to train our model. \n",
"\n", "\n",
"If you want to see more examples, check our the [keras guide](https://keras.io/getting-started/faq/#how-can-i-save-a-keras-model)!" "If you want to see more examples, check our the [keras guide](https://keras.io/getting-started/faq/#how-can-i-save-a-keras-model)!"
] ]
...@@ -1194,7 +1194,7 @@ ...@@ -1194,7 +1194,7 @@
"source": [ "source": [
"# Alternatively, load the weights directly: model.load_weights(save_model_path)\n", "# Alternatively, load the weights directly: model.load_weights(save_model_path)\n",
"model = models.load_model(save_model_path, custom_objects={'bce_dice_loss': bce_dice_loss,\n", "model = models.load_model(save_model_path, custom_objects={'bce_dice_loss': bce_dice_loss,\n",
" 'dice_coeff': dice_coeff})" " 'dice_loss': dice_loss})"
] ]
}, },
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment