Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
d8551c9d
Commit
d8551c9d
authored
Jun 20, 2018
by
Yash Katariya
Browse files
Removed preprocess function
parent
5bb9e6f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
166 additions
and
45 deletions
+166
-45
samples/core/get_started/basic_classification.ipynb
samples/core/get_started/basic_classification.ipynb
+166
-45
No files found.
samples/core/get_started/basic_classification.ipynb
View file @
d8551c9d
...
...
@@ -5,6 +5,8 @@
"colab": {
"name": "basic_classification.ipynb",
"version": "0.3.2",
"views": {},
"default_view": {},
"provenance": [],
"private_outputs": true,
"collapsed_sections": [],
...
...
@@ -30,7 +32,12 @@
"metadata": {
"id": "_ckMIh7O7s6D",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -53,7 +60,12 @@
"metadata": {
"id": "vasWnqRgy1H4",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -122,7 +134,12 @@
"metadata": {
"id": "dzLKpmZICaWN",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -179,7 +196,12 @@
"metadata": {
"id": "7MqDQO0KCaWS",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -258,7 +280,12 @@
"metadata": {
"id": "IjnLH5S2CaWx",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -284,7 +311,12 @@
"metadata": {
"id": "zW5k_xz1CaWX",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -307,7 +339,12 @@
"metadata": {
"id": "TRFYHB2mCaWb",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -330,7 +367,12 @@
"metadata": {
"id": "XKnCTHz4CaWg",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -353,7 +395,12 @@
"metadata": {
"id": "2KFnYlcwCaWl",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -376,7 +423,12 @@
"metadata": {
"id": "iJmPr5-ACaWn",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -401,7 +453,12 @@
"metadata": {
"id": "m4VEw8Ud9Quh",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -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:"
]
},
{
"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": {
"id": "3jCZdQNNCaWv",
...
...
@@ -453,13 +494,18 @@
"metadata": {
"id": "bW5WzIPlCaWv",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
"train_images =
preprocess(
train_images
)
\n",
"train_images = train_images
/ 255.0
\n",
"\n",
"test_images =
preprocess(
test_images
)
"
"test_images = test_images
/ 255.0
"
],
"execution_count": 0,
"outputs": []
...
...
@@ -478,7 +524,12 @@
"metadata": {
"id": "oZTImqg_CaW1",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -527,7 +578,12 @@
"metadata": {
"id": "9ODch-OFCaW4",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -564,7 +620,12 @@
"metadata": {
"id": "Lhan11blCaW7",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -597,7 +658,12 @@
"metadata": {
"id": "xvwvpA64CaW_",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -632,7 +698,12 @@
"metadata": {
"id": "VflXLEeECaXC",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -669,7 +740,12 @@
"metadata": {
"id": "Gl91RPhdCaXI",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -692,7 +768,12 @@
"metadata": {
"id": "3DmJEUinCaXK",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -715,7 +796,12 @@
"metadata": {
"id": "qsqenuPnCaXO",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -738,7 +824,12 @@
"metadata": {
"id": "Sd7Pgsu6CaXP",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -761,7 +852,12 @@
"metadata": {
"id": "YGBDAiziCaXR",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -802,7 +898,12 @@
"metadata": {
"id": "yRJ7JU7JCaXT",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -828,7 +929,12 @@
"metadata": {
"id": "lDFh5yF_CaXW",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -854,7 +960,12 @@
"metadata": {
"id": "o_rzNSdrCaXY",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -879,7 +990,12 @@
"metadata": {
"id": "2tRmdq_8CaXb",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
@@ -904,7 +1020,12 @@
"metadata": {
"id": "fzHAx2M99WCd",
"colab_type": "code",
"colab": {}
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment