Skip to content

Commit 14cc784

Browse files
committed
Use timestamp for imagenet inception model export
1 parent 9e8afeb commit 14cc784

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/image-classifier/inception.ipynb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@
7474
"colab": {}
7575
},
7676
"source": [
77+
"import time\n",
7778
"import tensorflow as tf\n",
7879
"import tensorflow_hub as hub\n",
7980
"from tensorflow.python.saved_model.signature_def_utils_impl import predict_signature_def\n",
8081
"\n",
81-
"export_dir = \"export/1\"\n",
82+
"export_dir = \"export/\" + str(time.time()).split('.')[0]\n",
8283
"builder = tf.saved_model.builder.SavedModelBuilder(export_dir)\n",
8384
"\n",
8485
"with tf.Session(graph=tf.Graph()) as sess:\n",
@@ -130,8 +131,8 @@
130131
"metadata": {
131132
"id": "4xcDWxqCBPre",
132133
"colab_type": "code",
133-
"colab": {},
134-
"cellView": "form"
134+
"cellView": "form",
135+
"colab": {}
135136
},
136137
"source": [
137138
"AWS_ACCESS_KEY_ID = \"\" #@param {type:\"string\"}\n",
@@ -186,7 +187,7 @@
186187
" filekey = os.path.join(key, filepath[len(\"export/\"):])\n",
187188
" print(\"Uploading s3://{}/{}...\".format(bucket, filekey), end = '')\n",
188189
" s3.upload_file(filepath, bucket, filekey)\n",
189-
" print(\"\")",
190+
" print(\"\")\n",
190191
"\n",
191192
"print(\"\\nUploaded model export directory to \" + S3_UPLOAD_PATH)"
192193
],

0 commit comments

Comments
 (0)