Skip to content

Instantly share code, notes, and snippets.

@AvikantSrivastava
Created February 11, 2021 11:51
Show Gist options
  • Save AvikantSrivastava/072d98b5514a8f4ccd352cb49da15180 to your computer and use it in GitHub Desktop.
Save AvikantSrivastava/072d98b5514a8f4ccd352cb49da15180 to your computer and use it in GitHub Desktop.
dog_breed_2.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "dog_breed_2.ipynb",
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyMfyFmzqDSVALQxBC+XZiU+",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU",
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"7c1992e29057474c8d21ba601da953c7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_55507b281c634e72a30675746e3f8382",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_d068aa8a4cbb493bb3b9da31e41d0110",
"IPY_MODEL_29fc110f17a7406eaa535e890b8ab5d7"
]
}
},
"55507b281c634e72a30675746e3f8382": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"d068aa8a4cbb493bb3b9da31e41d0110": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_7cabf7f13a5e459f8ae083baef1b560a",
"_dom_classes": [],
"description": "Dl Completed...: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_312bff7c461d440a8278ea7e6911314e"
}
},
"29fc110f17a7406eaa535e890b8ab5d7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_24f12b2049244cbea2d939fa16f9f804",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 1/1 [00:47<00:00, 47.93s/ url]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_0d477199595e450995470b73036718ac"
}
},
"7cabf7f13a5e459f8ae083baef1b560a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"312bff7c461d440a8278ea7e6911314e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"24f12b2049244cbea2d939fa16f9f804": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"0d477199595e450995470b73036718ac": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"5606ceb410024e62a570cf2a5f794438": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_4ffdcc1b727e4f8a8ba79baa98c5d5ac",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_ef123d2fb1c14b43bcba90197b1bad33",
"IPY_MODEL_ba8b3af944f84f609f5e402cedcf3118"
]
}
},
"4ffdcc1b727e4f8a8ba79baa98c5d5ac": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"ef123d2fb1c14b43bcba90197b1bad33": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_cc29409335af4f21a850324abc7446c8",
"_dom_classes": [],
"description": "Dl Size...: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_10e789d3c42a49a5b23c6b57b11c2770"
}
},
"ba8b3af944f84f609f5e402cedcf3118": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_f38f839b773c487fb6243a2f231ab4e5",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 756/756 [00:47<00:00, 15.78 MiB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_f11285a05d66451dba41158eeb39f7cf"
}
},
"cc29409335af4f21a850324abc7446c8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"10e789d3c42a49a5b23c6b57b11c2770": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"f38f839b773c487fb6243a2f231ab4e5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"f11285a05d66451dba41158eeb39f7cf": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"63b788f861c24fc283657eecc58183f5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_7e7af92dc6a44d9298d76928a1488d46",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_2a0a6a9f6a6a4fe7a308f25b8d766a86",
"IPY_MODEL_452b0c0b4a0846cfbf134c3bfa551496"
]
}
},
"7e7af92dc6a44d9298d76928a1488d46": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"2a0a6a9f6a6a4fe7a308f25b8d766a86": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_41f2d1f541f7480d841029648c90b7c6",
"_dom_classes": [],
"description": "Dl Completed...: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_dedad60df7df4d2c8195ec78c9940efe"
}
},
"452b0c0b4a0846cfbf134c3bfa551496": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_c16c3d071bdc456c9f2154ad7c33483e",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2/2 [00:10<00:00, 5.48s/ url]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_15f0b1b703e44ec28e5f1b4a02bb0375"
}
},
"41f2d1f541f7480d841029648c90b7c6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"dedad60df7df4d2c8195ec78c9940efe": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"c16c3d071bdc456c9f2154ad7c33483e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"15f0b1b703e44ec28e5f1b4a02bb0375": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"3d716148ec5c4b649e346cd9399acbc3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_7f9f482ef3b745f586a6a90d0ce19c4b",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_624fade1760b4999a7df3799aecbf449",
"IPY_MODEL_02bbd151cdf44ceeb851bc28e9c27734"
]
}
},
"7f9f482ef3b745f586a6a90d0ce19c4b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"624fade1760b4999a7df3799aecbf449": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_aab8f8c6c1a44422971f5bc2aa777020",
"_dom_classes": [],
"description": "Dl Size...: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_d4007aa710724386942e5e7aae928224"
}
},
"02bbd151cdf44ceeb851bc28e9c27734": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_c58035db44b74c708906f86f018b559d",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 20/20 [00:10<00:00, 1.83 MiB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_d055453a7d0b44d0a1f6432863dbf962"
}
},
"aab8f8c6c1a44422971f5bc2aa777020": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"d4007aa710724386942e5e7aae928224": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"c58035db44b74c708906f86f018b559d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"d055453a7d0b44d0a1f6432863dbf962": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"fadec0d88ee64762995fa0f4d2e25a8b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_373334208c774732bc13356fba8529dc",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_bf2ad6b924aa47a4abafc91ef130394e",
"IPY_MODEL_c3994e03213248089fba3c10b68bc560"
]
}
},
"373334208c774732bc13356fba8529dc": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"bf2ad6b924aa47a4abafc91ef130394e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_b6839a303b694034bb214e2f22dce756",
"_dom_classes": [],
"description": "Extraction completed...: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_0d43aa6acdc24bfcb17203b155fcae7a"
}
},
"c3994e03213248089fba3c10b68bc560": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_178aad391e2a4ea7b0735f769f496065",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2/2 [00:10<00:00, 5.44s/ file]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_b09408d453a440108cf17de4348952d2"
}
},
"b6839a303b694034bb214e2f22dce756": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"0d43aa6acdc24bfcb17203b155fcae7a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"178aad391e2a4ea7b0735f769f496065": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"b09408d453a440108cf17de4348952d2": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"84645be906e64ac9b30f1367f5c9758e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_bfba917ec33a452e87e22d458c533a4c",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_0428bdbe0b764b7b83f2173b0a125b4a",
"IPY_MODEL_d1bccc4f14144c438efcf25da215b69f"
]
}
},
"bfba917ec33a452e87e22d458c533a4c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"0428bdbe0b764b7b83f2173b0a125b4a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_76739efa9d25443592d9d920309cb738",
"_dom_classes": [],
"description": "",
"_model_name": "FloatProgressModel",
"bar_style": "info",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_33e472c303dd4dc0b75a30107f5df579"
}
},
"d1bccc4f14144c438efcf25da215b69f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_e95b8fb597674763981c08c30476ac33",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 12000/0 [00:15<00:00, 783.73 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_dfdb901cc69946adbac1f50cdef661b6"
}
},
"76739efa9d25443592d9d920309cb738": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"33e472c303dd4dc0b75a30107f5df579": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"e95b8fb597674763981c08c30476ac33": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"dfdb901cc69946adbac1f50cdef661b6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"f1d03c6887dd48718c13720e69106f7a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_75d5613df0dc4c98a5bba237c65ea786",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_f88a44d158844eca9a916585805c3d4b",
"IPY_MODEL_5cd5fad9d629473aa3b0b0c26d749a9d"
]
}
},
"75d5613df0dc4c98a5bba237c65ea786": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"f88a44d158844eca9a916585805c3d4b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_8c018b4721974e7aa127a15c17ea5c9c",
"_dom_classes": [],
"description": " 99%",
"_model_name": "FloatProgressModel",
"bar_style": "danger",
"max": 12000,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 11906,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_ce5d5721011146089504ab6082b03743"
}
},
"5cd5fad9d629473aa3b0b0c26d749a9d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_1f3999dfa5394371b5d07412cf9fb705",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 11906/12000 [00:01<00:00, 7434.55 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_971fcf2b4484415f8f2aada0539580f2"
}
},
"8c018b4721974e7aa127a15c17ea5c9c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"ce5d5721011146089504ab6082b03743": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"1f3999dfa5394371b5d07412cf9fb705": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"971fcf2b4484415f8f2aada0539580f2": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"9e3bceb708664d48877f4d207e06e763": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_5a5d320dfb6949fc8b55193baed3793b",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_b76daf6c8474419b987a2dea6e3b70ba",
"IPY_MODEL_45702a7c3d0d4d109e19bc7d61d4e5b8"
]
}
},
"5a5d320dfb6949fc8b55193baed3793b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"b76daf6c8474419b987a2dea6e3b70ba": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_4c89489501c84b50bf72f64a0212381e",
"_dom_classes": [],
"description": "",
"_model_name": "FloatProgressModel",
"bar_style": "info",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_57885ac4508e4c08a384539236c15155"
}
},
"45702a7c3d0d4d109e19bc7d61d4e5b8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_0716526d97d0416c9b07bc80f9d2883f",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 8580/0 [00:11<00:00, 685.63 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_2aa274dbe59d48f0b23f2da6a5c24df3"
}
},
"4c89489501c84b50bf72f64a0212381e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"57885ac4508e4c08a384539236c15155": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"0716526d97d0416c9b07bc80f9d2883f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"2aa274dbe59d48f0b23f2da6a5c24df3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"598b2dc527324297852e60b4d2706a85": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_86144ea18f384df2b085e6ba1418bd09",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_b967685a18ea45818fa4478bb66a2d09",
"IPY_MODEL_aa29dfa3604740cb874e0f480b9bfde5"
]
}
},
"86144ea18f384df2b085e6ba1418bd09": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"b967685a18ea45818fa4478bb66a2d09": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_8bc0ddd4d9264fe090687d8a827c0328",
"_dom_classes": [],
"description": " 95%",
"_model_name": "FloatProgressModel",
"bar_style": "danger",
"max": 8580,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 8151,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_3849d1147ad7403dbd3eae841b660d34"
}
},
"aa29dfa3604740cb874e0f480b9bfde5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_55d3b9aadf6d443ebe8262fd69aa3853",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 8151/8580 [00:06<00:00, 12206.67 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_996d19a80f094a039e8cfbef146bc503"
}
},
"8bc0ddd4d9264fe090687d8a827c0328": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"3849d1147ad7403dbd3eae841b660d34": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"55d3b9aadf6d443ebe8262fd69aa3853": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"996d19a80f094a039e8cfbef146bc503": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"7c9037420fd648c9bf9ec38574b8a4d1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_44d33dc739d84fa9a0932c301d770368",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_405daf80ff2c40fba0f532b1fdc11120",
"IPY_MODEL_1759935fe0c04c00884601d259cbb8b6"
]
}
},
"44d33dc739d84fa9a0932c301d770368": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"405daf80ff2c40fba0f532b1fdc11120": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_887dfdf88dcf467abd0b321790fd71cf",
"_dom_classes": [],
"description": "Computing statistics...: 100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 2,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 2,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_77f3aa5bd6d74ca6b2edd00e3606a80c"
}
},
"1759935fe0c04c00884601d259cbb8b6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_ccfa50636cee4645a292644e05a9469a",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2/2 [1:47:06<00:00, 3213.28s/ split]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_6e23ab07f5d14a598d7020fb9cb527c7"
}
},
"887dfdf88dcf467abd0b321790fd71cf": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"77f3aa5bd6d74ca6b2edd00e3606a80c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"ccfa50636cee4645a292644e05a9469a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"6e23ab07f5d14a598d7020fb9cb527c7": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"2d43ea7ee71b458cb3eb5d007b39fefa": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_650f1c1dbc8a4eb19f2caaccb4578ae9",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_6e4599947f164278a471e00e1d7e6d64",
"IPY_MODEL_98a66d120c2a4d268146d420962a24f8"
]
}
},
"650f1c1dbc8a4eb19f2caaccb4578ae9": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"6e4599947f164278a471e00e1d7e6d64": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_ff2496aceeae46cabce4d5467c09ef81",
"_dom_classes": [],
"description": "",
"_model_name": "FloatProgressModel",
"bar_style": "info",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_c3e6f08635bf4a02b2b995bd108d016c"
}
},
"98a66d120c2a4d268146d420962a24f8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_79a81ffa2ec04bcb82a584d0edb933bf",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 8580/? [00:21<00:00, 408.84 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_86af6b5da4d443e9a61a42bd01dc6946"
}
},
"ff2496aceeae46cabce4d5467c09ef81": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"c3e6f08635bf4a02b2b995bd108d016c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"79a81ffa2ec04bcb82a584d0edb933bf": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"86af6b5da4d443e9a61a42bd01dc6946": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"1c35dd690b65475c9c67980539b4bfe4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_70d0103e9e524c9eb79c0120efe37b0b",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_d26e23c833094c968eb13d024afcd1dc",
"IPY_MODEL_7e6662d4dc1845de8240e5d36e3a7dc1"
]
}
},
"70d0103e9e524c9eb79c0120efe37b0b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"d26e23c833094c968eb13d024afcd1dc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_fd56a75718004632ad9f03ddfff9cead",
"_dom_classes": [],
"description": "",
"_model_name": "FloatProgressModel",
"bar_style": "info",
"max": 1,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 1,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_f528c7d1234142b38a20982edc818a1f"
}
},
"7e6662d4dc1845de8240e5d36e3a7dc1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_fdea3dbdc9cd474f8e053c217a759765",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "​",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 12000/? [00:29<00:00, 387.37 examples/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_e3681dbe9ab94d179e1f3cc3503c82e5"
}
},
"fd56a75718004632ad9f03ddfff9cead": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "initial",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"f528c7d1234142b38a20982edc818a1f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"fdea3dbdc9cd474f8e053c217a759765": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_view_name": "StyleView",
"_model_name": "DescriptionStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"_model_module": "@jupyter-widgets/controls"
}
},
"e3681dbe9ab94d179e1f3cc3503c82e5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
}
}
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/AvikantSrivastava/072d98b5514a8f4ccd352cb49da15180/dog_breed_2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"id": "cyKYue_WzVfe",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"outputId": "dd2ca389-2f40-4432-e6ea-516f4eedd365"
},
"source": [
"import tensorflow as tf\n",
"import tensorflow_datasets as tfds\n",
"tf.__version__"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
},
"text/plain": [
"'2.3.0'"
]
},
"metadata": {
"tags": []
},
"execution_count": 1
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "1TPVS6wL4Pjt"
},
"source": [
"import PIL\n",
"from PIL import Image\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from IPython.display import Image as Image1\n"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "DFwuFWzJzbLW"
},
"source": [
"data = tfds.builder('stanford_dogs')\n"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "yx27IkLw75Ye"
},
"source": [
"# getting class labels\n",
"# !wget http://vision.stanford.edu/aditya86/ImageNetDogs/lists.tar\n",
"!tar -xf lists.tar "
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "-nv8nJRj8QlB"
},
"source": [
"get_name = data.info.features['label'].int2str"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "e9Vl_hCT_cjZ",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"outputId": "6bc5fd88-9c7e-4783-e48d-3e4c0a92ea2e"
},
"source": [
"get_name(0)"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
},
"text/plain": [
"'n02085620-chihuahua'"
]
},
"metadata": {
"tags": []
},
"execution_count": 4
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "PqM4h3aQn0Rm"
},
"source": [
"names = []\n",
"\n",
"for i in range(120):\n",
" name = get_name(i)\n",
" names.append(name)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "0mtSMc2foD5r"
},
"source": [
"with open('your_file.txt', 'w') as f:\n",
" for name in names:\n",
" f.write(\"%s\\n\" % name)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "LYTQkS26zjeU",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "bf115bfe-72cc-4905-e9f0-7e5ae637f297"
},
"source": [
"w to convet print(\n",
" # data.info.features['image'].shape,\n",
"data.info.features['label'].shape)\n",
"# data.info.features['train'].shape"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"()\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "oUgkHIY7zsLO",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 582,
"referenced_widgets": [
"7c1992e29057474c8d21ba601da953c7",
"55507b281c634e72a30675746e3f8382",
"d068aa8a4cbb493bb3b9da31e41d0110",
"29fc110f17a7406eaa535e890b8ab5d7",
"7cabf7f13a5e459f8ae083baef1b560a",
"312bff7c461d440a8278ea7e6911314e",
"24f12b2049244cbea2d939fa16f9f804",
"0d477199595e450995470b73036718ac",
"5606ceb410024e62a570cf2a5f794438",
"4ffdcc1b727e4f8a8ba79baa98c5d5ac",
"ef123d2fb1c14b43bcba90197b1bad33",
"ba8b3af944f84f609f5e402cedcf3118",
"cc29409335af4f21a850324abc7446c8",
"10e789d3c42a49a5b23c6b57b11c2770",
"f38f839b773c487fb6243a2f231ab4e5",
"f11285a05d66451dba41158eeb39f7cf",
"63b788f861c24fc283657eecc58183f5",
"7e7af92dc6a44d9298d76928a1488d46",
"2a0a6a9f6a6a4fe7a308f25b8d766a86",
"452b0c0b4a0846cfbf134c3bfa551496",
"41f2d1f541f7480d841029648c90b7c6",
"dedad60df7df4d2c8195ec78c9940efe",
"c16c3d071bdc456c9f2154ad7c33483e",
"15f0b1b703e44ec28e5f1b4a02bb0375",
"3d716148ec5c4b649e346cd9399acbc3",
"7f9f482ef3b745f586a6a90d0ce19c4b",
"624fade1760b4999a7df3799aecbf449",
"02bbd151cdf44ceeb851bc28e9c27734",
"aab8f8c6c1a44422971f5bc2aa777020",
"d4007aa710724386942e5e7aae928224",
"c58035db44b74c708906f86f018b559d",
"d055453a7d0b44d0a1f6432863dbf962",
"fadec0d88ee64762995fa0f4d2e25a8b",
"373334208c774732bc13356fba8529dc",
"bf2ad6b924aa47a4abafc91ef130394e",
"c3994e03213248089fba3c10b68bc560",
"b6839a303b694034bb214e2f22dce756",
"0d43aa6acdc24bfcb17203b155fcae7a",
"178aad391e2a4ea7b0735f769f496065",
"b09408d453a440108cf17de4348952d2",
"84645be906e64ac9b30f1367f5c9758e",
"bfba917ec33a452e87e22d458c533a4c",
"0428bdbe0b764b7b83f2173b0a125b4a",
"d1bccc4f14144c438efcf25da215b69f",
"76739efa9d25443592d9d920309cb738",
"33e472c303dd4dc0b75a30107f5df579",
"e95b8fb597674763981c08c30476ac33",
"dfdb901cc69946adbac1f50cdef661b6",
"f1d03c6887dd48718c13720e69106f7a",
"75d5613df0dc4c98a5bba237c65ea786",
"f88a44d158844eca9a916585805c3d4b",
"5cd5fad9d629473aa3b0b0c26d749a9d",
"8c018b4721974e7aa127a15c17ea5c9c",
"ce5d5721011146089504ab6082b03743",
"1f3999dfa5394371b5d07412cf9fb705",
"971fcf2b4484415f8f2aada0539580f2",
"9e3bceb708664d48877f4d207e06e763",
"5a5d320dfb6949fc8b55193baed3793b",
"b76daf6c8474419b987a2dea6e3b70ba",
"45702a7c3d0d4d109e19bc7d61d4e5b8",
"4c89489501c84b50bf72f64a0212381e",
"57885ac4508e4c08a384539236c15155",
"0716526d97d0416c9b07bc80f9d2883f",
"2aa274dbe59d48f0b23f2da6a5c24df3",
"598b2dc527324297852e60b4d2706a85",
"86144ea18f384df2b085e6ba1418bd09",
"b967685a18ea45818fa4478bb66a2d09",
"aa29dfa3604740cb874e0f480b9bfde5",
"8bc0ddd4d9264fe090687d8a827c0328",
"3849d1147ad7403dbd3eae841b660d34",
"55d3b9aadf6d443ebe8262fd69aa3853",
"996d19a80f094a039e8cfbef146bc503",
"7c9037420fd648c9bf9ec38574b8a4d1",
"44d33dc739d84fa9a0932c301d770368",
"405daf80ff2c40fba0f532b1fdc11120",
"1759935fe0c04c00884601d259cbb8b6",
"887dfdf88dcf467abd0b321790fd71cf",
"77f3aa5bd6d74ca6b2edd00e3606a80c",
"ccfa50636cee4645a292644e05a9469a",
"6e23ab07f5d14a598d7020fb9cb527c7",
"2d43ea7ee71b458cb3eb5d007b39fefa",
"650f1c1dbc8a4eb19f2caaccb4578ae9",
"6e4599947f164278a471e00e1d7e6d64",
"98a66d120c2a4d268146d420962a24f8",
"ff2496aceeae46cabce4d5467c09ef81",
"c3e6f08635bf4a02b2b995bd108d016c",
"79a81ffa2ec04bcb82a584d0edb933bf",
"86af6b5da4d443e9a61a42bd01dc6946",
"1c35dd690b65475c9c67980539b4bfe4",
"70d0103e9e524c9eb79c0120efe37b0b",
"d26e23c833094c968eb13d024afcd1dc",
"7e6662d4dc1845de8240e5d36e3a7dc1",
"fd56a75718004632ad9f03ddfff9cead",
"f528c7d1234142b38a20982edc818a1f",
"fdea3dbdc9cd474f8e053c217a759765",
"e3681dbe9ab94d179e1f3cc3503c82e5"
]
},
"outputId": "7d0751db-deea-4dbf-f143-2388bb4b5bdb"
},
"source": [
"data.download_and_prepare()"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"\u001b[1mDownloading and preparing dataset stanford_dogs/0.2.0 (download: 778.12 MiB, generated: Unknown size, total: 778.12 MiB) to /root/tensorflow_datasets/stanford_dogs/0.2.0...\u001b[0m\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7c1992e29057474c8d21ba601da953c7",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Dl Completed...', max=1.0, style=Progre…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5606ceb410024e62a570cf2a5f794438",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Dl Size...', max=1.0, style=ProgressSty…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"\n",
"\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "63b788f861c24fc283657eecc58183f5",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Dl Completed...', max=1.0, style=Progre…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3d716148ec5c4b649e346cd9399acbc3",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Dl Size...', max=1.0, style=ProgressSty…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fadec0d88ee64762995fa0f4d2e25a8b",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Extraction completed...', max=1.0, styl…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "84645be906e64ac9b30f1367f5c9758e",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\rShuffling and writing examples to /root/tensorflow_datasets/stanford_dogs/0.2.0.incompleteR4AMZR/stanford_dogs-train.tfrecord\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f1d03c6887dd48718c13720e69106f7a",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=12000.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\r"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9e3bceb708664d48877f4d207e06e763",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\rShuffling and writing examples to /root/tensorflow_datasets/stanford_dogs/0.2.0.incompleteR4AMZR/stanford_dogs-test.tfrecord\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "598b2dc527324297852e60b4d2706a85",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=8580.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7c9037420fd648c9bf9ec38574b8a4d1",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Computing statistics...', max=2.0, style=ProgressStyle(de…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\r"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2d43ea7ee71b458cb3eb5d007b39fefa",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"ERROR:absl:Statistics generation doesn't work for nested structures yet\n"
],
"name": "stderr"
},
{
"output_type": "stream",
"text": [
"\r"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1c35dd690b65475c9c67980539b4bfe4",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"ERROR:absl:Statistics generation doesn't work for nested structures yet\n"
],
"name": "stderr"
},
{
"output_type": "stream",
"text": [
"\r\n",
"\u001b[1mDataset stanford_dogs downloaded and prepared to /root/tensorflow_datasets/stanford_dogs/0.2.0. Subsequent calls will reuse this data.\u001b[0m\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "rFEesBF6z7rX"
},
"source": [
"dataset = data.as_dataset()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "HMo7iY6f1Mnf"
},
"source": [
"train_dataset, test_dataset = dataset['train'], dataset['test']\n"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "YEro2OiaVpJz"
},
"source": [
"def get_images(features):\n",
" image = features['image']\n",
" image = tf.image.resize(\n",
" image, (), \n",
" method=ResizeMethod.BILINEAR, \n",
" preserve_aspect_ratio=False)\n",
" return image\n",
"\n",
"def get_labels(features):\n",
" # print(features['label'])\n",
" one_hotted = tf.one_hot(features['label'], 120)\n",
" return one_hotted\n",
"\n",
"def get_data(features):\n",
" # print(features['label'])\n",
" one_hotted = tf.one_hot(features['label'], 120)\n",
" image = features['image']\n",
" image = tf.image.resize(\n",
" image, [224,224], \n",
" # method=ResizeMethod.BILINEAR, \n",
" preserve_aspect_ratio=False)\n",
" return image,one_hotted\n"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "YC9GMdx4Zeyj",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "b437e1a6-a353-4e3a-d190-d6ba8a231b36"
},
"source": [
"for example in train_dataset.take(1): # Only take a single example\n",
" image, label = example[\"image\"], example[\"label\"]\n",
" print(label)\n"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"tf.Tensor(36, shape=(), dtype=int64)\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "lUVowRNnVjgk",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 408
},
"outputId": "877ab313-d9c0-4787-b1a3-9799e54f7c5b"
},
"source": [
"x_train = train_dataset.map(get_images).batch(32)\n",
"y_train = train_dataset.map(get_labels).batch(32)"
],
"execution_count": null,
"outputs": [
{
"output_type": "error",
"ename": "NameError",
"evalue": "ignored",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-10-bc5b5ce9477a>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mx_train\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtrain_dataset\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmap\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mget_images\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbatch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m32\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0my_train\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtrain_dataset\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmap\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mget_labels\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbatch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m32\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/dataset_ops.py\u001b[0m in \u001b[0;36mmap\u001b[0;34m(self, map_func, num_parallel_calls, deterministic)\u001b[0m\n\u001b[1;32m 2507\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mnum_parallel_calls\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2508\u001b[0m return DatasetV1Adapter(\n\u001b[0;32m-> 2509\u001b[0;31m MapDataset(self, map_func, preserve_cardinality=False))\n\u001b[0m\u001b[1;32m 2510\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2511\u001b[0m return DatasetV1Adapter(\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/dataset_ops.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, input_dataset, map_func, use_inter_op_parallelism, preserve_cardinality, use_legacy_function)\u001b[0m\n\u001b[1;32m 4043\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_transformation_name\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4044\u001b[0m \u001b[0mdataset\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0minput_dataset\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4045\u001b[0;31m use_legacy_function=use_legacy_function)\n\u001b[0m\u001b[1;32m 4046\u001b[0m variant_tensor = gen_dataset_ops.map_dataset(\n\u001b[1;32m 4047\u001b[0m \u001b[0minput_dataset\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_variant_tensor\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;31m# pylint: disable=protected-access\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/dataset_ops.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, func, transformation_name, dataset, input_classes, input_shapes, input_types, input_structure, add_to_graph, use_legacy_function, defun_kwargs)\u001b[0m\n\u001b[1;32m 3369\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mtracking\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresource_tracker_scope\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresource_tracker\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3370\u001b[0m \u001b[0;31m# TODO(b/141462134): Switch to using garbage collection.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3371\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_function\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mwrapper_fn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_concrete_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3372\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0madd_to_graph\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3373\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_function\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd_to_graph\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mops\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_default_graph\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36mget_concrete_function\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 2937\u001b[0m \"\"\"\n\u001b[1;32m 2938\u001b[0m graph_function = self._get_concrete_function_garbage_collected(\n\u001b[0;32m-> 2939\u001b[0;31m *args, **kwargs)\n\u001b[0m\u001b[1;32m 2940\u001b[0m \u001b[0mgraph_function\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_garbage_collector\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrelease\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# pylint: disable=protected-access\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2941\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mgraph_function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36m_get_concrete_function_garbage_collected\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 2904\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2905\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_lock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2906\u001b[0;31m \u001b[0mgraph_function\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_maybe_define_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2907\u001b[0m \u001b[0mseen_names\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2908\u001b[0m captured = object_identity.ObjectIdentitySet(\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36m_maybe_define_function\u001b[0;34m(self, args, kwargs)\u001b[0m\n\u001b[1;32m 3211\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3212\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_function_cache\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmissed\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcall_context_key\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3213\u001b[0;31m \u001b[0mgraph_function\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_create_graph_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3214\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_function_cache\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprimary\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcache_key\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgraph_function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3215\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mgraph_function\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36m_create_graph_function\u001b[0;34m(self, args, kwargs, override_flat_arg_shapes)\u001b[0m\n\u001b[1;32m 3073\u001b[0m \u001b[0marg_names\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0marg_names\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3074\u001b[0m \u001b[0moverride_flat_arg_shapes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0moverride_flat_arg_shapes\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3075\u001b[0;31m capture_by_value=self._capture_by_value),\n\u001b[0m\u001b[1;32m 3076\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_function_attributes\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3077\u001b[0m \u001b[0mfunction_spec\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfunction_spec\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/func_graph.py\u001b[0m in \u001b[0;36mfunc_graph_from_py_func\u001b[0;34m(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, override_flat_arg_shapes)\u001b[0m\n\u001b[1;32m 984\u001b[0m \u001b[0m_\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moriginal_func\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtf_decorator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0munwrap\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpython_func\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 985\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 986\u001b[0;31m \u001b[0mfunc_outputs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpython_func\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mfunc_args\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mfunc_kwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 987\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 988\u001b[0m \u001b[0;31m# invariant: `func_outputs` contains only Tensors, CompositeTensors,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/dataset_ops.py\u001b[0m in \u001b[0;36mwrapper_fn\u001b[0;34m(*args)\u001b[0m\n\u001b[1;32m 3362\u001b[0m attributes=defun_kwargs)\n\u001b[1;32m 3363\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mwrapper_fn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m# pylint: disable=missing-docstring\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3364\u001b[0;31m \u001b[0mret\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_wrapper_helper\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3365\u001b[0m \u001b[0mret\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstructure\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mto_tensor_list\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_output_structure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mret\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3366\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mops\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconvert_to_tensor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mt\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mret\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/dataset_ops.py\u001b[0m in \u001b[0;36m_wrapper_helper\u001b[0;34m(*args)\u001b[0m\n\u001b[1;32m 3297\u001b[0m \u001b[0mnested_args\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mnested_args\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3298\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3299\u001b[0;31m \u001b[0mret\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mautograph\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtf_convert\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mag_ctx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mnested_args\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3300\u001b[0m \u001b[0;31m# If `func` returns a list of tensors, `nest.flatten()` and\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3301\u001b[0m \u001b[0;31m# `ops.convert_to_tensor()` would conspire to attempt to stack\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/autograph/impl/api.py\u001b[0m in \u001b[0;36mwrapper\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 256\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m# pylint:disable=broad-except\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 257\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhasattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'ag_error_metadata'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 258\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mag_error_metadata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mto_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 259\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 260\u001b[0m \u001b[0;32mraise\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mNameError\u001b[0m: in user code:\n\n <ipython-input-8-6064e0495a43>:3 get_images *\n image = tf.image.resize(\n\n NameError: name 'ResizeMethod' is not defined\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "NujO5rN9ej7r"
},
"source": [
"train_data = train_dataset.map(get_data).batch(64)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "uyWTJb_6xAJk"
},
"source": [
"test_data = test_dataset.map(get_data).batch(64)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "hEcU9WcIxkru",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "67f353b2-6f28-4283-94be-e541b8074c2c"
},
"source": [
"train_data"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<DatasetV1Adapter shapes: ((None, 224, 224, 3), (None, 120)), types: (tf.float32, tf.float32)>"
]
},
"metadata": {
"tags": []
},
"execution_count": 12
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "6r4WRvDn1PQP",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 51
},
"outputId": "a9aca9b4-84ea-46a5-f799-e6b231570e02"
},
"source": [
"mobile_net_base_model = tf.keras.applications.MobileNetV2(\n",
" input_shape=(224, 224, 3), alpha=1.0, include_top=0, weights='imagenet',\n",
" classes= 120 , classifier_activation='softmax')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Downloading data from https://storage.googleapis.com/tensorflow/keras-applications/mobilenet_v2/mobilenet_v2_weights_tf_dim_ordering_tf_kernels_1.0_224_no_top.h5\n",
"9412608/9406464 [==============================] - 0s 0us/step\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "cuUYCKaw1mRs",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"outputId": "9ac079bf-17b8-4e9b-b699-47ce4a250879"
},
"source": [
"mobile_net_base_model.summary()"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Model: \"mobilenetv2_1.00_224\"\n",
"__________________________________________________________________________________________________\n",
"Layer (type) Output Shape Param # Connected to \n",
"==================================================================================================\n",
"input_1 (InputLayer) [(None, 224, 224, 3) 0 \n",
"__________________________________________________________________________________________________\n",
"Conv1_pad (ZeroPadding2D) (None, 225, 225, 3) 0 input_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"Conv1 (Conv2D) (None, 112, 112, 32) 864 Conv1_pad[0][0] \n",
"__________________________________________________________________________________________________\n",
"bn_Conv1 (BatchNormalization) (None, 112, 112, 32) 128 Conv1[0][0] \n",
"__________________________________________________________________________________________________\n",
"Conv1_relu (ReLU) (None, 112, 112, 32) 0 bn_Conv1[0][0] \n",
"__________________________________________________________________________________________________\n",
"expanded_conv_depthwise (Depthw (None, 112, 112, 32) 288 Conv1_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"expanded_conv_depthwise_BN (Bat (None, 112, 112, 32) 128 expanded_conv_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"expanded_conv_depthwise_relu (R (None, 112, 112, 32) 0 expanded_conv_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"expanded_conv_project (Conv2D) (None, 112, 112, 16) 512 expanded_conv_depthwise_relu[0][0\n",
"__________________________________________________________________________________________________\n",
"expanded_conv_project_BN (Batch (None, 112, 112, 16) 64 expanded_conv_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1_expand (Conv2D) (None, 112, 112, 96) 1536 expanded_conv_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1_expand_BN (BatchNormali (None, 112, 112, 96) 384 block_1_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1_expand_relu (ReLU) (None, 112, 112, 96) 0 block_1_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1_pad (ZeroPadding2D) (None, 113, 113, 96) 0 block_1_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1_depthwise (DepthwiseCon (None, 56, 56, 96) 864 block_1_pad[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1_depthwise_BN (BatchNorm (None, 56, 56, 96) 384 block_1_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1_depthwise_relu (ReLU) (None, 56, 56, 96) 0 block_1_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1_project (Conv2D) (None, 56, 56, 24) 2304 block_1_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1_project_BN (BatchNormal (None, 56, 56, 24) 96 block_1_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2_expand (Conv2D) (None, 56, 56, 144) 3456 block_1_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2_expand_BN (BatchNormali (None, 56, 56, 144) 576 block_2_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2_expand_relu (ReLU) (None, 56, 56, 144) 0 block_2_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2_depthwise (DepthwiseCon (None, 56, 56, 144) 1296 block_2_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2_depthwise_BN (BatchNorm (None, 56, 56, 144) 576 block_2_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2_depthwise_relu (ReLU) (None, 56, 56, 144) 0 block_2_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2_project (Conv2D) (None, 56, 56, 24) 3456 block_2_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2_project_BN (BatchNormal (None, 56, 56, 24) 96 block_2_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2_add (Add) (None, 56, 56, 24) 0 block_1_project_BN[0][0] \n",
" block_2_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3_expand (Conv2D) (None, 56, 56, 144) 3456 block_2_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3_expand_BN (BatchNormali (None, 56, 56, 144) 576 block_3_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3_expand_relu (ReLU) (None, 56, 56, 144) 0 block_3_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3_pad (ZeroPadding2D) (None, 57, 57, 144) 0 block_3_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3_depthwise (DepthwiseCon (None, 28, 28, 144) 1296 block_3_pad[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3_depthwise_BN (BatchNorm (None, 28, 28, 144) 576 block_3_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3_depthwise_relu (ReLU) (None, 28, 28, 144) 0 block_3_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3_project (Conv2D) (None, 28, 28, 32) 4608 block_3_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3_project_BN (BatchNormal (None, 28, 28, 32) 128 block_3_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4_expand (Conv2D) (None, 28, 28, 192) 6144 block_3_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4_expand_BN (BatchNormali (None, 28, 28, 192) 768 block_4_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4_expand_relu (ReLU) (None, 28, 28, 192) 0 block_4_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4_depthwise (DepthwiseCon (None, 28, 28, 192) 1728 block_4_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4_depthwise_BN (BatchNorm (None, 28, 28, 192) 768 block_4_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4_depthwise_relu (ReLU) (None, 28, 28, 192) 0 block_4_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4_project (Conv2D) (None, 28, 28, 32) 6144 block_4_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4_project_BN (BatchNormal (None, 28, 28, 32) 128 block_4_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4_add (Add) (None, 28, 28, 32) 0 block_3_project_BN[0][0] \n",
" block_4_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_5_expand (Conv2D) (None, 28, 28, 192) 6144 block_4_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_5_expand_BN (BatchNormali (None, 28, 28, 192) 768 block_5_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_5_expand_relu (ReLU) (None, 28, 28, 192) 0 block_5_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_5_depthwise (DepthwiseCon (None, 28, 28, 192) 1728 block_5_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_5_depthwise_BN (BatchNorm (None, 28, 28, 192) 768 block_5_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_5_depthwise_relu (ReLU) (None, 28, 28, 192) 0 block_5_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_5_project (Conv2D) (None, 28, 28, 32) 6144 block_5_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_5_project_BN (BatchNormal (None, 28, 28, 32) 128 block_5_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_5_add (Add) (None, 28, 28, 32) 0 block_4_add[0][0] \n",
" block_5_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_6_expand (Conv2D) (None, 28, 28, 192) 6144 block_5_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_6_expand_BN (BatchNormali (None, 28, 28, 192) 768 block_6_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_6_expand_relu (ReLU) (None, 28, 28, 192) 0 block_6_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_6_pad (ZeroPadding2D) (None, 29, 29, 192) 0 block_6_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_6_depthwise (DepthwiseCon (None, 14, 14, 192) 1728 block_6_pad[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_6_depthwise_BN (BatchNorm (None, 14, 14, 192) 768 block_6_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_6_depthwise_relu (ReLU) (None, 14, 14, 192) 0 block_6_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_6_project (Conv2D) (None, 14, 14, 64) 12288 block_6_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_6_project_BN (BatchNormal (None, 14, 14, 64) 256 block_6_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_7_expand (Conv2D) (None, 14, 14, 384) 24576 block_6_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_7_expand_BN (BatchNormali (None, 14, 14, 384) 1536 block_7_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_7_expand_relu (ReLU) (None, 14, 14, 384) 0 block_7_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_7_depthwise (DepthwiseCon (None, 14, 14, 384) 3456 block_7_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_7_depthwise_BN (BatchNorm (None, 14, 14, 384) 1536 block_7_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_7_depthwise_relu (ReLU) (None, 14, 14, 384) 0 block_7_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_7_project (Conv2D) (None, 14, 14, 64) 24576 block_7_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_7_project_BN (BatchNormal (None, 14, 14, 64) 256 block_7_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_7_add (Add) (None, 14, 14, 64) 0 block_6_project_BN[0][0] \n",
" block_7_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_8_expand (Conv2D) (None, 14, 14, 384) 24576 block_7_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_8_expand_BN (BatchNormali (None, 14, 14, 384) 1536 block_8_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_8_expand_relu (ReLU) (None, 14, 14, 384) 0 block_8_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_8_depthwise (DepthwiseCon (None, 14, 14, 384) 3456 block_8_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_8_depthwise_BN (BatchNorm (None, 14, 14, 384) 1536 block_8_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_8_depthwise_relu (ReLU) (None, 14, 14, 384) 0 block_8_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_8_project (Conv2D) (None, 14, 14, 64) 24576 block_8_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_8_project_BN (BatchNormal (None, 14, 14, 64) 256 block_8_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_8_add (Add) (None, 14, 14, 64) 0 block_7_add[0][0] \n",
" block_8_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_9_expand (Conv2D) (None, 14, 14, 384) 24576 block_8_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_9_expand_BN (BatchNormali (None, 14, 14, 384) 1536 block_9_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_9_expand_relu (ReLU) (None, 14, 14, 384) 0 block_9_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_9_depthwise (DepthwiseCon (None, 14, 14, 384) 3456 block_9_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_9_depthwise_BN (BatchNorm (None, 14, 14, 384) 1536 block_9_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_9_depthwise_relu (ReLU) (None, 14, 14, 384) 0 block_9_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_9_project (Conv2D) (None, 14, 14, 64) 24576 block_9_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_9_project_BN (BatchNormal (None, 14, 14, 64) 256 block_9_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_9_add (Add) (None, 14, 14, 64) 0 block_8_add[0][0] \n",
" block_9_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_10_expand (Conv2D) (None, 14, 14, 384) 24576 block_9_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_10_expand_BN (BatchNormal (None, 14, 14, 384) 1536 block_10_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_10_expand_relu (ReLU) (None, 14, 14, 384) 0 block_10_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_10_depthwise (DepthwiseCo (None, 14, 14, 384) 3456 block_10_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_10_depthwise_BN (BatchNor (None, 14, 14, 384) 1536 block_10_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_10_depthwise_relu (ReLU) (None, 14, 14, 384) 0 block_10_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_10_project (Conv2D) (None, 14, 14, 96) 36864 block_10_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_10_project_BN (BatchNorma (None, 14, 14, 96) 384 block_10_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_11_expand (Conv2D) (None, 14, 14, 576) 55296 block_10_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_11_expand_BN (BatchNormal (None, 14, 14, 576) 2304 block_11_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_11_expand_relu (ReLU) (None, 14, 14, 576) 0 block_11_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_11_depthwise (DepthwiseCo (None, 14, 14, 576) 5184 block_11_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_11_depthwise_BN (BatchNor (None, 14, 14, 576) 2304 block_11_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_11_depthwise_relu (ReLU) (None, 14, 14, 576) 0 block_11_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_11_project (Conv2D) (None, 14, 14, 96) 55296 block_11_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_11_project_BN (BatchNorma (None, 14, 14, 96) 384 block_11_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_11_add (Add) (None, 14, 14, 96) 0 block_10_project_BN[0][0] \n",
" block_11_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_12_expand (Conv2D) (None, 14, 14, 576) 55296 block_11_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_12_expand_BN (BatchNormal (None, 14, 14, 576) 2304 block_12_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_12_expand_relu (ReLU) (None, 14, 14, 576) 0 block_12_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_12_depthwise (DepthwiseCo (None, 14, 14, 576) 5184 block_12_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_12_depthwise_BN (BatchNor (None, 14, 14, 576) 2304 block_12_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_12_depthwise_relu (ReLU) (None, 14, 14, 576) 0 block_12_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_12_project (Conv2D) (None, 14, 14, 96) 55296 block_12_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_12_project_BN (BatchNorma (None, 14, 14, 96) 384 block_12_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_12_add (Add) (None, 14, 14, 96) 0 block_11_add[0][0] \n",
" block_12_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_13_expand (Conv2D) (None, 14, 14, 576) 55296 block_12_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_13_expand_BN (BatchNormal (None, 14, 14, 576) 2304 block_13_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_13_expand_relu (ReLU) (None, 14, 14, 576) 0 block_13_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_13_pad (ZeroPadding2D) (None, 15, 15, 576) 0 block_13_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_13_depthwise (DepthwiseCo (None, 7, 7, 576) 5184 block_13_pad[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_13_depthwise_BN (BatchNor (None, 7, 7, 576) 2304 block_13_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_13_depthwise_relu (ReLU) (None, 7, 7, 576) 0 block_13_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_13_project (Conv2D) (None, 7, 7, 160) 92160 block_13_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_13_project_BN (BatchNorma (None, 7, 7, 160) 640 block_13_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_14_expand (Conv2D) (None, 7, 7, 960) 153600 block_13_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_14_expand_BN (BatchNormal (None, 7, 7, 960) 3840 block_14_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_14_expand_relu (ReLU) (None, 7, 7, 960) 0 block_14_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_14_depthwise (DepthwiseCo (None, 7, 7, 960) 8640 block_14_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_14_depthwise_BN (BatchNor (None, 7, 7, 960) 3840 block_14_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_14_depthwise_relu (ReLU) (None, 7, 7, 960) 0 block_14_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_14_project (Conv2D) (None, 7, 7, 160) 153600 block_14_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_14_project_BN (BatchNorma (None, 7, 7, 160) 640 block_14_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_14_add (Add) (None, 7, 7, 160) 0 block_13_project_BN[0][0] \n",
" block_14_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_15_expand (Conv2D) (None, 7, 7, 960) 153600 block_14_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_15_expand_BN (BatchNormal (None, 7, 7, 960) 3840 block_15_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_15_expand_relu (ReLU) (None, 7, 7, 960) 0 block_15_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_15_depthwise (DepthwiseCo (None, 7, 7, 960) 8640 block_15_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_15_depthwise_BN (BatchNor (None, 7, 7, 960) 3840 block_15_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_15_depthwise_relu (ReLU) (None, 7, 7, 960) 0 block_15_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_15_project (Conv2D) (None, 7, 7, 160) 153600 block_15_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_15_project_BN (BatchNorma (None, 7, 7, 160) 640 block_15_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_15_add (Add) (None, 7, 7, 160) 0 block_14_add[0][0] \n",
" block_15_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_16_expand (Conv2D) (None, 7, 7, 960) 153600 block_15_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_16_expand_BN (BatchNormal (None, 7, 7, 960) 3840 block_16_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_16_expand_relu (ReLU) (None, 7, 7, 960) 0 block_16_expand_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_16_depthwise (DepthwiseCo (None, 7, 7, 960) 8640 block_16_expand_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_16_depthwise_BN (BatchNor (None, 7, 7, 960) 3840 block_16_depthwise[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_16_depthwise_relu (ReLU) (None, 7, 7, 960) 0 block_16_depthwise_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_16_project (Conv2D) (None, 7, 7, 320) 307200 block_16_depthwise_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_16_project_BN (BatchNorma (None, 7, 7, 320) 1280 block_16_project[0][0] \n",
"__________________________________________________________________________________________________\n",
"Conv_1 (Conv2D) (None, 7, 7, 1280) 409600 block_16_project_BN[0][0] \n",
"__________________________________________________________________________________________________\n",
"Conv_1_bn (BatchNormalization) (None, 7, 7, 1280) 5120 Conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"out_relu (ReLU) (None, 7, 7, 1280) 0 Conv_1_bn[0][0] \n",
"==================================================================================================\n",
"Total params: 2,257,984\n",
"Trainable params: 2,223,872\n",
"Non-trainable params: 34,112\n",
"__________________________________________________________________________________________________\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "bzYq-TJVz4nV"
},
"source": [
"mobile_net_base_model.trainable = False"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "TWntvWCG5lZp"
},
"source": [
"preprocess_input = tf.keras.applications.mobilenet_v2.preprocess_input\n",
"# this will ensure that the images are in [-1,1] range"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "ZUU_D6bq6FCQ"
},
"source": [
"global_average_layer = tf.keras.layers.GlobalAveragePooling2D()\n",
"# GAP layer after the base model"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "kBp8ypKm6SZz"
},
"source": [
"softmax = tf.keras.layers.Softmax(\n",
" axis=-1\n",
")"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "OU4Q0iQG70SP"
},
"source": [
"data_augmentation = tf.keras.Sequential([\n",
" tf.keras.layers.experimental.preprocessing.RandomFlip('horizontal'),\n",
" tf.keras.layers.experimental.preprocessing.RandomRotation(0.2),\n",
"])\n",
"# for data augmentation"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "Y1IB-BLM8B9E"
},
"source": [
"# stitching the model\n",
"inputs = tf.keras.Input(shape = (224, 224, 3))\n",
"x = data_augmentation(inputs)\n",
"x = preprocess_input(x)\n",
"# x = tf.keras.layers.Reshape((None, None , None , 3))(x)\n",
"x = mobile_net_base_model(x)\n",
"x = global_average_layer(x)\n",
"x = tf.keras.layers.Dropout(0.2)(x)\n",
"outputs = tf.keras.layers.Dense(120, activation='softmax')(x) \n",
"# outputs = softmax(x)\n",
"model = tf.keras.Model(inputs, outputs)\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "ZhenQC_X9PxR",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 425
},
"outputId": "9fefbef3-2c08-4cf6-e62a-346c786e0194"
},
"source": [
"model.summary()\n",
"model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Model: \"functional_1\"\n",
"_________________________________________________________________\n",
"Layer (type) Output Shape Param # \n",
"=================================================================\n",
"input_2 (InputLayer) [(None, 224, 224, 3)] 0 \n",
"_________________________________________________________________\n",
"sequential (Sequential) (None, 224, 224, 3) 0 \n",
"_________________________________________________________________\n",
"tf_op_layer_RealDiv (TensorF [(None, 224, 224, 3)] 0 \n",
"_________________________________________________________________\n",
"tf_op_layer_Sub (TensorFlowO [(None, 224, 224, 3)] 0 \n",
"_________________________________________________________________\n",
"mobilenetv2_1.00_224 (Functi (None, 7, 7, 1280) 2257984 \n",
"_________________________________________________________________\n",
"global_average_pooling2d (Gl (None, 1280) 0 \n",
"_________________________________________________________________\n",
"dropout (Dropout) (None, 1280) 0 \n",
"_________________________________________________________________\n",
"dense (Dense) (None, 120) 153720 \n",
"=================================================================\n",
"Total params: 2,411,704\n",
"Trainable params: 153,720\n",
"Non-trainable params: 2,257,984\n",
"_________________________________________________________________\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "YZUQypzPzBTK"
},
"source": [
"callback = tf.keras.callbacks.EarlyStopping(\n",
" monitor='val_loss', verbose = True, patience = 5\n",
")\n",
"\n"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "n9jUbRuP9-Zt",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "7a147135-5507-4c21-b0af-d3ca2e2286a6"
},
"source": [
"BATCH_SIZE=64\n",
"EPOCHS=50\n",
"\n",
"# data = tf.keras.layers.Reshape(\n",
"# (None,None,None 3) )\n",
"\n",
"history = model.fit(\n",
" train_data, \n",
" \n",
" batch_size=BATCH_SIZE, \n",
" epochs=1, verbose=1, \n",
" # validation_split = 0.2,\n",
" validation_data = test_data,\n",
" callbacks = callback\n",
"\n",
")"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"188/188 [==============================] - 55s 295ms/step - loss: 0.6068 - accuracy: 0.8075 - val_loss: 0.6043 - val_accuracy: 0.8143\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "QQDp89Ly_2fw",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 51
},
"outputId": "b01f043a-fcbf-432f-b503-e471bce26867"
},
"source": [
"model.evaluate(test_data)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"135/135 [==============================] - 21s 153ms/step - loss: 0.6043 - accuracy: 0.8143\n"
],
"name": "stdout"
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"[0.6043247580528259, 0.8143356442451477]"
]
},
"metadata": {
"tags": []
},
"execution_count": 36
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "fWNYTCnf2bH2"
},
"source": [
"\n",
"def final_process(path):\n",
" img = Image.open(path).convert(\"L\")\n",
" model = imported_model\n",
" pil_img = Image1(filename=path)\n",
" display(pil_img)\n",
"\n",
" img = np.resize(img, (224,224,3))\n",
" im2arr = np.array(img)\n",
" im2arr = im2arr.reshape(1,224,224,3)\n",
" y_pred = model.predict(im2arr)\n",
" probabilities = tf.nn.softmax(y_pred)\n",
" predicted_indices = tf.argmax(probabilities, 1)\n",
" # predicted_class = tf.gather(TARGET_LABELS, predicted_indices)\n",
" name = get_name(tf.cast(predicted_indices[0] , tf.int32))\n",
"\n",
" print(name)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "lQRAckSL3-Ts",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 235
},
"outputId": "e90c099a-a976-4daa-947c-294c852da07e"
},
"source": [
"final_process('bulldog.jpeg')"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUSEhMVFRUXFRUVFRgYFRcVFRUVFRUXFxUYFRUYHSggGBolHRUVITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGhAQGi0fHx0rListLS0tLS0tLS0tKzYtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0rLS03LTctN//AABEIAMkA+wMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAAFAQIDBAYAB//EADwQAAEDAgQDBQcDAwMEAwAAAAEAAhEDIQQFEjFBUWEGEyJxgTKRobHB0fAUI1IVQvFyguEHFjOyJGKS/8QAGQEAAwEBAQAAAAAAAAAAAAAAAAECAwQF/8QAJhEAAgICAgEFAAIDAAAAAAAAAAECEQMSITETBCIyQVEUgSNCYf/aAAwDAQACEQMRAD8A9rlJKauVEjpXSmFyrVayAosmoEocg9esZVrDYngUh0XpXSmNeCllMQ6V0pkplSrCAJZTXVAEyo6yz+ZZkWGCgdWHn4gQqpzC6FYbEFwVHOs3p4Zoc+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CRuoqdSK9QSI7um4DrLwT8ApO4Poqgwzv1DrkA0gRaB4XRE8Rf4oGERVCkoYwio2nHAukbADn5oa6g8bH4G6gZi6tJzXOaSyfFAJsfyfROgNbSr3JhK3Ggmwb0O/wAUEpZ1Qa01O9ZpaYPjFjMQZ2N9iocPi6bHOLnghpPhDgSBwAAN7LJ9lJBt9NrgXU7wTqbxHOFV7wKpgcwHfl7DqY8MPhBEOAOqxt/H4q4G9Ov+VcXZEo0OaUoPkuDOqaQBz9yokkk8QkBSNSx+bbIAcU1KR+Skn83QBwd0TmuSA+aQuAtKYDy0JhkbXHL7JQVx80CHNdNwfuPsnBqhM8B8An950+KAEBTCnU9guakMjMGIt6Az5rm+vwSHh5qRmxQAwtlN0jzU4+n0TaWwQBXqYNrhe3l9whtXJHudq/U1YB1NBDDpcLAiRujR3TX8PP6JMaYOdga5bpOIJl0k6BrImS3UZAB2sFZ/TvlxNV8OIOkQGtsAA2BIFuasN+qkO35zU0i9mVmYZreCeKY8vepeCiG58ymSRuYB0jqQoe7HfUyZ/wDHUEybeyd5+HSVap/VMxHt0vKp/wCiQx5aPwpe6HI+8j6qJ3BTU9iqJIKuDpu9pgPmAdvNR0suot9mmzzDWz8ArtPiuZ9fqgdkYpD8+ykDRyF02nt+dFzOPl9ECFLB790ndN5Jfz5pOf5xTEdob/EH4p5jl8FXdt6fVWuPuQAzUBYwPgkLh096R+3qfmonbD1TAmBHmutz+4+KYd0jvqUASAg8UoaOsfnFRjc+iSnx9UCJNQ6p3qVC3YKVqAP/2Q==\n",
"text/plain": [
"<IPython.core.display.Image object>"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"n02108915-french_bulldog\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "vKfUkslV0aTg"
},
"source": [
"def upload_files(message):\n",
" print(message)\n",
" from google.colab import files\n",
" uploaded = files.upload()\n",
" for k, v in uploaded.items():\n",
" open(k, 'wb').write(v)\n",
"\n",
"\n",
" path = uploaded.keys()\n",
" print(path)\n",
" final_process(path)\n",
"\n",
"\n",
"\n",
" # path_list = list(uploaded.keys())\n",
"\n",
" # for path in path_list:\n",
" # final_process(path_list)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "off2xym41UzM",
"colab": {
"resources": {
"http://localhost:8080/nbextensions/google.colab/files.js": {
"data": "Ly8gQ29weXJpZ2h0IDIwMTcgR29vZ2xlIExMQwovLwovLyBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsKLy8geW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLgovLyBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQKLy8KLy8gICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKLy8KLy8gVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQovLyBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAovLyBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KLy8gU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAovLyBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KCi8qKgogKiBAZmlsZW92ZXJ2aWV3IEhlbHBlcnMgZm9yIGdvb2dsZS5jb2xhYiBQeXRob24gbW9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BwZW5kJywKICAgICAgICAgIGZpbGU6IGZpbGUubmFtZSwKICAgICAgICAgIGRhdGE6IGJhc2U2NCwKICAgICAgICB9LAogICAgICB9OwogICAgICBwZXJjZW50LnRleHRDb250ZW50ID0KICAgICAgICAgIGAke01hdGgucm91bmQoKHBvc2l0aW9uIC8gZmlsZURhdGEuYnl0ZUxlbmd0aCkgKiAxMDApfSUgZG9uZWA7CiAgICB9CiAgfQoKICAvLyBBbGwgZG9uZS4KICB5aWVsZCB7CiAgICByZXNwb25zZTogewogICAgICBhY3Rpb246ICdjb21wbGV0ZScsCiAgICB9CiAgfTsKfQoKc2NvcGUuZ29vZ2xlID0gc2NvcGUuZ29vZ2xlIHx8IHt9OwpzY29wZS5nb29nbGUuY29sYWIgPSBzY29wZS5nb29nbGUuY29sYWIgfHwge307CnNjb3BlLmdvb2dsZS5jb2xhYi5fZmlsZXMgPSB7CiAgX3VwbG9hZEZpbGVzLAogIF91cGxvYWRGaWxlc0NvbnRpbnVlLAp9Owp9KShzZWxmKTsK",
"ok": true,
"headers": [
[
"content-type",
"application/javascript"
]
],
"status": 200,
"status_text": ""
}
},
"base_uri": "https://localhost:8080/",
"height": 514
},
"outputId": "7cf68cc9-b415-44cf-cf4c-4810febc5163"
},
"source": [
"upload_files('Upload a dog picture')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Upload a dog picture\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"\n",
" <input type=\"file\" id=\"files-734b4eb7-98c6-4f78-80c2-1f30278586fa\" name=\"files[]\" multiple disabled\n",
" style=\"border:none\" />\n",
" <output id=\"result-734b4eb7-98c6-4f78-80c2-1f30278586fa\">\n",
" Upload widget is only available when the cell has been executed in the\n",
" current browser session. Please rerun this cell to enable.\n",
" </output>\n",
" <script src=\"/nbextensions/google.colab/files.js\"></script> "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Saving bulldog.jpeg to bulldog.jpeg\n",
"dict_keys(['bulldog.jpeg'])\n"
],
"name": "stdout"
},
{
"output_type": "error",
"ename": "AttributeError",
"evalue": "ignored",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/PIL/Image.py\u001b[0m in \u001b[0;36mopen\u001b[0;34m(fp, mode)\u001b[0m\n\u001b[1;32m 2812\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2813\u001b[0;31m \u001b[0mfp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mseek\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2814\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mAttributeError\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mUnsupportedOperation\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mAttributeError\u001b[0m: 'dict_keys' object has no attribute 'seek'",
"\nDuring handling of the above exception, another exception occurred:\n",
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-36-41ccb3dc98db>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mupload_files\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Upload a dog picture'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m<ipython-input-9-78838a30e51e>\u001b[0m in \u001b[0;36mupload_files\u001b[0;34m(message)\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0mpath\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0muploaded\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeys\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 11\u001b[0;31m \u001b[0mfinal_process\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 12\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m<ipython-input-32-91639a7db9d0>\u001b[0m in \u001b[0;36mfinal_process\u001b[0;34m(path)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mfinal_process\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mimg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mImage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconvert\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"L\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mmodel\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mimported_model\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mpil_img\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mImage1\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/PIL/Image.py\u001b[0m in \u001b[0;36mopen\u001b[0;34m(fp, mode)\u001b[0m\n\u001b[1;32m 2813\u001b[0m \u001b[0mfp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mseek\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2814\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mAttributeError\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mUnsupportedOperation\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2815\u001b[0;31m \u001b[0mfp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mBytesIO\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2816\u001b[0m \u001b[0mexclusive_fp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2817\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mAttributeError\u001b[0m: 'dict_keys' object has no attribute 'read'"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "o3VHJWWt1V1E",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "332c165f-ce35-408f-e5ef-b69057ac8e62"
},
"source": [
"from google.colab import drive\n",
"drive.mount(\"/content/drive\")"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Mounted at /content/drive\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "7aHyvWCkDSrh"
},
"source": [
""
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "sCu6AVugG-j-"
},
"source": [
"model.save('dog_model.h5')"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "PEMvDiY7HGmQ"
},
"source": [
"!cp /content/drive/My\\ Drive/dog_model.h5 dog_model.h5"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "Xx5V8H3-I44D"
},
"source": [
"imported_model = tf.keras.models.load_model('dog_model.h5')\n"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "1widrkpGD-R3",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 425
},
"outputId": "6c0cf835-fac4-406b-c424-29d333105b2c"
},
"source": [
"imported_model.summary()"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Model: \"functional_1\"\n",
"_________________________________________________________________\n",
"Layer (type) Output Shape Param # \n",
"=================================================================\n",
"input_2 (InputLayer) [(None, 224, 224, 3)] 0 \n",
"_________________________________________________________________\n",
"sequential (Sequential) (None, 224, 224, 3) 0 \n",
"_________________________________________________________________\n",
"tf_op_layer_RealDiv (TensorF (None, 224, 224, 3) 0 \n",
"_________________________________________________________________\n",
"tf_op_layer_Sub (TensorFlowO (None, 224, 224, 3) 0 \n",
"_________________________________________________________________\n",
"mobilenetv2_1.00_224 (Functi (None, 7, 7, 1280) 2257984 \n",
"_________________________________________________________________\n",
"global_average_pooling2d (Gl (None, 1280) 0 \n",
"_________________________________________________________________\n",
"dropout (Dropout) (None, 1280) 0 \n",
"_________________________________________________________________\n",
"dense (Dense) (None, 120) 153720 \n",
"=================================================================\n",
"Total params: 2,411,704\n",
"Trainable params: 153,720\n",
"Non-trainable params: 2,257,984\n",
"_________________________________________________________________\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "3MyJpHjPEDoK",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 275
},
"outputId": "18ed2aa0-e14d-410b-9650-939619e51be4"
},
"source": [
"converter = tf.lite.TFLiteConverter.from_keras_model(imported_model)\n",
"tflite_model = converter.convert()\n"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/tracking/tracking.py:111: Model.state_updates (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"This property should not be used in TensorFlow 2.0, as updates are applied automatically.\n"
],
"name": "stdout"
},
{
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/tracking/tracking.py:111: Model.state_updates (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"This property should not be used in TensorFlow 2.0, as updates are applied automatically.\n"
],
"name": "stderr"
},
{
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/tracking/tracking.py:111: Layer.updates (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"This property should not be used in TensorFlow 2.0, as updates are applied automatically.\n"
],
"name": "stdout"
},
{
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/tracking/tracking.py:111: Layer.updates (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"This property should not be used in TensorFlow 2.0, as updates are applied automatically.\n"
],
"name": "stderr"
},
{
"output_type": "stream",
"text": [
"INFO:tensorflow:Assets written to: /tmp/tmpc6aunngm/assets\n"
],
"name": "stdout"
},
{
"output_type": "stream",
"text": [
"INFO:tensorflow:Assets written to: /tmp/tmpc6aunngm/assets\n"
],
"name": "stderr"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "g2m-wnqmJe-m"
},
"source": [
"with open('model.tflite', 'wb') as f:\n",
" f.write(tflite_model)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "dGcakNzLJlgr"
},
"source": [
""
],
"execution_count": null,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment