"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "02f8a6a27bc6a2b67a63db81b5d69083f1a64b84"
Commit a95142bf authored by Mark Daoust's avatar Mark Daoust
Browse files

Minor + typos

parent 2756d49a
......@@ -5,8 +5,6 @@
"colab": {
"name": "basic-regression.ipynb",
"version": "0.3.2",
"views": {},
"default_view": {},
"provenance": [],
"private_outputs": true,
"collapsed_sections": [
......@@ -34,13 +32,7 @@
"metadata": {
"id": "AwOEIRJC6Une",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"cellView": "form"
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -63,13 +55,7 @@
"metadata": {
"id": "KyPEtTqk6VdG",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"cellView": "form"
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -141,12 +127,7 @@
"metadata": {
"id": "1rRo8oNqZ-Rj",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -176,12 +157,7 @@
"metadata": {
"id": "p9kxxgzvzlyz",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -213,12 +189,7 @@
"metadata": {
"id": "Ujqcgkipr65P",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -258,12 +229,7 @@
"metadata": {
"id": "8tYsm8Gs03J4",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -286,12 +252,7 @@
"metadata": {
"id": "pYVyGhdyCpIM",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -322,12 +283,7 @@
"metadata": {
"id": "I8NwI2ND2t4Y",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -352,12 +308,7 @@
"metadata": {
"id": "ze5WQP8R1TYg",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -399,22 +350,17 @@
"metadata": {
"id": "c26juK7ZG8j-",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
"def build_model():\n",
" model = keras.Sequential()\n",
" \n",
" model.add(keras.layers.Dense(64, activation=tf.nn.relu,\n",
" input_shape=(train_data.shape[1],)))\n",
" model.add(keras.layers.Dense(64, activation=tf.nn.relu))\n",
" model.add(keras.layers.Dense(1))\n",
" model = keras.Sequential([\n",
" keras.layers.Dense(64, activation=tf.nn.relu, \n",
" input_shape=(train_data.shape[1],)),\n",
" keras.layers.Dense(64, activation=tf.nn.relu),\n",
" keras.layers.Dense(1)\n",
" ])\n",
"\n",
" optimizer = tf.train.RMSPropOptimizer(0.001)\n",
"\n",
......@@ -445,12 +391,7 @@
"metadata": {
"id": "sD7qHCmNIOY0",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -484,12 +425,7 @@
"metadata": {
"id": "B6XriGbVPh2t",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -500,8 +436,10 @@
" plt.figure()\n",
" plt.xlabel('Epoch')\n",
" plt.ylabel('Mean Abs Error [1000$]')\n",
" plt.plot(history.epoch, np.array(history.history['mean_absolute_error']), label='Train Loss')\n",
" plt.plot(history.epoch, np.array(history.history['val_mean_absolute_error']), label = 'Val loss')\n",
" plt.plot(history.epoch, np.array(history.history['mean_absolute_error']), \n",
" label='Train Loss')\n",
" plt.plot(history.epoch, np.array(history.history['val_mean_absolute_error']),\n",
" label = 'Val loss')\n",
" plt.legend()\n",
" plt.ylim([0,5])\n",
"\n",
......@@ -526,12 +464,7 @@
"metadata": {
"id": "fdMZuhUgzMZ4",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -565,12 +498,7 @@
"metadata": {
"id": "jl_yNr5n1kms",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -597,12 +525,7 @@
"metadata": {
"id": "Xe7RXH3N3CWU",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -622,7 +545,7 @@
"source": [
"## Conclusion\n",
"\n",
"This notebook i a few techniques to introduce a regresson problem.\n",
"This notebook introduced a few techniques to handle a regresson problem.\n",
"\n",
"* Mean Squared Error (MSE) is a common loss function used for regression problems (different than classification problems).\n",
"* Similarly, evaluation metrics used for regression differ from classification. A common regression metric is Mean Absolute Error (MAE).\n",
......
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