|
153 | 153 | "import pathlib\n", |
154 | 154 | "\n", |
155 | 155 | "dataset_url = \"https://storage.googleapis.com/download.tensorflow.org/example_images/flower_photos.tgz\"\n", |
156 | | - "data_dir = tf.keras.utils.get_file('flower_photos.tar', origin=dataset_url, extract=True)\n", |
157 | | - "data_dir = pathlib.Path(data_dir).with_suffix('')" |
| 156 | + "data_dir = tf.keras.utils.get_file(\"flower_photos.tgz\", origin=dataset_url, extract=True)\n", |
| 157 | + "data_dir = pathlib.Path(data_dir).parent / \"flower_photos_extracted\" / \"flower_photos\"" |
158 | 158 | ] |
159 | 159 | }, |
160 | 160 | { |
|
1088 | 1088 | "outputs": [], |
1089 | 1089 | "source": [ |
1090 | 1090 | "classify_lite = interpreter.get_signature_runner('serving_default')\n", |
1091 | | - "classify_lite" |
| 1091 | + "print(classify_lite.get_input_details())\n", |
| 1092 | + "print(classify_lite.get_output_details())" |
1092 | 1093 | ] |
1093 | 1094 | }, |
1094 | 1095 | { |
|
1110 | 1111 | }, |
1111 | 1112 | "outputs": [], |
1112 | 1113 | "source": [ |
1113 | | - "predictions_lite = classify_lite(sequential_1_input=img_array)['outputs']\n", |
| 1114 | + "predictions_lite = classify_lite(keras_tensor_15=img_array)['output_0']\n", |
1114 | 1115 | "score_lite = tf.nn.softmax(predictions_lite)" |
1115 | 1116 | ] |
1116 | 1117 | }, |
|
1176 | 1177 | "colab": { |
1177 | 1178 | "collapsed_sections": [], |
1178 | 1179 | "name": "classification.ipynb", |
1179 | | - "toc_visible": true |
| 1180 | + "toc_visible": true |
1180 | 1181 | }, |
1181 | 1182 | "kernelspec": { |
1182 | 1183 | "display_name": "Python 3", |
|
0 commit comments