Unverified Commit de936e95 authored by Billy Lamberta's avatar Billy Lamberta Committed by GitHub
Browse files

Merge pull request #1 from createai/master

Removed preprocess function
parents 5bb9e6f3 d8551c9d
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
"colab": { "colab": {
"name": "basic_classification.ipynb", "name": "basic_classification.ipynb",
"version": "0.3.2", "version": "0.3.2",
"views": {},
"default_view": {},
"provenance": [], "provenance": [],
"private_outputs": true, "private_outputs": true,
"collapsed_sections": [], "collapsed_sections": [],
...@@ -30,7 +32,12 @@ ...@@ -30,7 +32,12 @@
"metadata": { "metadata": {
"id": "_ckMIh7O7s6D", "id": "_ckMIh7O7s6D",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -53,7 +60,12 @@ ...@@ -53,7 +60,12 @@
"metadata": { "metadata": {
"id": "vasWnqRgy1H4", "id": "vasWnqRgy1H4",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -122,7 +134,12 @@ ...@@ -122,7 +134,12 @@
"metadata": { "metadata": {
"id": "dzLKpmZICaWN", "id": "dzLKpmZICaWN",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -179,7 +196,12 @@ ...@@ -179,7 +196,12 @@
"metadata": { "metadata": {
"id": "7MqDQO0KCaWS", "id": "7MqDQO0KCaWS",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -258,7 +280,12 @@ ...@@ -258,7 +280,12 @@
"metadata": { "metadata": {
"id": "IjnLH5S2CaWx", "id": "IjnLH5S2CaWx",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -284,7 +311,12 @@ ...@@ -284,7 +311,12 @@
"metadata": { "metadata": {
"id": "zW5k_xz1CaWX", "id": "zW5k_xz1CaWX",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -307,7 +339,12 @@ ...@@ -307,7 +339,12 @@
"metadata": { "metadata": {
"id": "TRFYHB2mCaWb", "id": "TRFYHB2mCaWb",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -330,7 +367,12 @@ ...@@ -330,7 +367,12 @@
"metadata": { "metadata": {
"id": "XKnCTHz4CaWg", "id": "XKnCTHz4CaWg",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -353,7 +395,12 @@ ...@@ -353,7 +395,12 @@
"metadata": { "metadata": {
"id": "2KFnYlcwCaWl", "id": "2KFnYlcwCaWl",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -376,7 +423,12 @@ ...@@ -376,7 +423,12 @@
"metadata": { "metadata": {
"id": "iJmPr5-ACaWn", "id": "iJmPr5-ACaWn",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -401,7 +453,12 @@ ...@@ -401,7 +453,12 @@
"metadata": { "metadata": {
"id": "m4VEw8Ud9Quh", "id": "m4VEw8Ud9Quh",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -423,22 +480,6 @@ ...@@ -423,22 +480,6 @@
"We will scale these values to a range of 0 to 1 before feeding to the neural network model. For this, cast the datatype of the image components from and integer to a float, and divide by 255. Here's the function to preprocess the images:" "We will scale these values to a range of 0 to 1 before feeding to the neural network model. For this, cast the datatype of the image components from and integer to a float, and divide by 255. Here's the function to preprocess the images:"
] ]
}, },
{
"metadata": {
"id": "DSD9qKcqCaWs",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"def preprocess(images):\n",
" images = images.astype(np.float32)\n",
" images = images / 255\n",
" return images"
],
"execution_count": 0,
"outputs": []
},
{ {
"metadata": { "metadata": {
"id": "3jCZdQNNCaWv", "id": "3jCZdQNNCaWv",
...@@ -453,13 +494,18 @@ ...@@ -453,13 +494,18 @@
"metadata": { "metadata": {
"id": "bW5WzIPlCaWv", "id": "bW5WzIPlCaWv",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
"train_images = preprocess(train_images)\n", "train_images = train_images / 255.0\n",
"\n", "\n",
"test_images = preprocess(test_images)" "test_images = test_images / 255.0"
], ],
"execution_count": 0, "execution_count": 0,
"outputs": [] "outputs": []
...@@ -478,7 +524,12 @@ ...@@ -478,7 +524,12 @@
"metadata": { "metadata": {
"id": "oZTImqg_CaW1", "id": "oZTImqg_CaW1",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -527,7 +578,12 @@ ...@@ -527,7 +578,12 @@
"metadata": { "metadata": {
"id": "9ODch-OFCaW4", "id": "9ODch-OFCaW4",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -564,7 +620,12 @@ ...@@ -564,7 +620,12 @@
"metadata": { "metadata": {
"id": "Lhan11blCaW7", "id": "Lhan11blCaW7",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -597,7 +658,12 @@ ...@@ -597,7 +658,12 @@
"metadata": { "metadata": {
"id": "xvwvpA64CaW_", "id": "xvwvpA64CaW_",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -632,7 +698,12 @@ ...@@ -632,7 +698,12 @@
"metadata": { "metadata": {
"id": "VflXLEeECaXC", "id": "VflXLEeECaXC",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -669,7 +740,12 @@ ...@@ -669,7 +740,12 @@
"metadata": { "metadata": {
"id": "Gl91RPhdCaXI", "id": "Gl91RPhdCaXI",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -692,7 +768,12 @@ ...@@ -692,7 +768,12 @@
"metadata": { "metadata": {
"id": "3DmJEUinCaXK", "id": "3DmJEUinCaXK",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -715,7 +796,12 @@ ...@@ -715,7 +796,12 @@
"metadata": { "metadata": {
"id": "qsqenuPnCaXO", "id": "qsqenuPnCaXO",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -738,7 +824,12 @@ ...@@ -738,7 +824,12 @@
"metadata": { "metadata": {
"id": "Sd7Pgsu6CaXP", "id": "Sd7Pgsu6CaXP",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -761,7 +852,12 @@ ...@@ -761,7 +852,12 @@
"metadata": { "metadata": {
"id": "YGBDAiziCaXR", "id": "YGBDAiziCaXR",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -802,7 +898,12 @@ ...@@ -802,7 +898,12 @@
"metadata": { "metadata": {
"id": "yRJ7JU7JCaXT", "id": "yRJ7JU7JCaXT",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -828,7 +929,12 @@ ...@@ -828,7 +929,12 @@
"metadata": { "metadata": {
"id": "lDFh5yF_CaXW", "id": "lDFh5yF_CaXW",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -854,7 +960,12 @@ ...@@ -854,7 +960,12 @@
"metadata": { "metadata": {
"id": "o_rzNSdrCaXY", "id": "o_rzNSdrCaXY",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -879,7 +990,12 @@ ...@@ -879,7 +990,12 @@
"metadata": { "metadata": {
"id": "2tRmdq_8CaXb", "id": "2tRmdq_8CaXb",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -904,7 +1020,12 @@ ...@@ -904,7 +1020,12 @@
"metadata": { "metadata": {
"id": "fzHAx2M99WCd", "id": "fzHAx2M99WCd",
"colab_type": "code", "colab_type": "code",
"colab": {} "colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
......
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