diff --git a/PyTorch.ipynb b/PyTorch.ipynb new file mode 100644 index 00000000..81a241cd --- /dev/null +++ b/PyTorch.ipynb @@ -0,0 +1,13203 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "collapsed_sections": [ + "gByQoi1y41rq", + "wTl7xSq3AGOA", + "fKffsvq1JjlP", + "-WuYvuyxQ4sq", + "RCLfE2-EdYv-", + "Tjr70ZWPPajG", + "gjPjFs-LYe2J", + "LRQkoS8VTxn9", + "J6TttIUnYdgi", + "Jn9EVoIwiESm", + "ydsdcfLDkdUu", + "aMOaGvlFqCWz", + "G0VNBtEW7WHl", + "xuZ2c6W0wepg" + ] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + }, + "gpuClass": "standard", + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "91f8a196593a4933be359267bcc2f95d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_ac750e8ffae446d1888894ddeb057251", + "IPY_MODEL_05815eebc77447268c0c917172de2851", + "IPY_MODEL_1ae3b669fcb94e87abdcb143f23e125e" + ], + "layout": "IPY_MODEL_b739bb5284074f008e5690e85a236d54" + } + }, + "ac750e8ffae446d1888894ddeb057251": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2a3d6ba9789347d1926b178b886bcc6d", + "placeholder": "​", + "style": "IPY_MODEL_e889481abc91418498791fec9ac30e89", + "value": "100%" + } + }, + "05815eebc77447268c0c917172de2851": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c02829981c4447558f270d7e52618fc7", + "max": 9912422, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_5ecb99ad82ce44348d87ff746b60b949", + "value": 9912422 + } + }, + "1ae3b669fcb94e87abdcb143f23e125e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_be7a0d83513144f2a7cc1f1130c22d69", + "placeholder": "​", + "style": "IPY_MODEL_1a1469044ec74cd8a9d2be60f0c89220", + "value": " 9912422/9912422 [00:00<00:00, 105876554.36it/s]" + } + }, + "b739bb5284074f008e5690e85a236d54": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2a3d6ba9789347d1926b178b886bcc6d": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e889481abc91418498791fec9ac30e89": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c02829981c4447558f270d7e52618fc7": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5ecb99ad82ce44348d87ff746b60b949": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "be7a0d83513144f2a7cc1f1130c22d69": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1a1469044ec74cd8a9d2be60f0c89220": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "374d5845f53449e9ab5bb3a52379e9f2": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_d835ca1173b34e859e8f152f35ce2366", + "IPY_MODEL_2260db56c0ea4fbdbd30b9e7cc996e4b", + "IPY_MODEL_ec95204d78c743529b676290db6c9c68" + ], + "layout": "IPY_MODEL_e17cc640ed30467e9d25159848b6f385" + } + }, + "d835ca1173b34e859e8f152f35ce2366": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_40187d3c1a304214aab5b00678d094e5", + "placeholder": "​", + "style": "IPY_MODEL_d53f5a5508bb49be9d43648363aa9fa1", + "value": "100%" + } + }, + "2260db56c0ea4fbdbd30b9e7cc996e4b": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2ec585015275406c89529723b53a734e", + "max": 28881, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f43e0b0d14dd418fa2950da7e2fc4a49", + "value": 28881 + } + }, + "ec95204d78c743529b676290db6c9c68": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_634707fa930c45278fc2168190eff31e", + "placeholder": "​", + "style": "IPY_MODEL_388dfa78d5644ab4bd5b8664a1efb0ed", + "value": " 28881/28881 [00:00<00:00, 1350619.29it/s]" + } + }, + "e17cc640ed30467e9d25159848b6f385": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "40187d3c1a304214aab5b00678d094e5": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d53f5a5508bb49be9d43648363aa9fa1": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2ec585015275406c89529723b53a734e": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f43e0b0d14dd418fa2950da7e2fc4a49": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "634707fa930c45278fc2168190eff31e": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "388dfa78d5644ab4bd5b8664a1efb0ed": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "07b45c311a3645e8afbf113dd2d1cdd0": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_6805a676566f4d46adb4fe4b0e942b64", + "IPY_MODEL_391cc4242755483d8522aeefc27e0e1a", + "IPY_MODEL_39cd6eb0805f44be853d4562836eaacc" + ], + "layout": "IPY_MODEL_a40c04cee05c4ead82a05cabd4adbc9f" + } + }, + "6805a676566f4d46adb4fe4b0e942b64": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d04f0c7446fe43698d944475c5731fc7", + "placeholder": "​", + "style": "IPY_MODEL_637e741426ef4ca1a17947a1f4f76059", + "value": "100%" + } + }, + "391cc4242755483d8522aeefc27e0e1a": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a3c9d78b94f04bf09c7c178aa87bc6cc", + "max": 1648877, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_752aa1dffa5645a1b0bd36fb3e18ee92", + "value": 1648877 + } + }, + "39cd6eb0805f44be853d4562836eaacc": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1c803e0213b245c59e05540a97e76bce", + "placeholder": "​", + "style": "IPY_MODEL_71e7424952fc477ea7a098d0c0f22c70", + "value": " 1648877/1648877 [00:00<00:00, 28251074.94it/s]" + } + }, + "a40c04cee05c4ead82a05cabd4adbc9f": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d04f0c7446fe43698d944475c5731fc7": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "637e741426ef4ca1a17947a1f4f76059": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "a3c9d78b94f04bf09c7c178aa87bc6cc": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "752aa1dffa5645a1b0bd36fb3e18ee92": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "1c803e0213b245c59e05540a97e76bce": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "71e7424952fc477ea7a098d0c0f22c70": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "6e3ad3247ddb442793914f55b24f61e7": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_6989040893d746359da962d68be2418f", + "IPY_MODEL_6b6a272d4afd488aad3b5152d7c43e3e", + "IPY_MODEL_01389ddf4acb47d8934f37ceb1895ffb" + ], + "layout": "IPY_MODEL_160a1177c75f495c9905efe37db1dd1a" + } + }, + "6989040893d746359da962d68be2418f": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0b51f47995ed4e6bbe972c1306a10805", + "placeholder": "​", + "style": "IPY_MODEL_31139d781048469ea5e91395972f3029", + "value": "100%" + } + }, + "6b6a272d4afd488aad3b5152d7c43e3e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_69304e09e3034a53bc4e8e24f2c66022", + "max": 4542, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_dd38dcfdc1e549148aab52ad20bf5510", + "value": 4542 + } + }, + "01389ddf4acb47d8934f37ceb1895ffb": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f14867644e8240568339911c145c449e", + "placeholder": "​", + "style": "IPY_MODEL_7b0ff1095517448f8f439ef9beeb1352", + "value": " 4542/4542 [00:00<00:00, 132857.21it/s]" + } + }, + "160a1177c75f495c9905efe37db1dd1a": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0b51f47995ed4e6bbe972c1306a10805": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "31139d781048469ea5e91395972f3029": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "69304e09e3034a53bc4e8e24f2c66022": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dd38dcfdc1e549148aab52ad20bf5510": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "f14867644e8240568339911c145c449e": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7b0ff1095517448f8f439ef9beeb1352": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4448f0738f51465d91f450a70de825db": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_abfcfafa989f4085958da57441a7b687", + "IPY_MODEL_1438fbfe83ea4c0ca1510ba3f25bf9ec", + "IPY_MODEL_701f9637eea44400bfba643026556830" + ], + "layout": "IPY_MODEL_887cd3c235ca495f891595fbfbc2a36a" + } + }, + "abfcfafa989f4085958da57441a7b687": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a00a3463a1944299a50ee6216a1e4033", + "placeholder": "​", + "style": "IPY_MODEL_c25bd7f6b1a74f93b3ec8ebe572330c0", + "value": "100%" + } + }, + "1438fbfe83ea4c0ca1510ba3f25bf9ec": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6d29fac1b4774e66924972b2830bfc0b", + "max": 170498071, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_96f71b3de5a24b358a2ed79f2f26aba1", + "value": 170498071 + } + }, + "701f9637eea44400bfba643026556830": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b6ea10e6b68f48cabdaf9c553acf0280", + "placeholder": "​", + "style": "IPY_MODEL_2dc5b2335feb4907adb407cea6889eae", + "value": " 170498071/170498071 [00:02<00:00, 74092302.04it/s]" + } + }, + "887cd3c235ca495f891595fbfbc2a36a": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a00a3463a1944299a50ee6216a1e4033": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c25bd7f6b1a74f93b3ec8ebe572330c0": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "6d29fac1b4774e66924972b2830bfc0b": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "96f71b3de5a24b358a2ed79f2f26aba1": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "b6ea10e6b68f48cabdaf9c553acf0280": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2dc5b2335feb4907adb407cea6889eae": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "aa4360b92c334e75bddec15286d69e07": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_5426abf42e4146dcacb99de152816cca", + "IPY_MODEL_367bffd1c8e3495ca21fa0480a834c3c", + "IPY_MODEL_8475ac97e4bf46f381c2f73713b38914" + ], + "layout": "IPY_MODEL_7c1c421f06aa4bbda720c130dcd351a1" + } + }, + "5426abf42e4146dcacb99de152816cca": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e38d67ade63144a3b3f3d92803eddb12", + "placeholder": "​", + "style": "IPY_MODEL_834b94e1b7d7481cb71e0f938c665f5b", + "value": "100%" + } + }, + "367bffd1c8e3495ca21fa0480a834c3c": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_547c3607f68e4d51bde93ec2212047a6", + "max": 46830571, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3eb089fb543e4de595d647153c2dc2da", + "value": 46830571 + } + }, + "8475ac97e4bf46f381c2f73713b38914": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1364723861f346a9b46ce056cb38f516", + "placeholder": "​", + "style": "IPY_MODEL_2a4b1c752f9d4c0ba9b65e6b23a0d0c0", + "value": " 44.7M/44.7M [00:01<00:00, 54.6MB/s]" + } + }, + "7c1c421f06aa4bbda720c130dcd351a1": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e38d67ade63144a3b3f3d92803eddb12": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "834b94e1b7d7481cb71e0f938c665f5b": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "547c3607f68e4d51bde93ec2212047a6": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3eb089fb543e4de595d647153c2dc2da": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "1364723861f346a9b46ce056cb38f516": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2a4b1c752f9d4c0ba9b65e6b23a0d0c0": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "08d865a4ea0747c7abf7c048158f580c": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_ec4830908e744a62a128cac7ef195de8", + "IPY_MODEL_0f232b6a34de41d6b8f0faa75f5de4c8", + "IPY_MODEL_1572a35b2df74fdcae9190f09912ace4" + ], + "layout": "IPY_MODEL_8443cacb665e4acd9804bd15cb18d31b" + } + }, + "ec4830908e744a62a128cac7ef195de8": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_3ff6c1d530c7472f9b7e028ed8c5e038", + "placeholder": "​", + "style": "IPY_MODEL_3c85f343b59342afadc3ac24f474a61f", + "value": "100%" + } + }, + "0f232b6a34de41d6b8f0faa75f5de4c8": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b0087a21890748e395678b23bcfc39c5", + "max": 9912422, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_02311e6ca4a84b1798e8e0acec6afd1b", + "value": 9912422 + } + }, + "1572a35b2df74fdcae9190f09912ace4": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_fad3d5b899594e67b5cecdb23646bd7b", + "placeholder": "​", + "style": "IPY_MODEL_060a3b6497f347ffaa6bbd16863c2429", + "value": " 9912422/9912422 [00:00<00:00, 174198204.39it/s]" + } + }, + "8443cacb665e4acd9804bd15cb18d31b": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3ff6c1d530c7472f9b7e028ed8c5e038": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3c85f343b59342afadc3ac24f474a61f": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "b0087a21890748e395678b23bcfc39c5": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "02311e6ca4a84b1798e8e0acec6afd1b": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "fad3d5b899594e67b5cecdb23646bd7b": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "060a3b6497f347ffaa6bbd16863c2429": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "5fe88dc7e8a7417fa9458abcf57df556": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_c1621682d2d243e382f04861147e4d1e", + "IPY_MODEL_a20cdb51e8af439eab1d7fde447b6183", + "IPY_MODEL_d5009fea670944798bba45167034be15" + ], + "layout": "IPY_MODEL_ee42c3b32a67474e8f39e99d73cad437" + } + }, + "c1621682d2d243e382f04861147e4d1e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ee0be4052b98477686ad8ba7c04137f1", + "placeholder": "​", + "style": "IPY_MODEL_7d9ee5f86db147ed93305d1f177b0b4c", + "value": "100%" + } + }, + "a20cdb51e8af439eab1d7fde447b6183": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_665633575b57488d89ee0f4b5dcc5c41", + "max": 28881, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_76cb84ce4c104bbfa9549f9a9994f519", + "value": 28881 + } + }, + "d5009fea670944798bba45167034be15": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d40a8fac5dd54e56b9848dda9935ab3c", + "placeholder": "​", + "style": "IPY_MODEL_9343be0105b34df7a12d4dc815e8d1a9", + "value": " 28881/28881 [00:00<00:00, 2253938.93it/s]" + } + }, + "ee42c3b32a67474e8f39e99d73cad437": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ee0be4052b98477686ad8ba7c04137f1": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7d9ee5f86db147ed93305d1f177b0b4c": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "665633575b57488d89ee0f4b5dcc5c41": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "76cb84ce4c104bbfa9549f9a9994f519": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "d40a8fac5dd54e56b9848dda9935ab3c": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9343be0105b34df7a12d4dc815e8d1a9": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "5d1f06fb5e494305a594af7503e3eee8": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_bd53c0da47454c55a4f32500d2fe629d", + "IPY_MODEL_5791fc73cd3e49dc827b81c45c0bb803", + "IPY_MODEL_fc24457e1ecb498c9617d1fcc72e137a" + ], + "layout": "IPY_MODEL_b36aead2966f4dfab7e6a7a82afcef30" + } + }, + "bd53c0da47454c55a4f32500d2fe629d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5cb57618175c4ccf8951dfca37f8053f", + "placeholder": "​", + "style": "IPY_MODEL_893c9dba278b453292a2bc643ecc8944", + "value": "100%" + } + }, + "5791fc73cd3e49dc827b81c45c0bb803": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_23d52ca97fcf4df4b104060ace68c816", + "max": 1648877, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_81529396a8494b488098cde54dae7306", + "value": 1648877 + } + }, + "fc24457e1ecb498c9617d1fcc72e137a": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8a75975a92184870b0644157e608fe2a", + "placeholder": "​", + "style": "IPY_MODEL_f962b3d000394a30b336a56b531ef095", + "value": " 1648877/1648877 [00:00<00:00, 70207106.06it/s]" + } + }, + "b36aead2966f4dfab7e6a7a82afcef30": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5cb57618175c4ccf8951dfca37f8053f": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "893c9dba278b453292a2bc643ecc8944": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "23d52ca97fcf4df4b104060ace68c816": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "81529396a8494b488098cde54dae7306": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "8a75975a92184870b0644157e608fe2a": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f962b3d000394a30b336a56b531ef095": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d6cf83ce5c4d49159121e3208fc8a713": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_ff32272603fa4b14b2636e5fd2d9c241", + "IPY_MODEL_01013f13409344b7ab7341454ce6c795", + "IPY_MODEL_3058887d3b6343709f546b806e6f4378" + ], + "layout": "IPY_MODEL_ee11f0b4645e405bab530bf5b9217ce2" + } + }, + "ff32272603fa4b14b2636e5fd2d9c241": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_659966169e0641728d6f752b023ae825", + "placeholder": "​", + "style": "IPY_MODEL_d9ff6ab6b0e34a07b77f42e9fd3aabc5", + "value": "100%" + } + }, + "01013f13409344b7ab7341454ce6c795": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_13c7fc7aab5f4a8fa79200b176c147c0", + "max": 4542, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7b1a91615eb94c36a7ed9d84a39943fa", + "value": 4542 + } + }, + "3058887d3b6343709f546b806e6f4378": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a79f19edf0874d138e75095b0e27a122", + "placeholder": "​", + "style": "IPY_MODEL_274500131a7d4b87bb93627dec644f8a", + "value": " 4542/4542 [00:00<00:00, 271901.82it/s]" + } + }, + "ee11f0b4645e405bab530bf5b9217ce2": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "659966169e0641728d6f752b023ae825": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d9ff6ab6b0e34a07b77f42e9fd3aabc5": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "13c7fc7aab5f4a8fa79200b176c147c0": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7b1a91615eb94c36a7ed9d84a39943fa": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "a79f19edf0874d138e75095b0e27a122": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "274500131a7d4b87bb93627dec644f8a": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "52912bd33dc74a02a3f679c9bd75eeb3": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_13bb9ae1436c4a9982cc4f2600ec92f0", + "IPY_MODEL_fd506646272f45f4b6594e84d2325991", + "IPY_MODEL_ab159ce5121d4d09965bee6acec69c02" + ], + "layout": "IPY_MODEL_92656205dfa54cab9efbe62e20e8b0b3" + } + }, + "13bb9ae1436c4a9982cc4f2600ec92f0": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_57713f6c0a2f42f6b759c0f9a5564fe8", + "placeholder": "​", + "style": "IPY_MODEL_8dd75b5c94254e09a1418e4bcd9699b3", + "value": "Sanity Checking DataLoader 0: 100%" + } + }, + "fd506646272f45f4b6594e84d2325991": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_dab2858a04774a0b92a6b78a5820ba27", + "max": 2, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2597fc426f4d41a8aa9c23ab4e26bd75", + "value": 2 + } + }, + "ab159ce5121d4d09965bee6acec69c02": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b110d9b11c6943d2a4390b8d0a75b3ec", + "placeholder": "​", + "style": "IPY_MODEL_db41640e42624c72bebf7c9abe780fcf", + "value": " 2/2 [00:00<00:00, 20.27it/s]" + } + }, + "92656205dfa54cab9efbe62e20e8b0b3": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": "inline-flex", + "flex": null, + "flex_flow": "row wrap", + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": "hidden", + "width": "100%" + } + }, + "57713f6c0a2f42f6b759c0f9a5564fe8": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8dd75b5c94254e09a1418e4bcd9699b3": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "dab2858a04774a0b92a6b78a5820ba27": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": "2", + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2597fc426f4d41a8aa9c23ab4e26bd75": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "b110d9b11c6943d2a4390b8d0a75b3ec": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "db41640e42624c72bebf7c9abe780fcf": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "7c8edd12776b4208bd8a4dede8053192": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_6049a7345a51485b8fa1b631fd2dbc60", + "IPY_MODEL_a5970cde3a184da7a7cfc369a3b46569", + "IPY_MODEL_d1e5a1df83744d668d56ee9d4a2f84f6" + ], + "layout": "IPY_MODEL_eb0db75564104edba466858a280a6d59" + } + }, + "6049a7345a51485b8fa1b631fd2dbc60": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_47d282a8ba834ed0a9076477e65a2ada", + "placeholder": "​", + "style": "IPY_MODEL_b35df21c693246748fbca88fc3da5235", + "value": "100%" + } + }, + "a5970cde3a184da7a7cfc369a3b46569": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9b7904fdc10c44b7a6aa540c544c5ede", + "max": 9912422, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2338ed0fabff47d29ac23031a87b35ca", + "value": 9912422 + } + }, + "d1e5a1df83744d668d56ee9d4a2f84f6": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_fab3f367e35649f9a4ec0c2324e7b119", + "placeholder": "​", + "style": "IPY_MODEL_dc27e4be79bd425194074649dfea0f00", + "value": " 9912422/9912422 [00:00<00:00, 87165669.39it/s]" + } + }, + "eb0db75564104edba466858a280a6d59": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "47d282a8ba834ed0a9076477e65a2ada": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b35df21c693246748fbca88fc3da5235": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9b7904fdc10c44b7a6aa540c544c5ede": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2338ed0fabff47d29ac23031a87b35ca": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "fab3f367e35649f9a4ec0c2324e7b119": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dc27e4be79bd425194074649dfea0f00": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "124a0b1b7dcc41af8d726f2cc46238df": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_5dcc4a1eae7f4cbfb03aa96c3cee9300", + "IPY_MODEL_1eafebea3f7c46d98950b7ce7c31330a", + "IPY_MODEL_6aeee8f43df24065bcc7e809f097a07a" + ], + "layout": "IPY_MODEL_972b43aecc3c42b8ac01b308d06ff1b3" + } + }, + "5dcc4a1eae7f4cbfb03aa96c3cee9300": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d635a60d11d5430b88ed60559875b8e7", + "placeholder": "​", + "style": "IPY_MODEL_ec8fbbd25f784257968a2ab77aa0eb5d", + "value": "100%" + } + }, + "1eafebea3f7c46d98950b7ce7c31330a": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_684d49ebb9294467a8647f34bd921033", + "max": 28881, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_462fa741fa354882b8d2941e685d4f41", + "value": 28881 + } + }, + "6aeee8f43df24065bcc7e809f097a07a": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_17504117a1aa41189edf815a30dce819", + "placeholder": "​", + "style": "IPY_MODEL_c25e2df379f54f9f9b660d2413f7f18e", + "value": " 28881/28881 [00:00<00:00, 700429.00it/s]" + } + }, + "972b43aecc3c42b8ac01b308d06ff1b3": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d635a60d11d5430b88ed60559875b8e7": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ec8fbbd25f784257968a2ab77aa0eb5d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "684d49ebb9294467a8647f34bd921033": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "462fa741fa354882b8d2941e685d4f41": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "17504117a1aa41189edf815a30dce819": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c25e2df379f54f9f9b660d2413f7f18e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "979aef89ee0f4283898aded021e8c656": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_889f5d1527dc4ddb8c486e7a76108df9", + "IPY_MODEL_4cdf563cd6324ecf869e697ebf0482b7", + "IPY_MODEL_60bd724392e1461cbbdfbd2c9f35f60c" + ], + "layout": "IPY_MODEL_a6986230fd4e49bcbc2753cc0fc5c600" + } + }, + "889f5d1527dc4ddb8c486e7a76108df9": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e1598e6ab2764d40a8fee80a3fd66a63", + "placeholder": "​", + "style": "IPY_MODEL_1eba897da0a947d1b877dc4643c88b11", + "value": "100%" + } + }, + "4cdf563cd6324ecf869e697ebf0482b7": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_860ac05c83624c14a966a24f4232bcd2", + "max": 1648877, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c6663874cec04e16898f4bd01915e7a4", + "value": 1648877 + } + }, + "60bd724392e1461cbbdfbd2c9f35f60c": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_fb3b378513964230a2f65c70472a3015", + "placeholder": "​", + "style": "IPY_MODEL_c6b4ce7a6e914dad818f4c5e74633ebc", + "value": " 1648877/1648877 [00:00<00:00, 27331974.08it/s]" + } + }, + "a6986230fd4e49bcbc2753cc0fc5c600": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e1598e6ab2764d40a8fee80a3fd66a63": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1eba897da0a947d1b877dc4643c88b11": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "860ac05c83624c14a966a24f4232bcd2": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c6663874cec04e16898f4bd01915e7a4": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "fb3b378513964230a2f65c70472a3015": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c6b4ce7a6e914dad818f4c5e74633ebc": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "19ffd4fe542f48af9da41961dc91a64d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_34d544fdf6924acc90a3f66a4c5d7f2e", + "IPY_MODEL_e09e602868d84f25ad593c22300641ff", + "IPY_MODEL_92b2951c00db4b58bdb26361e5ad6ac5" + ], + "layout": "IPY_MODEL_faa0a9edd9dd485faa86be4bcafa56fa" + } + }, + "34d544fdf6924acc90a3f66a4c5d7f2e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_85ebb4b6f83d4fc8b87306324ce6e116", + "placeholder": "​", + "style": "IPY_MODEL_7d4c9340d76142a395e200ff85a877d8", + "value": "100%" + } + }, + "e09e602868d84f25ad593c22300641ff": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_af6897b7906d4c97b010d25dac4ae2d0", + "max": 4542, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a15dccfd008b47fc903f7cc799a07616", + "value": 4542 + } + }, + "92b2951c00db4b58bdb26361e5ad6ac5": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2ef36081061e4fa2a1170372215d8ca9", + "placeholder": "​", + "style": "IPY_MODEL_42f0221ccd4c4833b9e8972f59f6d3d0", + "value": " 4542/4542 [00:00<00:00, 253473.07it/s]" + } + }, + "faa0a9edd9dd485faa86be4bcafa56fa": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "85ebb4b6f83d4fc8b87306324ce6e116": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7d4c9340d76142a395e200ff85a877d8": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "af6897b7906d4c97b010d25dac4ae2d0": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a15dccfd008b47fc903f7cc799a07616": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "2ef36081061e4fa2a1170372215d8ca9": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "42f0221ccd4c4833b9e8972f59f6d3d0": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "78fb2f1a98054bca9ab2827385064ba7": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_221fbd4795f440be940e76cfe4c4b38d", + "IPY_MODEL_5407cb3e676b4ca38025c2c65463ef3d", + "IPY_MODEL_a22b6008735a44428986b5269bfa1524" + ], + "layout": "IPY_MODEL_7735c795e9364b4caa04c176781398cc" + } + }, + "221fbd4795f440be940e76cfe4c4b38d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ea4e2dad6bf04863b375293096a1ffa4", + "placeholder": "​", + "style": "IPY_MODEL_88fbc5c81db94515b443d82131d15661", + "value": "Epoch 1: 100%" + } + }, + "5407cb3e676b4ca38025c2c65463ef3d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_319c06ba763e44d18e5ba96c0c469b2f", + "max": 600, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7d0c40fd605847e1bbf30c8f6ab68cc0", + "value": 600 + } + }, + "a22b6008735a44428986b5269bfa1524": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0b0cc1247a0b4432b94b0294a9d8d4a0", + "placeholder": "​", + "style": "IPY_MODEL_deb8e6c0e25e4fdebb71a8ddc3f9f93a", + "value": " 600/600 [00:21<00:00, 27.71it/s, v_num=1]" + } + }, + "7735c795e9364b4caa04c176781398cc": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": "inline-flex", + "flex": null, + "flex_flow": "row wrap", + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": "100%" + } + }, + "ea4e2dad6bf04863b375293096a1ffa4": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "88fbc5c81db94515b443d82131d15661": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "319c06ba763e44d18e5ba96c0c469b2f": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": "2", + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7d0c40fd605847e1bbf30c8f6ab68cc0": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "0b0cc1247a0b4432b94b0294a9d8d4a0": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "deb8e6c0e25e4fdebb71a8ddc3f9f93a": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "13bbc81837b34479b626606ba2307de6": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_d3368397a9394f62b7bf82fdca369282", + "IPY_MODEL_0c42f69476cc4d70861eacabad72af48", + "IPY_MODEL_0d1e7c2537b24056a3179ef8ae50ae77" + ], + "layout": "IPY_MODEL_3f884468d47642b5b4bbc503d1c8f625" + } + }, + "d3368397a9394f62b7bf82fdca369282": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5bcda15161d74ab28de5429e13a68d89", + "placeholder": "​", + "style": "IPY_MODEL_4e5c7f48551d43619b1e0a76fd0fe1be", + "value": "Validation DataLoader 0: 100%" + } + }, + "0c42f69476cc4d70861eacabad72af48": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6ba3107c89154baca3872be30a525863", + "max": 100, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d550dcb8abc14e17952c9a27d01ba09b", + "value": 100 + } + }, + "0d1e7c2537b24056a3179ef8ae50ae77": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f65be263185e43d8bb7289379d310ea4", + "placeholder": "​", + "style": "IPY_MODEL_e7f5224476574408954611999c2faed5", + "value": " 100/100 [00:02<00:00, 42.27it/s]" + } + }, + "3f884468d47642b5b4bbc503d1c8f625": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": "inline-flex", + "flex": null, + "flex_flow": "row wrap", + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": "hidden", + "width": "100%" + } + }, + "5bcda15161d74ab28de5429e13a68d89": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4e5c7f48551d43619b1e0a76fd0fe1be": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "6ba3107c89154baca3872be30a525863": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": "2", + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d550dcb8abc14e17952c9a27d01ba09b": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "f65be263185e43d8bb7289379d310ea4": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e7f5224476574408954611999c2faed5": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "8a97162d5ab94718a9d5962943da9328": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_7bdc67a971214956a9a95fe58c82188d", + "IPY_MODEL_508b7772f12045faa5bd0fe88bd6dc7f", + "IPY_MODEL_03a31d66e4944392938f82c38ffb570d" + ], + "layout": "IPY_MODEL_83bb9eb22c7b41b2903c8ee6209633e0" + } + }, + "7bdc67a971214956a9a95fe58c82188d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9251d87216c347559b001bf9eee2ab94", + "placeholder": "​", + "style": "IPY_MODEL_d174785724ca4b1b9702eff05b95ea98", + "value": "Validation DataLoader 0: 100%" + } + }, + "508b7772f12045faa5bd0fe88bd6dc7f": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ababf52d3426476ea15301cf474c71db", + "max": 100, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_784030986816424c9a6ebceef5d3bf41", + "value": 100 + } + }, + "03a31d66e4944392938f82c38ffb570d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "model_module_version": "1.5.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_25396e2c4f704a6183efdd95b85a823a", + "placeholder": "​", + "style": "IPY_MODEL_71b41467028f492fb6d7791a65075e68", + "value": " 100/100 [00:02<00:00, 39.50it/s]" + } + }, + "83bb9eb22c7b41b2903c8ee6209633e0": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": "inline-flex", + "flex": null, + "flex_flow": "row wrap", + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": "hidden", + "width": "100%" + } + }, + "9251d87216c347559b001bf9eee2ab94": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d174785724ca4b1b9702eff05b95ea98": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ababf52d3426476ea15301cf474c71db": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": "2", + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "784030986816424c9a6ebceef5d3bf41": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "25396e2c4f704a6183efdd95b85a823a": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "71b41467028f492fb6d7791a65075e68": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + } + } + } + }, + "cells": [ + { + "cell_type": "markdown", + "source": [ + "#Tensor Basics:" + ], + "metadata": { + "id": "gByQoi1y41rq" + } + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "7nPpO-lEd4CL" + }, + "outputs": [], + "source": [ + "import torch" + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Variable Declarations & Basic Operations:" + ], + "metadata": { + "id": "2OyNkO6T7rtZ" + } + }, + { + "cell_type": "markdown", + "source": [ + "###torch.empty() creates tensor with any data type you want, torch.Tensor() only creates tensors of type torch.FloatTensor. So torch.Tensor() is a special case of torch.empty()" + ], + "metadata": { + "id": "BJwSOg6b6at0" + } + }, + { + "cell_type": "code", + "source": [ + "x = torch.empty(1) # scalar\n", + "print(x)\n", + "x = torch.empty(3) # array 1D\n", + "print(x)\n", + "x = torch.empty(2,3) # array 2D\n", + "print(x)\n", + "x = torch.empty(2,3) # array 3D\n", + "print(x)\n", + "print(x.shape)\n", + "x = torch.rand(2,2)\n", + "print(x)\n", + "x = torch.zeros(2,3)\n", + "print(x)\n", + "x = torch.ones(3,3)\n", + "print(x)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Q2WyKgY641gQ", + "outputId": "6ee311ed-150e-4edc-d42c-5e447a597015" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([2.2981e-34])\n", + "tensor([-1.3774e+37, 4.5615e-41, 2.3039e-34])\n", + "tensor([[-1.3774e+37, 4.5615e-41, 2.3039e-34],\n", + " [ 0.0000e+00, 6.2628e+00, 4.5615e-41]])\n", + "tensor([[1.8528e-34, 0.0000e+00, 2.2980e-34],\n", + " [0.0000e+00, 4.4842e-44, 0.0000e+00]])\n", + "torch.Size([2, 3])\n", + "tensor([[0.5977, 0.8313],\n", + " [0.9351, 0.0788]])\n", + "tensor([[0., 0., 0.],\n", + " [0., 0., 0.]])\n", + "tensor([[1., 1., 1.],\n", + " [1., 1., 1.],\n", + " [1., 1., 1.]])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "x = torch.ones(3,3)\n", + "print(x.dtype)\n", + "x = torch.ones(3,3,dtype = torch.int)\n", + "print(x.dtype)\n", + "print(x.size())\n", + "print(x.shape)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "BqFIqgGX5Sba", + "outputId": "63c3eb41-a65e-4b2b-d3b6-415f4956019d" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "torch.float32\n", + "torch.int32\n", + "torch.Size([3, 3])\n", + "torch.Size([3, 3])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "x = torch.tensor([2,3])\n", + "print(x.shape)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "GOegrS4H5os_", + "outputId": "ee1ad35d-a762-4fa5-ba67-2b2322a4bf43" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "torch.Size([2])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "###Any function that has a trailing underscore \"add_\" will do its function in-place" + ], + "metadata": { + "id": "QiEI0_WE7MkE" + } + }, + { + "cell_type": "code", + "source": [ + "x = torch.rand(2,2)\n", + "y = torch.rand(2,2)\n", + "z = x + y # element-wise addition\n", + "print(z)\n", + "z = torch.add(x,y) # element-wise addition\n", + "print(z)\n", + "y.add_(x) # in-place addition\n", + "print(y)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "rWU9ETS36nFU", + "outputId": "e1ceb7fb-40ef-4ed7-f136-13299e402933" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([[1.2117, 0.9824],\n", + " [1.2194, 0.5482]])\n", + "tensor([[1.2117, 0.9824],\n", + " [1.2194, 0.5482]])\n", + "tensor([[1.2117, 0.9824],\n", + " [1.2194, 0.5482]])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Slicing:" + ], + "metadata": { + "id": "vXqKrjUG7n9X" + } + }, + { + "cell_type": "markdown", + "source": [ + "###If we have one element we can get its item using .item() function" + ], + "metadata": { + "id": "IEqd1c2w8Pn2" + } + }, + { + "cell_type": "code", + "source": [ + "x = torch.rand(5,3)\n", + "print(x[:,0]) # first column and all the rows\n", + "print(x[0,:]) # first row and all columns\n", + "print(x[1,2]) # one element\n", + "print(x[1,2].item())" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "_8O7s0bH7Djq", + "outputId": "6ecd90ba-862c-4f6a-823f-a0980527720f" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([0.4060, 0.0146, 0.1298, 0.5327, 0.0468])\n", + "tensor([0.4060, 0.0432, 0.7630])\n", + "tensor(0.6038)\n", + "0.6038056015968323\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Reshaping:" + ], + "metadata": { + "id": "ljVwefDA8c9F" + } + }, + { + "cell_type": "code", + "source": [ + "x = torch.rand(4,4)\n", + "print(x)\n", + "y = x.view(16) # 1D vector, no. of elements must be the same\n", + "print(y)\n", + "y = x.view(-1,8) # This will be 2X8\n", + "print(y)\n", + "print(y.shape)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "GizDT_Fd8YYG", + "outputId": "10f6343b-7d45-45e6-f4de-8eee9580eb9f" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([[0.5364, 0.7047, 0.0173, 0.8284],\n", + " [0.2784, 0.7399, 0.7040, 0.2059],\n", + " [0.0178, 0.7920, 0.0271, 0.7192],\n", + " [0.5300, 0.8264, 0.3430, 0.2937]])\n", + "tensor([0.5364, 0.7047, 0.0173, 0.8284, 0.2784, 0.7399, 0.7040, 0.2059, 0.0178,\n", + " 0.7920, 0.0271, 0.7192, 0.5300, 0.8264, 0.3430, 0.2937])\n", + "tensor([[0.5364, 0.7047, 0.0173, 0.8284, 0.2784, 0.7399, 0.7040, 0.2059],\n", + " [0.0178, 0.7920, 0.0271, 0.7192, 0.5300, 0.8264, 0.3430, 0.2937]])\n", + "torch.Size([2, 8])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##converting from numpy to tensor and vice versa:" + ], + "metadata": { + "id": "xmWWLN468_i6" + } + }, + { + "cell_type": "code", + "source": [ + "import numpy as np" + ], + "metadata": { + "id": "58BQFibR8loI" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "###If the tensor is on the CPU not the GPU then both tensor and numpy array will share the same memory location. Meaning that if we change one, it will affect the other." + ], + "metadata": { + "id": "fAAnRV_T9br8" + } + }, + { + "cell_type": "code", + "source": [ + "a = torch.ones(5)\n", + "print(a)\n", + "b = a.numpy()\n", + "print(b)\n", + "print(type(b))" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "PgWPHb569F6T", + "outputId": "fbd7e7ae-3892-4a71-a66f-805cfd34f66b" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([1., 1., 1., 1., 1.])\n", + "[1. 1. 1. 1. 1.]\n", + "\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "a.add_(1)\n", + "print(a)\n", + "print(b)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "GKUgPJZ19NOK", + "outputId": "971cd1de-ffff-41a5-dc32-1fbbc90db32d" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([2., 2., 2., 2., 2.])\n", + "[2. 2. 2. 2. 2.]\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "a = np.ones(5)\n", + "print(a)\n", + "b = torch.from_numpy(a)\n", + "print(b)\n", + "a+=1\n", + "print(a)\n", + "print(b)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "tJAyFBFA9txU", + "outputId": "a6a063b6-140a-4800-d340-a6328eb92923" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "[1. 1. 1. 1. 1.]\n", + "tensor([1., 1., 1., 1., 1.], dtype=torch.float64)\n", + "[2. 2. 2. 2. 2.]\n", + "tensor([2., 2., 2., 2., 2.], dtype=torch.float64)\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Checking for GPU & Moving Tensors to GPU:" + ], + "metadata": { + "id": "PKGs_loU-heS" + } + }, + { + "cell_type": "code", + "source": [ + "if(torch.cuda.is_available()):\n", + " device = torch.device(\"cuda\")\n", + " x = torch.ones(5, device = device)\n", + " y = torch.ones(5)\n", + " y = y.to(device)\n", + " z = x + y # This will be performed on the GPU\n", + " #z.numpy() will give an error; as numpy is only available on cpu\n", + " z = z.to(\"cpu\")\n", + " z.numpy" + ], + "metadata": { + "id": "hswHMpMn93UN" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "###Calculating Gradience:" + ], + "metadata": { + "id": "zhvTUHzz_nBh" + } + }, + { + "cell_type": "code", + "source": [ + "x = torch.rand(5, requires_grad = True) # This will tell PyTorch that it will need to calculate the gradience for this tensor later in the optimization step\n", + "print(x)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "uP6lYB4e-qYR", + "outputId": "0aeec663-1821-43b6-cad1-482f6e09e1ac" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([0.7941, 0.0098, 0.2807, 0.6435, 0.2227], requires_grad=True)\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Gradient Calculations:" + ], + "metadata": { + "id": "wTl7xSq3AGOA" + } + }, + { + "cell_type": "markdown", + "source": [ + "### 1- Forward Pass: Compute the loss\n", + "### 2- Compute Local Gradients\n", + "### 3- Backward Pass: Compute dloss/dweights using the chain rule" + ], + "metadata": { + "id": "gIPnxHQuSjCu" + } + }, + { + "cell_type": "markdown", + "source": [ + "###For each operation done to x, PyTorch will create a computation graph (y = x + 2, the inputs are x and 2 and + is in a node and the output is y. Using this graph with backpropagation, PyTorch can calculate the gradients." + ], + "metadata": { + "id": "jeIKkLKuD0xY" + } + }, + { + "cell_type": "code", + "source": [ + "# rand is a uniform sitribution [0,1) but randn is a normal distribution (-1,1)\n", + "x = torch.randn(3, requires_grad = True)\n", + "y = x + 2\n", + "print(x)\n", + "print(y)\n", + "z = y * y * 2\n", + "z = z.mean()\n", + "print(z)\n", + "z.backward() # Calculates the gradient of z with respect to x dz/dx using chain rule and this works for SCALARS since z is a scalar\n", + "print(x.grad)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "NyozX-WK_9A7", + "outputId": "feff0de5-c9a7-40dd-a9eb-f90a09f4f260" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([ 3.6317, -0.7236, 0.6677], requires_grad=True)\n", + "tensor([5.6317, 1.2764, 2.6677], grad_fn=)\n", + "tensor(26.9743, grad_fn=)\n", + "tensor([7.5089, 1.7018, 3.5570])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "x = torch.randn(3, requires_grad = True)\n", + "y = x + 2\n", + "print(x)\n", + "print(y)\n", + "z = y * y * 2\n", + "print(z)\n", + "v = torch.tensor([0.1,1.0,0.001],dtype = torch.float32)\n", + "z.backward(v) # Calculates the gradient of z with respect to x dz/dx using chain rule passing a vector with the same size as z will make it work\n", + "print(x.grad)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "j6GDv62eEY_a", + "outputId": "e331da23-da49-45d3-cece-d0f72028108b" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([-0.8228, 0.3881, -0.1317], requires_grad=True)\n", + "tensor([1.1772, 2.3881, 1.8683], grad_fn=)\n", + "tensor([ 2.7715, 11.4062, 6.9807], grad_fn=)\n", + "tensor([4.7087e-01, 9.5525e+00, 7.4730e-03])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Prevent Tracking Gradients:" + ], + "metadata": { + "id": "mYhUtVukGjiI" + } + }, + { + "cell_type": "markdown", + "source": [ + "### We usually do this to variables that we don't want to be part of our computational graph" + ], + "metadata": { + "id": "zKKDymzobvmC" + } + }, + { + "cell_type": "code", + "source": [ + "# There are several ways\n", + "# 1- x.requires_grad_(False)\n", + "# 2- x.detach() This creates a new tensor that doesn't require the gradient\n", + "# 3- with torch.no_grad(): then do the operations inside this with\n", + "x.requires_grad_(False)\n", + "print(x)\n", + "\n", + "x.requires_grad_(True)\n", + "print(x)\n", + "y = x.detach()\n", + "print(y)\n", + "\n", + "with torch.no_grad():\n", + " y = x + 2\n", + " print(y)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "5T_sDsO4GFC9", + "outputId": "fb0b758c-7689-4793-c87c-47514b08c8a7" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([-0.8228, 0.3881, -0.1317])\n", + "tensor([-0.8228, 0.3881, -0.1317], requires_grad=True)\n", + "tensor([-0.8228, 0.3881, -0.1317])\n", + "tensor([1.1772, 2.3881, 1.8683])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Training Example:" + ], + "metadata": { + "id": "fh2C2KCPH4Ry" + } + }, + { + "cell_type": "markdown", + "source": [ + "### Gradients are accumulated by default. Therefore, we must empty the gradients before the next loop." + ], + "metadata": { + "id": "CmJdtMcwIhKI" + } + }, + { + "cell_type": "code", + "source": [ + "weights = torch.ones(4, requires_grad = True)\n", + "for epoch in range(2):\n", + " model_output = (weights * 3).sum()\n", + " model_output.backward()\n", + " print(weights.grad) # For one iteration, it will output tensor([3., 3., 3., 3.]). For twp iterations, it will output tensor([6., 6., 6., 6.])\n", + " weights.grad.zero_()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "dMNjT7nRHXVW", + "outputId": "226bb424-4449-4561-c479-fffaaa15d1be" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([3., 3., 3., 3.])\n", + "tensor([3., 3., 3., 3.])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Training & Prediction:" + ], + "metadata": { + "id": "fKffsvq1JjlP" + } + }, + { + "cell_type": "markdown", + "source": [ + "## Steps:\n", + "1. Design Model(input size, output size, forward) forward is the layers\n", + "2. Construct Loss & Optimizer\n", + "3. Training Loop\n", + " * Forward Pass: Compute prediction\n", + " * Backward Pass: Gradients\n", + " * Update Weights\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + " \n", + "\n", + "\n", + "\n" + ], + "metadata": { + "id": "sSzZx7mydJpe" + } + }, + { + "cell_type": "markdown", + "source": [ + "### Prediction: Manually\n", + "### Gradient Computation: Autograd\n", + "### Loss Computation: Manually\n", + "### Parameter Updates: Manually" + ], + "metadata": { + "id": "GLyqZ3-PcdXN" + } + }, + { + "cell_type": "code", + "source": [ + "X = torch.tensor([1,2,3,4], dtype = torch.float32)\n", + "Y = torch.tensor([2,4,6,8], dtype = torch.float32)\n", + "w = torch.tensor(0.0, dtype = torch.float32, requires_grad = True)\n", + "\n", + "# Forward pass \n", + "def forward(x):\n", + " return w * x\n", + "\n", + "# Loss\n", + "def loss(y, y_predicted):\n", + " return ((y_predicted - y) ** 2).mean()\n", + "\n", + "print(\"Prediction before training: \" + str(forward(5)) + \"\")\n", + "\n", + "# Training\n", + "lr = 0.01\n", + "n_iters = 100\n", + "\n", + "for epoch in range(n_iters):\n", + " # Prediction = forward pass\n", + " y_pred = forward(X)\n", + "\n", + " # Loss\n", + " l = loss(Y, y_pred)\n", + "\n", + " # Gradients = backward pass\n", + " l.backward() # dloss/dw\n", + "\n", + " # Update weights\n", + " with torch.no_grad():\n", + " w-= lr * w.grad\n", + "\n", + " # Zero gradients\n", + " w.grad.zero_()\n", + "\n", + " if(epoch % 10 == 0):\n", + " print(\"Epoch \" + str(epoch + 1) + \" weight = \" + str(w.item()) + \" loss = \" +str(l.item()) +\"\")\n", + "\n", + "print(\"Prediction after training: \" + str(forward(5).item()) + \"\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "g4WApzPwH943", + "outputId": "09e79085-bc08-4b5b-e625-a101bb2656cd" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Prediction before training: tensor(0., grad_fn=)\n", + "Epoch 1 weight = 0.29999998211860657 loss = 30.0\n", + "Epoch 11 weight = 1.6653136014938354 loss = 1.1627856492996216\n", + "Epoch 21 weight = 1.934108853340149 loss = 0.0450688973069191\n", + "Epoch 31 weight = 1.987027645111084 loss = 0.0017468547448515892\n", + "Epoch 41 weight = 1.9974461793899536 loss = 6.770494655938819e-05\n", + "Epoch 51 weight = 1.9994971752166748 loss = 2.6243997126584873e-06\n", + "Epoch 61 weight = 1.9999010562896729 loss = 1.0175587306093803e-07\n", + "Epoch 71 weight = 1.9999804496765137 loss = 3.9741685498029256e-09\n", + "Epoch 81 weight = 1.999996304512024 loss = 1.4670220593870908e-10\n", + "Epoch 91 weight = 1.9999992847442627 loss = 5.076827847005916e-12\n", + "Prediction after training: 9.999998092651367\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "### Prediction: Manually\n", + "### Gradient Computation: Autograd\n", + "### Loss Computation: PyTorch Loss\n", + "### Parameter Updates: PyTorch Optimizer" + ], + "metadata": { + "id": "DKisEQgAct1O" + } + }, + { + "cell_type": "code", + "source": [ + "import torch.nn as nn" + ], + "metadata": { + "id": "u69Jm8bWeaK2" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "X = torch.tensor([1,2,3,4], dtype = torch.float32)\n", + "Y = torch.tensor([2,4,6,8], dtype = torch.float32)\n", + "w = torch.tensor(0.0, dtype = torch.float32, requires_grad = True)\n", + "\n", + "# Forward pass \n", + "def forward(x):\n", + " return w * x\n", + "\n", + "print(\"Prediction before training: \" + str(forward(5)) + \"\")\n", + "\n", + "# Training\n", + "lr = 0.01\n", + "n_iters = 100\n", + "loss = nn.MSELoss() # loss is a callable function\n", + "optimizer = torch.optim.SGD([w], lr = lr)\n", + "\n", + "for epoch in range(n_iters):\n", + " # Prediction = forward pass\n", + " y_pred = forward(X)\n", + "\n", + " # Loss\n", + " l = loss(Y, y_pred)\n", + "\n", + " # Gradients = backward pass\n", + " l.backward() # dloss/dw\n", + "\n", + " # Update weights\n", + " optimizer.step()\n", + "\n", + " # Zero gradients\n", + " optimizer.zero_grad()\n", + "\n", + " if(epoch % 10 == 0):\n", + " print(\"Epoch \" + str(epoch + 1) + \" weight = \" + str(w.item()) + \" loss = \" +str(l.item()) +\"\")\n", + "\n", + "print(\"Prediction after training: \" + str(forward(5).item()) + \"\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "shx6tbP9JM4G", + "outputId": "62866c4f-2ae2-4696-b191-4f2fdd9c6dfc" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Prediction before training: tensor(0., grad_fn=)\n", + "Epoch 1 weight = 0.29999998211860657 loss = 30.0\n", + "Epoch 11 weight = 1.6653136014938354 loss = 1.1627856492996216\n", + "Epoch 21 weight = 1.934108853340149 loss = 0.0450688973069191\n", + "Epoch 31 weight = 1.987027645111084 loss = 0.0017468547448515892\n", + "Epoch 41 weight = 1.9974461793899536 loss = 6.770494655938819e-05\n", + "Epoch 51 weight = 1.9994971752166748 loss = 2.6243997126584873e-06\n", + "Epoch 61 weight = 1.9999010562896729 loss = 1.0175587306093803e-07\n", + "Epoch 71 weight = 1.9999804496765137 loss = 3.9741685498029256e-09\n", + "Epoch 81 weight = 1.999996304512024 loss = 1.4670220593870908e-10\n", + "Epoch 91 weight = 1.9999992847442627 loss = 5.076827847005916e-12\n", + "Prediction after training: 9.999998092651367\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "### Prediction: PyTorch Model\n", + "### Gradient Computation: Autograd\n", + "### Loss Computation: PyTorch Loss\n", + "### Parameter Updates: PyTorch Optimizer" + ], + "metadata": { + "id": "3P6Mr9Nrc4kq" + } + }, + { + "cell_type": "markdown", + "source": [ + "### We usually need to design our model. But, since linear regression is alredy implemented in PyTorch, we simply call nn.Linear. Otherwise, we would need to create a model class" + ], + "metadata": { + "id": "YDZw84YFfjRM" + } + }, + { + "cell_type": "code", + "source": [ + "X = torch.tensor([[1],[2],[3],[4]], dtype = torch.float32)\n", + "Y = torch.tensor([[2],[4],[6],[8]], dtype = torch.float32)\n", + "X_test = torch.tensor([5], dtype = torch.float32)\n", + "\n", + "\n", + "n_samples, n_features = X.shape\n", + "print(n_samples, n_features)\n", + "\n", + "\n", + "input_size = n_features\n", + "output_size = n_features\n", + "\n", + "\n", + "# model = nn.Linear(input_size, output_size) we could do this since it is only one layer and already provided by PyTorch\n", + "\n", + "\n", + "# This is the general way\n", + "class LinearRegression(nn.Module):\n", + " def __init__(self, input_dim, output_dim):\n", + " super(LinearRegression, self).__init__()\n", + "\n", + " # Define Layers\n", + " self.lin = nn.Linear(input_dim, output_dim)\n", + "\n", + " def forward(self, x):\n", + " return self.lin(x)\n", + "\n", + "model = LinearRegression(input_size, output_size)\n", + "print(\"Prediction before training: \" + str(model(X_test).item()) + \"\")\n", + "\n", + "# Training\n", + "lr = 0.01\n", + "n_iters = 100\n", + "loss = nn.MSELoss() # loss is a callable function\n", + "optimizer = torch.optim.SGD(model.parameters(), lr = lr)\n", + "\n", + "for epoch in range(n_iters):\n", + " # Prediction = forward pass\n", + " y_pred = model(X)\n", + "\n", + " # Loss\n", + " l = loss(Y, y_pred)\n", + "\n", + " # Gradients = backward pass\n", + " l.backward() # dloss/dw\n", + "\n", + " # Update weights\n", + " optimizer.step()\n", + "\n", + " # Zero gradients\n", + " optimizer.zero_grad()\n", + "\n", + " if(epoch % 10 == 0):\n", + " [w, b] = model.parameters()\n", + " print(\"Epoch \" + str(epoch + 1) + \" weight = \" + str(w[0][0].item()) + \" loss = \" +str(l.item()) +\"\")\n", + "\n", + "print(\"Prediction after training: \" + str(model(X_test).item()) + \"\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "DnUqsKdBc51B", + "outputId": "11750605-9cb4-4cc4-83d8-b745b08436da" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "4 1\n", + "Prediction before training: 3.8210551738739014\n", + "Epoch 1 weight = 0.7693529725074768 loss = 9.630396842956543\n", + "Epoch 11 weight = 1.483320713043213 loss = 0.4553367793560028\n", + "Epoch 21 weight = 1.6075764894485474 loss = 0.2059555947780609\n", + "Epoch 31 weight = 1.636699914932251 loss = 0.18820145726203918\n", + "Epoch 41 weight = 1.6502512693405151 loss = 0.17709803581237793\n", + "Epoch 51 weight = 1.6610361337661743 loss = 0.1667861044406891\n", + "Epoch 61 weight = 1.671121597290039 loss = 0.1570783108472824\n", + "Epoch 71 weight = 1.6808480024337769 loss = 0.14793552458286285\n", + "Epoch 81 weight = 1.690277338027954 loss = 0.13932493329048157\n", + "Epoch 91 weight = 1.6994264125823975 loss = 0.1312154084444046\n", + "Prediction after training: 9.397339820861816\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Linear Regression:\n", + "\n", + "F = wx + b" + ], + "metadata": { + "id": "-WuYvuyxQ4sq" + } + }, + { + "cell_type": "code", + "source": [ + "import torch\n", + "import torch.nn as nn\n", + "import numpy as np\n", + "from sklearn import datasets\n", + "import matplotlib.pyplot as plt " + ], + "metadata": { + "id": "d55thegHf-5t" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## 1- Generate Dataset:" + ], + "metadata": { + "id": "55vaAVYJRdIF" + } + }, + { + "cell_type": "code", + "source": [ + "X_numpy, Y_numpy = datasets.make_regression(n_samples = 100, n_features = 1, noise = 20, random_state = 1)" + ], + "metadata": { + "id": "BfZu0e0LRWO0" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "X = torch.from_numpy(X_numpy.astype(np.float32))\n", + "Y = torch.from_numpy(Y_numpy.astype(np.float32))\n", + "print(X.shape)\n", + "print(Y.shape)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "-6GyYYwjRusT", + "outputId": "46c8e28e-6207-4eb4-bdc1-81793368254e" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "torch.Size([100, 1])\n", + "torch.Size([100])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "Y = Y.view(Y.shape[0],1) # Transform Y from row vector to column vector\n", + "print(X.shape)\n", + "print(Y.shape)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "GZ94zjK4SNOb", + "outputId": "bf1b2e73-bc1b-490e-c9e0-4b4e157dfe26" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "torch.Size([100, 1])\n", + "torch.Size([100, 1])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##2- Model:" + ], + "metadata": { + "id": "DQJwcshhTGQ9" + } + }, + { + "cell_type": "code", + "source": [ + "n_samples, n_features = X.shape\n", + "input_size = n_features\n", + "output_size = 1" + ], + "metadata": { + "id": "tHxNIE2RSdy2" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "class LinearRegression(nn.Module):\n", + " def __init__(self, input_dim, output_dim):\n", + " super(LinearRegression, self).__init__()\n", + "\n", + " # Define Layers\n", + " self.lin = nn.Linear(input_dim, output_dim)\n", + "\n", + " def forward(self, x):\n", + " return self.lin(x)" + ], + "metadata": { + "id": "PIGTrSoBSjMz" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "model = LinearRegression(input_size, output_size)" + ], + "metadata": { + "id": "LDpjDCojSz-s" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(model)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "xaOB52CybQ6D", + "outputId": "976a7c2d-938a-480a-cd85-fc80f5966911" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "LinearRegression(\n", + " (lin): Linear(in_features=1, out_features=1, bias=True)\n", + ")\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##3- Loss & Optimizer:" + ], + "metadata": { + "id": "c3wHRlxjTJFN" + } + }, + { + "cell_type": "code", + "source": [ + "learning_rate = 0.01\n", + "criterion = nn.MSELoss()\n", + "optimizer = torch.optim.SGD(model.parameters(), lr = learning_rate)" + ], + "metadata": { + "id": "3HAdqBQmS3N4" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##4- Training:" + ], + "metadata": { + "id": "00c9wPUlT31g" + } + }, + { + "cell_type": "code", + "source": [ + "num_epochs = 100\n", + "for epoch in range(num_epochs):\n", + "\n", + " # Forward pass and loss\n", + " y_predicted = model(X)\n", + " loss = criterion(y_predicted, Y)\n", + "\n", + " # Backward pass (calculating gradients)\n", + " loss.backward()\n", + "\n", + " # Update\n", + " optimizer.step()\n", + "\n", + " # Empty gradients\n", + " optimizer.zero_grad()\n", + "\n", + " if((epoch+1) % 10 == 0):\n", + " print(\"Epoch \" + str(epoch + 1) + \" loss = \" +str(loss.item()) +\"\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "bQuv9yvpTnQ3", + "outputId": "2204eb83-850a-4d19-d4cf-f6201de1efc4" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Epoch 10 loss = 4450.9658203125\n", + "Epoch 20 loss = 3318.73193359375\n", + "Epoch 30 loss = 2499.74365234375\n", + "Epoch 40 loss = 1906.6920166015625\n", + "Epoch 50 loss = 1476.815185546875\n", + "Epoch 60 loss = 1164.925048828125\n", + "Epoch 70 loss = 938.4434204101562\n", + "Epoch 80 loss = 773.85107421875\n", + "Epoch 90 loss = 654.1484985351562\n", + "Epoch 100 loss = 567.034423828125\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "predicted = model(X).detach().numpy() # Detach this operation to prevent it from being used in our computation graph\n", + "plt.plot(X_numpy, Y_numpy, 'ro')\n", + "plt.plot(X_numpy, predicted, 'b')\n", + "plt.show()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 265 + }, + "id": "BW_6_s1CT-Px", + "outputId": "f866a11e-3ae9-4097-a116-5b95dcc35865" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "
" + ], + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD4CAYAAAAEhuazAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/NK7nSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAg0klEQVR4nO3de5Bc1X0n8O9XgwYYwGU0GhOCpBnZlrdWpBywJrJjHIIBWwKTFQ9ji4xkAcGDeFSc7G7tQumPZKsyVVvZJQleW8bDRrxmjFZ+CJQyTwEVnMQ2jLAMEkRmwBo9jGEYqnhoBBpJv/3j3Fbf7r739uvevt19v5+qrpk5fef20RT8+vQ5v/M7NDOIiEi2zEq7AyIi0ngK/iIiGaTgLyKSQQr+IiIZpOAvIpJBx6XdgUrNnTvX+vr60u6GiEjL2LZt25tm1hP0XMsE/76+PoyNjaXdDRGRlkFyIuw5TfuIiGSQgr+ISAYp+IuIZJCCv4hIBin4i4hkkIK/iEix0VGgrw+YNct9HR1Nu0exU/AXEfEbHQUGB4GJCcDMfR0cbPwbQMJvQAr+IiJ+69YB09OFbdPTrr1RGv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TgLyKSQQr+IiIZ9P8B95XUSx/h704AAAAASUVORK5CYII=\n" + }, + "metadata": { + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Logistic Regression:\n", + "\n", + "F = wx + b and sigmoid at the end" + ], + "metadata": { + "id": "RCLfE2-EdYv-" + } + }, + { + "cell_type": "code", + "source": [ + "import torch\n", + "import torch.nn as nn\n", + "import numpy as np\n", + "from sklearn import datasets\n", + "from sklearn.preprocessing import StandardScaler\n", + "from sklearn.model_selection import train_test_split\n", + "import matplotlib.pyplot as plt " + ], + "metadata": { + "id": "EMXIK81EcuAu" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##1- Generating Dataset:" + ], + "metadata": { + "id": "18V7a0l0d21t" + } + }, + { + "cell_type": "code", + "source": [ + "bc = datasets.load_breast_cancer()\n", + "x, y = bc.data, bc.target" + ], + "metadata": { + "id": "P0qV7-2_deWR" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "n_samples, n_features = x.shape\n", + "print(x.shape)\n", + "print(y.shape)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Vt3SlhSqdfa6", + "outputId": "816f1812-3a13-43bc-e92f-0c222d895406" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "(569, 30)\n", + "(569,)\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size = 0.2, random_state = 1234)" + ], + "metadata": { + "id": "Cou3_vlzfNP0" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(x_train.shape)\n", + "print(x_test.shape)\n", + "print(y_train.shape)\n", + "print(y_test.shape)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "iAkIvl-Kdfdg", + "outputId": "50bf325d-228f-4441-b21e-e2fc6ade70d9" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "(455, 30)\n", + "(114, 30)\n", + "(455,)\n", + "(114,)\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "###StandardScaler will make our features have zero mean and unit variance. This is always recommended to do when we deal with logistic regression." + ], + "metadata": { + "id": "HEBXlOA4fycB" + } + }, + { + "cell_type": "code", + "source": [ + "sc = StandardScaler()\n", + "x_train = sc.fit_transform(x_train)\n", + "x_test = sc.transform(x_test)" + ], + "metadata": { + "id": "xLQ2sXzwflqQ" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "x_train = torch.from_numpy(x_train.astype(np.float32))\n", + "x_test = torch.from_numpy(x_test.astype(np.float32))\n", + "y_train = torch.from_numpy(y_train.astype(np.float32))\n", + "y_test = torch.from_numpy(y_test.astype(np.float32))" + ], + "metadata": { + "id": "x2SMPCk9gRR3" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(x_train.shape)\n", + "print(x_test.shape)\n", + "print(y_train.shape)\n", + "print(y_test.shape)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "CtdcwGFQgZet", + "outputId": "b3491324-8393-4599-ff66-eb9309aaee76" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "torch.Size([455, 30])\n", + "torch.Size([114, 30])\n", + "torch.Size([455])\n", + "torch.Size([114])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "y_train = y_train.view(y_train.shape[0],1)\n", + "y_test = y_test.view(y_test.shape[0],1)\n", + "print(y_train.shape)\n", + "print(y_test.shape)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "TNCkdUCvggu6", + "outputId": "77921a88-da97-41fc-e56a-c90c7628156e" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "torch.Size([455, 1])\n", + "torch.Size([114, 1])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##2- Model:" + ], + "metadata": { + "id": "ZA1kVA7jec8b" + } + }, + { + "cell_type": "code", + "source": [ + "class LogisticRegression(nn.Module):\n", + " def __init__(self, n_input_features):\n", + " super(LogisticRegression, self).__init__()\n", + "\n", + " # Define Layers\n", + " self.linear = nn.Linear(n_input_features, 1)\n", + "\n", + " def forward(self, x):\n", + " y_predicted = torch.sigmoid(self.linear(x))\n", + " return y_predicted" + ], + "metadata": { + "id": "pnusNBHjdfjT" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "model = LogisticRegression(n_features)" + ], + "metadata": { + "id": "ZkEgc45adffw" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##3- Loss & Optimizer:" + ], + "metadata": { + "id": "CFW0F-cnhqTW" + } + }, + { + "cell_type": "code", + "source": [ + "learning_rate = 0.01\n", + "criterion = nn.BCELoss()\n", + "optimizer = torch.optim.SGD(model.parameters(), lr = learning_rate)" + ], + "metadata": { + "id": "qCjQlcCGhpgD" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##4- Training Loop:" + ], + "metadata": { + "id": "c8k7t_8dh2bp" + } + }, + { + "cell_type": "code", + "source": [ + "num_epochs = 100\n", + "for epoch in range(num_epochs):\n", + " # Forward pass and loss\n", + " y_predicted = model(x_train)\n", + " loss = criterion(y_predicted, y_train)\n", + "\n", + " # Backward pass (calculating gradients)\n", + " loss.backward()\n", + "\n", + " # Update\n", + " optimizer.step()\n", + "\n", + " # Empty gradients\n", + " optimizer.zero_grad()\n", + "\n", + " if((epoch+1) % 10 == 0):\n", + " print(\"Epoch \" + str(epoch + 1) + \" loss = \" +str(loss.item()) +\"\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "k9A6wbdih1vm", + "outputId": "74e0a511-95e9-474d-9fd4-f35e6177189d" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Epoch 10 loss = 0.603636622428894\n", + "Epoch 20 loss = 0.48827680945396423\n", + "Epoch 30 loss = 0.41575825214385986\n", + "Epoch 40 loss = 0.36646655201911926\n", + "Epoch 50 loss = 0.3308294713497162\n", + "Epoch 60 loss = 0.3038000166416168\n", + "Epoch 70 loss = 0.28251707553863525\n", + "Epoch 80 loss = 0.2652551829814911\n", + "Epoch 90 loss = 0.25091785192489624\n", + "Epoch 100 loss = 0.23877714574337006\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##5- Evalutaion:" + ], + "metadata": { + "id": "Iqg8uHbdiMVY" + } + }, + { + "cell_type": "code", + "source": [ + "# To prevent tracking the gradient calculations for the below variables\n", + "with torch.no_grad():\n", + " y_predicted = model(x_test)\n", + " y_predicted_classes = y_predicted.round()\n", + " acc = y_predicted_classes.eq(y_test).sum() / float(y_test.shape[0])\n", + " print(\"accuracy = \"+ str(acc) +\"\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "D_y81L7ciG9K", + "outputId": "0a73e3fc-e85b-4c83-a2bc-46b34fbbf661" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "accuracy = tensor(0.9123)\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Dataset & Data Loader Classes:" + ], + "metadata": { + "id": "Tjr70ZWPPajG" + } + }, + { + "cell_type": "markdown", + "source": [ + "### This is useful for large datasets\n", + "\n", + "\n", + "\n", + "* **Epoch:** Forward and backward pass for all training samples.\n", + "* **batch_size:** No. of training samples in one forward and backward pass.\n", + "* **Iterations:** No. of times we need to loop to cover all the training samples (one epoch).\n", + "\n", + "Ex. 100 samples with batch size 20 will have 5 iterations to complete one epoch.\n", + "\n" + ], + "metadata": { + "id": "Qcp0HhrqPqh3" + } + }, + { + "cell_type": "code", + "source": [ + "!wget https://gist.github.com/tijptjik/9408623/archive/b237fa5848349a14a14e5d4107dc7897c21951f5.zip" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "xjnQ_TMWRzNw", + "outputId": "1390b9e9-bb7f-42a9-c6c9-e59e477012bb" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "--2023-03-09 16:50:02-- https://gist.github.com/tijptjik/9408623/archive/b237fa5848349a14a14e5d4107dc7897c21951f5.zip\n", + "Resolving gist.github.com (gist.github.com)... 140.82.112.3\n", + "Connecting to gist.github.com (gist.github.com)|140.82.112.3|:443... connected.\n", + "HTTP request sent, awaiting response... 302 Found\n", + "Location: https://codeload.github.com/gist/9408623/zip/b237fa5848349a14a14e5d4107dc7897c21951f5 [following]\n", + "--2023-03-09 16:50:02-- https://codeload.github.com/gist/9408623/zip/b237fa5848349a14a14e5d4107dc7897c21951f5\n", + "Resolving codeload.github.com (codeload.github.com)... 140.82.114.10\n", + "Connecting to codeload.github.com (codeload.github.com)|140.82.114.10|:443... connected.\n", + "HTTP request sent, awaiting response... 200 OK\n", + "Length: unspecified [application/zip]\n", + "Saving to: ‘b237fa5848349a14a14e5d4107dc7897c21951f5.zip’\n", + "\n", + "\r b237fa584 [<=> ] 0 --.-KB/s \rb237fa5848349a14a14 [ <=> ] 4.57K --.-KB/s in 0s \n", + "\n", + "2023-03-09 16:50:02 (10.1 MB/s) - ‘b237fa5848349a14a14e5d4107dc7897c21951f5.zip’ saved [4680]\n", + "\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "!unzip b237fa5848349a14a14e5d4107dc7897c21951f5.zip" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ULLEMQH_R8pW", + "outputId": "e177cb31-e9f5-4939-c930-1f3423d5beaa" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Archive: b237fa5848349a14a14e5d4107dc7897c21951f5.zip\n", + "b237fa5848349a14a14e5d4107dc7897c21951f5\n", + " creating: 9408623-b237fa5848349a14a14e5d4107dc7897c21951f5/\n", + " inflating: 9408623-b237fa5848349a14a14e5d4107dc7897c21951f5/wine.csv \n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "!cp /content/9408623-b237fa5848349a14a14e5d4107dc7897c21951f5/wine.csv /content/" + ], + "metadata": { + "id": "tsbaxjhgSDfT" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "import shutil\n", + "import os\n", + "os.remove(\"b237fa5848349a14a14e5d4107dc7897c21951f5.zip\")\n", + "shutil.rmtree(\"9408623-b237fa5848349a14a14e5d4107dc7897c21951f5\")" + ], + "metadata": { + "id": "fjeRHF8jSQ8Z" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "import torch\n", + "import torchvision\n", + "from torch.utils.data import Dataset, DataLoader\n", + "import numpy as np\n", + "import math" + ], + "metadata": { + "id": "ERqVc5TCiHAo" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Dataset:" + ], + "metadata": { + "id": "OrUnCNC4UTBs" + } + }, + { + "cell_type": "code", + "source": [ + "class WineDataset(Dataset):\n", + " def __init__(self):\n", + " # Data loading\n", + " xy = np.loadtxt(\"wine.csv\", delimiter = ',', dtype = np.float32, skiprows = 1)\n", + " self.x = torch.from_numpy(xy[:, 1:])\n", + " self.y = torch.from_numpy(xy[:, [0]]) # We took it like this so that the size will be (no. of samples, 1) intead of (no. of samples, )\n", + " self.n_samples = xy.shape[0]\n", + " def __getitem__(self, index):\n", + " # dataset[0]\n", + " return self.x[index], self.y[index]\n", + " def __len__(self):\n", + " # len(dataset)\n", + " return self.n_samples" + ], + "metadata": { + "id": "9_I4be6jRD3z" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dataset = WineDataset()" + ], + "metadata": { + "id": "iI55pk-bTtnG" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "first_sample = dataset[0]\n", + "features, labels = first_sample" + ], + "metadata": { + "id": "g4u3lJmoTy7l" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(features)\n", + "print(labels)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "LdZycxNCT481", + "outputId": "a4889a48-2d2b-48a5-8dbe-4c18679c4587" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([1.4230e+01, 1.7100e+00, 2.4300e+00, 1.5600e+01, 1.2700e+02, 2.8000e+00,\n", + " 3.0600e+00, 2.8000e-01, 2.2900e+00, 5.6400e+00, 1.0400e+00, 3.9200e+00,\n", + " 1.0650e+03])\n", + "tensor([1.])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Dataloader:" + ], + "metadata": { + "id": "98h-IqLTUU08" + } + }, + { + "cell_type": "code", + "source": [ + "# Setting the argument num_workers as a positive integer will turn on multi-process data loading with the specified number of loader worker processes.\n", + "dataloader = DataLoader(dataset = dataset, batch_size = 4, shuffle = True, num_workers = 2)" + ], + "metadata": { + "id": "d69unw0wUDZI" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dataiter = iter(dataloader)\n", + "data = next(dataiter)\n", + "features, labels = data" + ], + "metadata": { + "id": "4XswaFrCVAjZ" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Since batch_size = 4, we will have four numbers for the labels, since they are labels of 4 samples.\n", + "print(features)\n", + "print(labels)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "RaWX_qm_VBFa", + "outputId": "6638ac51-d86c-46d1-d286-f07fa47635f4" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([[1.3500e+01, 3.1200e+00, 2.6200e+00, 2.4000e+01, 1.2300e+02, 1.4000e+00,\n", + " 1.5700e+00, 2.2000e-01, 1.2500e+00, 8.6000e+00, 5.9000e-01, 1.3000e+00,\n", + " 5.0000e+02],\n", + " [1.3630e+01, 1.8100e+00, 2.7000e+00, 1.7200e+01, 1.1200e+02, 2.8500e+00,\n", + " 2.9100e+00, 3.0000e-01, 1.4600e+00, 7.3000e+00, 1.2800e+00, 2.8800e+00,\n", + " 1.3100e+03],\n", + " [1.2510e+01, 1.2400e+00, 2.2500e+00, 1.7500e+01, 8.5000e+01, 2.0000e+00,\n", + " 5.8000e-01, 6.0000e-01, 1.2500e+00, 5.4500e+00, 7.5000e-01, 1.5100e+00,\n", + " 6.5000e+02],\n", + " [1.4340e+01, 1.6800e+00, 2.7000e+00, 2.5000e+01, 9.8000e+01, 2.8000e+00,\n", + " 1.3100e+00, 5.3000e-01, 2.7000e+00, 1.3000e+01, 5.7000e-01, 1.9600e+00,\n", + " 6.6000e+02]])\n", + "tensor([[3.],\n", + " [1.],\n", + " [3.],\n", + " [3.]])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "## Training Loop:" + ], + "metadata": { + "id": "-5ZmA8GOWFph" + } + }, + { + "cell_type": "code", + "source": [ + "num_epochs = 2\n", + "total_samples = len(dataset)\n", + "n_iterations = math.ceil(total_samples/4)" + ], + "metadata": { + "id": "2v7uM8D9VBHl" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(total_samples, n_iterations)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "30ESt1pdVBK8", + "outputId": "1e3f5a49-f3b4-4013-ab20-23a690d869ae" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "178 45\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "for epoch in range(num_epochs):\n", + " for i, (inputs, labels) in enumerate(dataloader): # enumerate will give us the index and the data\n", + " if((i+1) % 5 == 0):\n", + " print(\"Epoch: \"+str(epoch+1)+\"/\"+str(num_epochs)+\" step: \"+str(i+1)+\"/\"+str(n_iterations)+\" inputs: \"+str(inputs.size())+\"\"+\" labels: \"+str(labels.size())+\"\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "-k4D7BR3WbvK", + "outputId": "b942a112-9f07-4e57-e9ab-b11d78c86e7c" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Epoch: 1/2 step: 5/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 1/2 step: 10/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 1/2 step: 15/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 1/2 step: 20/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 1/2 step: 25/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 1/2 step: 30/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 1/2 step: 35/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 1/2 step: 40/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 1/2 step: 45/45 inputs: torch.Size([2, 13]) labels: torch.Size([2, 1])\n", + "Epoch: 2/2 step: 5/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 2/2 step: 10/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 2/2 step: 15/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 2/2 step: 20/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 2/2 step: 25/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 2/2 step: 30/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 2/2 step: 35/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 2/2 step: 40/45 inputs: torch.Size([4, 13]) labels: torch.Size([4, 1])\n", + "Epoch: 2/2 step: 45/45 inputs: torch.Size([2, 13]) labels: torch.Size([2, 1])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Dataset Transforms:" + ], + "metadata": { + "id": "gjPjFs-LYe2J" + } + }, + { + "cell_type": "markdown", + "source": [ + "* Transforms can be applied to PIL images, tensors, ndarrays, or custom data \n", + "during creation of the Dataset\n", + "\n", + "* complete list of built-in transforms:\n", + "https://pytorch.org/docs/stable/torchvision/transforms.html\n", + "* On Images\n", + "\n", + "CenterCrop, Grayscale, Pad, RandomAffine RandomCrop, RandomHorizontalFlip, RandomRotation Resize, Scale\n", + "* On Tensors\n", + "\n", + "LinearTransformation, Normalize, RandomErasing\n", + "* Conversion\n", + "\n", + "ToPILImage: from tensor or ndrarray\n", + "\n", + "ToTensor : from numpy.ndarray or PILImage\n", + "\n", + "* Generic\n", + "\n", + "Use Lambda\n", + "* Custom\n", + "\n", + "Write own class\n", + "* Compose multiple Transforms\n", + "\n", + "composed = transforms. Compose([Rescale(256),\n", + "RandomCrop(224)])\n", + "\n", + "torchvision.transforms.ReScale(256)\n", + "\n", + "torchvision.transforms.ToTensor()" + ], + "metadata": { + "id": "YsrJq2fwY-wA" + } + }, + { + "cell_type": "code", + "source": [ + "!wget https://gist.github.com/tijptjik/9408623/archive/b237fa5848349a14a14e5d4107dc7897c21951f5.zip" + ], + "metadata": { + "id": "psQfW8Utbhvk" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!unzip b237fa5848349a14a14e5d4107dc7897c21951f5.zip" + ], + "metadata": { + "id": "Oa3TFyNlbiDS" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!cp /content/9408623-b237fa5848349a14a14e5d4107dc7897c21951f5/wine.csv /content/" + ], + "metadata": { + "id": "g8XVkf2obiFp" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "import shutil\n", + "import os\n", + "os.remove(\"b237fa5848349a14a14e5d4107dc7897c21951f5.zip\")\n", + "shutil.rmtree(\"9408623-b237fa5848349a14a14e5d4107dc7897c21951f5\")" + ], + "metadata": { + "id": "iBz7_iUPbiJE" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "import torch\n", + "import torchvision\n", + "from torch.utils.data import Dataset, DataLoader\n", + "import numpy as np\n", + "import math" + ], + "metadata": { + "id": "-ESPpbTjbn4K" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "class WineDataset(Dataset):\n", + " def __init__(self, transform=None):\n", + " # Data loading\n", + " xy = np.loadtxt(\"wine.csv\", delimiter = ',', dtype = np.float32, skiprows = 1)\n", + " self.n_samples = xy.shape[0]\n", + "\n", + " self.x = xy[:, 1:]\n", + " self.y = xy[:, [0]] # We took it like this so that the size will be (no. of samples, 1) intead of (no. of samples, )\n", + " \n", + " self.transform = transform\n", + "\n", + " def __getitem__(self, index):\n", + " # dataset[0]\n", + " sample = self.x[index], self.y[index]\n", + " if(self.transform):\n", + " sample = self.transform(sample)\n", + " return sample\n", + "\n", + " def __len__(self):\n", + " # len(dataset)\n", + " return self.n_samples" + ], + "metadata": { + "id": "k-OVi-uVYpRs" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Creating Custom Transforms:" + ], + "metadata": { + "id": "0dSb9lzdeZtC" + } + }, + { + "cell_type": "code", + "source": [ + "class ToTensor():\n", + " def __call__(self, sample):\n", + " inputs, targets = sample\n", + " return torch.from_numpy(inputs), torch.from_numpy(targets)" + ], + "metadata": { + "id": "logz7TYib51F" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dataset = WineDataset(transform = None)" + ], + "metadata": { + "id": "wfNKJtENcwXw" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "first_data = dataset[0]\n", + "features, labels = first_data " + ], + "metadata": { + "id": "__oRdruxcxPl" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(type(features), type(labels))" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "LpjoxwUDcyLg", + "outputId": "4d0ed658-ca6d-496a-a8e8-7fb25a6b68e7" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + " \n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "dataset = WineDataset(transform = ToTensor())" + ], + "metadata": { + "id": "gvMfVPzMcWeY" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "first_data = dataset[0]\n", + "features, labels = first_data " + ], + "metadata": { + "id": "fqU_Sy44cd48" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(type(features), type(labels))\n", + "print(features)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "m-uHBVaKcjk4", + "outputId": "423fce80-ca7c-45d0-d0ee-b899608f21dd" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + " \n", + "tensor([1.4230e+01, 1.7100e+00, 2.4300e+00, 1.5600e+01, 1.2700e+02, 2.8000e+00,\n", + " 3.0600e+00, 2.8000e-01, 2.2900e+00, 5.6400e+00, 1.0400e+00, 3.9200e+00,\n", + " 1.0650e+03])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "class MulTransform():\n", + " def __init__(self, factor):\n", + " self.factor = factor\n", + "\n", + " def __call__(self, sample):\n", + " inputs, target = sample\n", + " inputs *= self.factor\n", + " return inputs, target" + ], + "metadata": { + "id": "wPZnBodacspR" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Composed Transforms:" + ], + "metadata": { + "id": "JEhC9ZhqedL4" + } + }, + { + "cell_type": "code", + "source": [ + "composed = torchvision.transforms.Compose([ToTensor(),MulTransform(2)])" + ], + "metadata": { + "id": "qGENxvoIdP5K" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dataset = WineDataset(transform = composed)" + ], + "metadata": { + "id": "Pm-IAGUEdhAq" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "first_data = dataset[0]\n", + "features, labels = first_data " + ], + "metadata": { + "id": "ELP7ak6SdhEE" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(type(features), type(labels))\n", + "print(features)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "k3FCUYS9dy-N", + "outputId": "b298485c-70fe-4e28-915e-131680a35b90" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + " \n", + "tensor([2.8460e+01, 3.4200e+00, 4.8600e+00, 3.1200e+01, 2.5400e+02, 5.6000e+00,\n", + " 6.1200e+00, 5.6000e-01, 4.5800e+00, 1.1280e+01, 2.0800e+00, 7.8400e+00,\n", + " 2.1300e+03])\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Feed Forward Neural Network:" + ], + "metadata": { + "id": "LRQkoS8VTxn9" + } + }, + { + "cell_type": "code", + "source": [ + "import torch\n", + "import torch.nn as nn\n", + "import torchvision\n", + "import torchvision.transforms as transforms\n", + "import matplotlib.pyplot as plt" + ], + "metadata": { + "id": "ei69uROPeT5d" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Device configuration\n", + "device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n", + "\n", + "# Hyper parameters\n", + "input_size = 784 # Because our images are of size 28 X 28\n", + "hidden_size = 100 # We can try different sizes\n", + "n_classes = 10\n", + "n_epochs = 2\n", + "batch_size = 100\n", + "learning_rate = 0.001" + ], + "metadata": { + "id": "XtqpWw5oUIde" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Importing MNIST:" + ], + "metadata": { + "id": "YBWeYofSUquD" + } + }, + { + "cell_type": "code", + "source": [ + "train_dataset = torchvision.datasets.MNIST(root = \"./data\", train = True, transform = transforms.ToTensor(), download = True) # download = True means download it if it is not downloaded in the ./data directory\n", + "test_dataset = torchvision.datasets.MNIST(root = \"./data\", train = False, transform = transforms.ToTensor(), download = True)\n", + "\n", + "train_loader = torch.utils.data.DataLoader(dataset = train_dataset, batch_size = batch_size, shuffle = True) # shuffle = True makes it better for training\n", + "test_loader = torch.utils.data.DataLoader(dataset = test_dataset, batch_size = batch_size, shuffle = False)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 443, + "referenced_widgets": [ + "91f8a196593a4933be359267bcc2f95d", + "ac750e8ffae446d1888894ddeb057251", + "05815eebc77447268c0c917172de2851", + "1ae3b669fcb94e87abdcb143f23e125e", + "b739bb5284074f008e5690e85a236d54", + "2a3d6ba9789347d1926b178b886bcc6d", + "e889481abc91418498791fec9ac30e89", + "c02829981c4447558f270d7e52618fc7", + "5ecb99ad82ce44348d87ff746b60b949", + "be7a0d83513144f2a7cc1f1130c22d69", + "1a1469044ec74cd8a9d2be60f0c89220", + "374d5845f53449e9ab5bb3a52379e9f2", + "d835ca1173b34e859e8f152f35ce2366", + "2260db56c0ea4fbdbd30b9e7cc996e4b", + "ec95204d78c743529b676290db6c9c68", + "e17cc640ed30467e9d25159848b6f385", + "40187d3c1a304214aab5b00678d094e5", + "d53f5a5508bb49be9d43648363aa9fa1", + "2ec585015275406c89529723b53a734e", + "f43e0b0d14dd418fa2950da7e2fc4a49", + "634707fa930c45278fc2168190eff31e", + "388dfa78d5644ab4bd5b8664a1efb0ed", + "07b45c311a3645e8afbf113dd2d1cdd0", + "6805a676566f4d46adb4fe4b0e942b64", + "391cc4242755483d8522aeefc27e0e1a", + "39cd6eb0805f44be853d4562836eaacc", + "a40c04cee05c4ead82a05cabd4adbc9f", + "d04f0c7446fe43698d944475c5731fc7", + "637e741426ef4ca1a17947a1f4f76059", + "a3c9d78b94f04bf09c7c178aa87bc6cc", + "752aa1dffa5645a1b0bd36fb3e18ee92", + "1c803e0213b245c59e05540a97e76bce", + "71e7424952fc477ea7a098d0c0f22c70", + "6e3ad3247ddb442793914f55b24f61e7", + "6989040893d746359da962d68be2418f", + "6b6a272d4afd488aad3b5152d7c43e3e", + "01389ddf4acb47d8934f37ceb1895ffb", + "160a1177c75f495c9905efe37db1dd1a", + "0b51f47995ed4e6bbe972c1306a10805", + "31139d781048469ea5e91395972f3029", + "69304e09e3034a53bc4e8e24f2c66022", + "dd38dcfdc1e549148aab52ad20bf5510", + "f14867644e8240568339911c145c449e", + "7b0ff1095517448f8f439ef9beeb1352" + ] + }, + "id": "HsKnQDAOUplK", + "outputId": "65b9eeb1-97ed-43ea-c211-24d87c56818d" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz\n", + "Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to ./data/MNIST/raw/train-images-idx3-ubyte.gz\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + " 0%| | 0/9912422 [00:00" + ], + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD6CAYAAAC4RRw1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/NK7nSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAdTklEQVR4nO3de5BUxdkG8OcVERE+CbfgiigqRAWtuGoojFdUEE1K1KCREoOiwSRqIJpELrGCMUG8oFYpUtmUCBgDRISwmhBFgiAVsQALuYoLlgTIIioolwAC9vfHjm13u2d2dubc+szzq9rat6dnzmn23W3O9PTpFqUUiIjIP4cl3QAiIioOO3AiIk+xAyci8hQ7cCIiT7EDJyLyFDtwIiJPldSBi0hfEVknIutFZHhYjaJkMa/Zxdx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04EZGn2IETEXnK+zHwfNzVB4tdjZCSt2rVKh3/6Ec/surcMlGh1q1bl3QTSsIrcCIiT7EDJyLyFDtwIiJPsQMnIvIUO3AiIk+xAyci8lSmpxESUfkxNydesGCBVdejR4/A5/qIV+BERJ5iB05E5CnvN3Sg4nDh/2xiXjOLGzoQEWUJO3AiIk+xAyci8lTc0wg/BrARQLtcnAbl2JbgrYmKw7zmx7yGp1zbUm9uY/0QU59UZGl9A/JJYFvCk6b2sy3hSVP72RYbh1CIiDzFDpyIyFNJdeBVCZ23PmxLeNLUfrYlPGlqP9tiSGQMnIiISschFCIiT7EDJyLyVKwduIj0FZF1IrJeRIbHee7c+SeKyDYRWWU81kZE5opITe576xja0UlE5ovIGhFZLSJDk2pLGJhXqy2ZyS3zarUllXmNrQMXkSYAxgO4AkA3AANEpFtc58+ZBKCv89hwAPOUUl0BzMuVo3YQwD1KqW4AegK4I/ezSKItJWFevyYTuWVevyadeVVKxfIF4FwArxjlEQBGxHV+47ydAawyyusAVOTiCgDrEmjTbAC909AW5pW5ZV79yWucQygdAWwyyptzjyWtg1KqNhdvBdAhzpOLSGcAlQDeSrotRWJeA3ieW+Y1QJryyg8xDaruv9HY5lWKSEsALwIYppTamWRbsiyJnyVzGz3mNd4OfAuATkb5uNxjSftQRCoAIPd9WxwnFZGmqPtFeF4pNTPJtpSIeXVkJLfMqyONeY2zA18CoKuInCgiRwC4AUB1jOcPUg1gUC4ehLqxrUiJiAB4BsBapdRjSbYlBMyrIUO5ZV4Nqc1rzAP/VwJ4D8AGAKMS+OBhKoBaAAdQN6Z3K4C2qPv0uAbAawDaxNCO81H3VmsFgOW5ryuTaAvzytwyr/7mlbfSExF5ih9iEhF5ih04EZGn2IETEXmKHTgRkafYgRMReYodOBGRp9iBExF56v8BVxPMlDQyGccAAAAASUVORK5CYII=\n" + }, + "metadata": { + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Network Creation:" + ], + "metadata": { + "id": "VuCWxY_BW38p" + } + }, + { + "cell_type": "markdown", + "source": [ + "### We will not apply softmax in the last layer since we will be using PyTorch's cross entropy loss and it applies the softmax function" + ], + "metadata": { + "id": "2hpkEOakX0pW" + } + }, + { + "cell_type": "code", + "source": [ + "class NeuralNet(nn.Module):\n", + " def __init__(self, input_size, hidden_size, n_classes):\n", + " super(NeuralNet, self).__init__()\n", + " self.l1 = nn.Linear(input_size, hidden_size)\n", + " self.relu = nn.ReLU()\n", + " self.l2 = nn.Linear(hidden_size, n_classes)\n", + "\n", + " def forward(self, x):\n", + " out = self.l1(x)\n", + " out = self.relu(out)\n", + " out = self.l2(out)\n", + " return out" + ], + "metadata": { + "id": "GXzC4YEOWsDb" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "model = NeuralNet(input_size, hidden_size, n_classes)" + ], + "metadata": { + "id": "SeV16o-jYAW7" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Loss & Optmizer:" + ], + "metadata": { + "id": "uIbgtxMzYJ5O" + } + }, + { + "cell_type": "code", + "source": [ + "criterion = nn.CrossEntropyLoss()\n", + "optimizer = torch.optim.Adam(model.parameters(), lr = learning_rate)" + ], + "metadata": { + "id": "8YLTTqbGYIEf" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "#Training Loop:" + ], + "metadata": { + "id": "J6TttIUnYdgi" + } + }, + { + "cell_type": "code", + "source": [ + "n_total_steps = len(train_loader)\n", + "for epoch in range(n_epochs):\n", + " for i, (images,labels) in enumerate(train_loader):# enumerate will give us the index and the data\n", + " # images is 100, 1, 28, 28\n", + " # we want 100, 784\n", + " images = images.reshape(-1, 28*28).to(device)\n", + " labels = labels.to(device)\n", + "\n", + " # Forward\n", + " outputs = model(images)\n", + " loss = criterion(outputs, labels)\n", + "\n", + " # Backward\n", + " optimizer.zero_grad()\n", + " loss.backward()\n", + " optimizer.step()\n", + "\n", + " if((i+1)%100 == 0):\n", + " print(\"Epoch: \"+str(epoch+1)+\"/\"+str(n_epochs)+\", Step: \"+str(i+1)+\"/\"+str(n_total_steps)+\", loss: \"+str(loss.item())+\"\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "7M8yEegpYbY_", + "outputId": "543d3fbd-4ae2-4f20-c6fd-c7f255bf7a6b" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Epoch: 1/2, Step: 100/600, loss: 0.37781304121017456\n", + "Epoch: 1/2, Step: 200/600, loss: 0.3390708863735199\n", + "Epoch: 1/2, Step: 300/600, loss: 0.19096477329730988\n", + "Epoch: 1/2, Step: 400/600, loss: 0.2176024317741394\n", + "Epoch: 1/2, Step: 500/600, loss: 0.28206324577331543\n", + "Epoch: 1/2, Step: 600/600, loss: 0.24062994122505188\n", + "Epoch: 2/2, Step: 100/600, loss: 0.12743119895458221\n", + "Epoch: 2/2, Step: 200/600, loss: 0.16623765230178833\n", + "Epoch: 2/2, Step: 300/600, loss: 0.20040565729141235\n", + "Epoch: 2/2, Step: 400/600, loss: 0.1089562326669693\n", + "Epoch: 2/2, Step: 500/600, loss: 0.1645544022321701\n", + "Epoch: 2/2, Step: 600/600, loss: 0.1631811559200287\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Testing & Evaluation:" + ], + "metadata": { + "id": "ZQlIkPxTaXFc" + } + }, + { + "cell_type": "code", + "source": [ + "with torch.no_grad():\n", + " n_correct = 0\n", + " n_samples = 0\n", + " for images, labels in test_loader:\n", + " images = images.reshape(-1, 28*28).to(device)\n", + " labels = labels.to(device)\n", + "\n", + " outputs = model(images)\n", + "\n", + " # value, index\n", + " _,predictions = torch.max(outputs, 1) # Get the maximum no. along the first dimension\n", + "\n", + " # no. of samples in the current batch (should be 100)\n", + " n_samples += labels.shape[0]\n", + " \n", + " n_correct += (predictions == labels).sum().item()\n", + "\n", + " acc = (100 * n_correct)/n_samples\n", + " print(\"Accuracy = \"+ str(acc) +\"\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "4Pt41imYZyaN", + "outputId": "b8e60af9-de6d-4f18-e231-9acecf8ac916" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Accuracy = 95.4\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Convolutional Neural Network:" + ], + "metadata": { + "id": "Jn9EVoIwiESm" + } + }, + { + "cell_type": "code", + "source": [ + "import torch\n", + "import torch.nn as nn\n", + "import torch.nn.functional as F\n", + "import torchvision\n", + "import torchvision.transforms as transforms\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np" + ], + "metadata": { + "id": "_9zAZrWHjKiG" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Device configuration\n", + "device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n", + "\n", + "# Hyper parameters\n", + "n_epochs = 4\n", + "batch_size = 4\n", + "learning_rate = 0.001" + ], + "metadata": { + "id": "OV0rHX9LjOZX" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Importing CIFAR & Using Transformations:" + ], + "metadata": { + "id": "_tgJR8-Xk2f7" + } + }, + { + "cell_type": "code", + "source": [ + "# Dataset has PIL images of range [0,1]\n", + "# We will transform them to tensors of range [-1,1]\n", + "transform = transforms.Compose([\n", + " transforms.ToTensor(),\n", + " transforms.Normalize((0.5,0.5,0.5),(0.5,0.5,0.5))\n", + " ])" + ], + "metadata": { + "id": "maYvYU_ejXtv" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "train_dataset = torchvision.datasets.CIFAR10(root = \"./data\", train = True, transform = transform, download = True) # download = True means download it if it is not downloaded in the ./data directory\n", + "test_dataset = torchvision.datasets.CIFAR10(root = \"./data\", train = False, transform = transform, download = True)\n", + "\n", + "train_loader = torch.utils.data.DataLoader(dataset = train_dataset, batch_size = batch_size, shuffle = True) # shuffle = True makes it better for training\n", + "test_loader = torch.utils.data.DataLoader(dataset = test_dataset, batch_size = batch_size, shuffle = False)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 121, + "referenced_widgets": [ + "4448f0738f51465d91f450a70de825db", + "abfcfafa989f4085958da57441a7b687", + "1438fbfe83ea4c0ca1510ba3f25bf9ec", + "701f9637eea44400bfba643026556830", + "887cd3c235ca495f891595fbfbc2a36a", + "a00a3463a1944299a50ee6216a1e4033", + "c25bd7f6b1a74f93b3ec8ebe572330c0", + "6d29fac1b4774e66924972b2830bfc0b", + "96f71b3de5a24b358a2ed79f2f26aba1", + "b6ea10e6b68f48cabdaf9c553acf0280", + "2dc5b2335feb4907adb407cea6889eae" + ] + }, + "id": "2YmuR9agjOcz", + "outputId": "74582531-9519-4882-97d9-0c92b92292a8" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Downloading https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz to ./data/cifar-10-python.tar.gz\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + " 0%| | 0/170498071 [00:00] 45.09M 144MB/s in 0.3s \n", + "\n", + "2023-03-13 20:47:42 (144 MB/s) - ‘master.zip’ saved [47285500/47285500]\n", + "\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "!unzip master.zip" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "AZimTbptuFAm", + "outputId": "488a99c1-a997-4a61-d590-fde256d3298a" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Archive: master.zip\n", + "37ab5b5f0b73ff225fc7d4cf1861e8d2a3babac6\n", + " creating: ants-bees-dataset-master/\n", + " inflating: ants-bees-dataset-master/.DS_Store \n", + " creating: ants-bees-dataset-master/train/\n", + " inflating: ants-bees-dataset-master/train/.DS_Store \n", + " creating: ants-bees-dataset-master/train/ants/\n", + " inflating: ants-bees-dataset-master/train/ants/0013035.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1030023514_aad5c608f9.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1095476100_3906d8afde.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1099452230_d1949d3250.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/116570827_e9c126745d.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1225872729_6f0856588f.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1262877379_64fcada201.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1269756697_0bce92cdab.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1286984635_5119e80de1.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/132478121_2a430adea2.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1360291657_dc248c5eea.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1368913450_e146e2fb6d.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1473187633_63ccaacea6.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/148715752_302c84f5a4.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1489674356_09d48dde0a.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/149244013_c529578289.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/150801003_3390b73135.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/150801171_cd86f17ed8.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/154124431_65460430f2.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/162603798_40b51f1654.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1660097129_384bf54490.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/167890289_dd5ba923f3.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1693954099_46d4c20605.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/175998972.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/178538489_bec7649292.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1804095607_0341701e1c.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1808777855_2a895621d7.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/188552436_605cc9b36b.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1917341202_d00a7f9af5.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/1924473702_daa9aacdbe.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/196057951_63bf063b92.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/196757565_326437f5fe.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/201558278_fe4caecc76.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/201790779_527f4c0168.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/2019439677_2db655d361.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/207947948_3ab29d7207.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/20935278_9190345f6b.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/224655713_3956f7d39a.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/2265824718_2c96f485da.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/2265825502_fff99cfd2d.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/226951206_d6bf946504.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/2278278459_6b99605e50.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/2288450226_a6e96e8fdf.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/2288481644_83ff7e4572.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/2292213964_ca51ce4bef.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/24335309_c5ea483bb8.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/245647475_9523dfd13e.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/255434217_1b2b3fe0a4.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/258217966_d9d90d18d3.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/275429470_b2d7d9290b.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/28847243_e79fe052cd.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/318052216_84dff3f98a.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/334167043_cbd1adaeb9.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/339670531_94b75ae47a.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/342438950_a3da61deab.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/36439863_0bec9f554f.jpg \n", + " extracting: ants-bees-dataset-master/train/ants/374435068_7eee412ec4.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/382971067_0bfd33afe0.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/384191229_5779cf591b.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/386190770_672743c9a7.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/392382602_1b7bed32fa.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/403746349_71384f5b58.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/408393566_b5b694119b.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/424119020_6d57481dab.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/424873399_47658a91fb.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/450057712_771b3bfc91.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/45472593_bfd624f8dc.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/459694881_ac657d3187.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/460372577_f2f6a8c9fc.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/460874319_0a45ab4d05.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/466430434_4000737de9.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/470127037_513711fd21.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/474806473_ca6caab245.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/475961153_b8c13fd405.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/484293231_e53cfc0c89.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/49375974_e28ba6f17e.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/506249802_207cd979b4.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/506249836_717b73f540.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/512164029_c0a66b8498.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/512863248_43c8ce579b.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/518773929_734dbc5ff4.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/522163566_fec115ca66.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/522415432_2218f34bf8.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/531979952_bde12b3bc0.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/533848102_70a85ad6dd.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/535522953_308353a07c.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/540889389_48bb588b21.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/541630764_dbd285d63c.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/543417860_b14237f569.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/560966032_988f4d7bc4.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/5650366_e22b7e1065.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/6240329_72c01e663e.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/6240338_93729615ec.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/649026570_e58656104b.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/662541407_ff8db781e7.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/67270775_e9fdf77e9d.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/6743948_2b8c096dda.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/684133190_35b62c0c1d.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/69639610_95e0de17aa.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/707895295_009cf23188.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/7759525_1363d24e88.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/795000156_a9900a4a71.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/822537660_caf4ba5514.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/82852639_52b7f7f5e3.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/841049277_b28e58ad05.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/886401651_f878e888cd.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/892108839_f1aad4ca46.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/938946700_ca1c669085.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/957233405_25c1d1187b.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/9715481_b3cb4114ff.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/998118368_6ac1d91f81.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/Ant_1.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/MehdiabadiAnt2_600.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/Nepenthes_rafflesiana_ant.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/VietnameseAntMimicSpider.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/ant photos.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/army-ants-red-picture.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/formica.jpeg \n", + " inflating: ants-bees-dataset-master/train/ants/hormiga_co_por.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/imageNotFound.gif \n", + " inflating: ants-bees-dataset-master/train/ants/kurokusa.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/swiss-army-ant.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/termite-vs-ant.jpg \n", + " inflating: ants-bees-dataset-master/train/ants/trap-jaw-ant-insect-bg.jpg \n", + " creating: ants-bees-dataset-master/train/bees/\n", + " inflating: ants-bees-dataset-master/train/bees/1092977343_cb42b38d62.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/1093831624_fb5fbe2308.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/1097045929_1753d1c765.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/1232245714_f862fbe385.jpg \n", + " extracting: ants-bees-dataset-master/train/bees/129236073_0985e91c7d.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/1295655112_7813f37d21.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/132511197_0b86ad0fff.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/132826773_dbbcb117b9.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/150013791_969d9a968b.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/1508176360_2972117c9d.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/154600396_53e1252e52.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/16838648_415acd9e3f.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/1691282715_0addfdf5e8.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/17209602_fe5a5a746f.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/174142798_e5ad6d76e0.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/1799726602_8580867f71.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/1807583459_4fe92b3133.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/196430254_46bd129ae7.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/196658222_3fffd79c67.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/198508668_97d818b6c4.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2031225713_50ed499635.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2037437624_2d7bce461f.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2053200300_8911ef438a.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/205835650_e6f2614bee.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/208702903_42fb4d9748.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/21399619_3e61e5bb6f.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2227611847_ec72d40403.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2321139806_d73d899e66.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2330918208_8074770c20.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2345177635_caf07159b3.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2358061370_9daabbd9ac.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2364597044_3c3e3fc391.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2384149906_2cd8b0b699.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2397446847_04ef3cd3e1.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2405441001_b06c36fa72.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2445215254_51698ff797.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2452236943_255bfd9e58.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2467959963_a7831e9ff0.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2470492904_837e97800d.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2477324698_3d4b1b1cab.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2477349551_e75c97cf4d.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2486729079_62df0920be.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2486746709_c43cec0e42.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2493379287_4100e1dacc.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2495722465_879acf9d85.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2528444139_fa728b0f5b.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2538361678_9da84b77e3.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2551813042_8a070aeb2b.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2580598377_a4caecdb54.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2601176055_8464e6aa71.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2610833167_79bf0bcae5.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2610838525_fe8e3cae47.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2617161745_fa3ebe85b4.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2625499656_e3415e374d.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2634617358_f32fd16bea.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2638074627_6b3ae746a0.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2645107662_b73a8595cc.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2651621464_a2fa8722eb.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2652877533_a564830cbf.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/266644509_d30bb16a1b.jpg \n", + " extracting: ants-bees-dataset-master/train/bees/2683605182_9d2a0c66cf.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2704348794_eb5d5178c2.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2707440199_cd170bd512.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2710368626_cb42882dc8.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2722592222_258d473e17.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2728759455_ce9bb8cd7a.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2756397428_1d82a08807.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2765347790_da6cf6cb40.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2781170484_5d61835d63.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/279113587_b4843db199.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2792000093_e8ae0718cf.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2801728106_833798c909.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2822388965_f6dca2a275.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2861002136_52c7c6f708.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2908916142_a7ac8b57a8.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/29494643_e3410f0d37.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2959730355_416a18c63c.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/2962405283_22718d9617.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/3006264892_30e9cced70.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/3030189811_01d095b793.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/3030772428_8578335616.jpg \n", + " extracting: ants-bees-dataset-master/train/bees/3044402684_3853071a87.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/3074585407_9854eb3153.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/3079610310_ac2d0ae7bc.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/3090975720_71f12e6de4.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/3100226504_c0d4f1e3f1.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/342758693_c56b89b6b6.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/354167719_22dca13752.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/359928878_b3b418c728.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/365759866_b15700c59b.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/36900412_92b81831ad.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/39672681_1302d204d1.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/39747887_42df2855ee.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/421515404_e87569fd8b.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/444532809_9e931e2279.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/446296270_d9e8b93ecf.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/452462677_7be43af8ff.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/452462695_40a4e5b559.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/457457145_5f86eb7e9c.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/465133211_80e0c27f60.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/469333327_358ba8fe8a.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/472288710_2abee16fa0.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/473618094_8ffdcab215.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/476347960_52edd72b06.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/478701318_bbd5e557b8.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/507288830_f46e8d4cb2.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/509247772_2db2d01374.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/513545352_fd3e7c7c5d.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/522104315_5d3cb2758e.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/537309131_532bfa59ea.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/586041248_3032e277a9.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/760526046_547e8b381f.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/760568592_45a52c847f.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/774440991_63a4aa0cbe.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/85112639_6e860b0469.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/873076652_eb098dab2d.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/90179376_abc234e5f4.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/92663402_37f379e57a.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/95238259_98470c5b10.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/969455125_58c797ef17.jpg \n", + " inflating: ants-bees-dataset-master/train/bees/98391118_bdb1e80cce.jpg \n", + " creating: ants-bees-dataset-master/val/\n", + " creating: ants-bees-dataset-master/val/ants/\n", + " inflating: ants-bees-dataset-master/val/ants/10308379_1b6c72e180.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1053149811_f62a3410d3.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1073564163_225a64f170.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1119630822_cd325ea21a.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1124525276_816a07c17f.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/11381045_b352a47d8c.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/119785936_dd428e40c3.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1247887232_edcb61246c.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1262751255_c56c042b7b.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1337725712_2eb53cd742.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1358854066_5ad8015f7f.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1440002809_b268d9a66a.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/147542264_79506478c2.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/152286280_411648ec27.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/153320619_2aeb5fa0ee.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/153783656_85f9c3ac70.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/157401988_d0564a9d02.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/159515240_d5981e20d1.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/161076144_124db762d6.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/161292361_c16e0bf57a.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/170652283_ecdaff5d1a.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/17081114_79b9a27724.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/172772109_d0a8e15fb0.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/1743840368_b5ccda82b7.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/181942028_961261ef48.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/183260961_64ab754c97.jpg \n", + " extracting: ants-bees-dataset-master/val/ants/2039585088_c6f47c592e.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/205398178_c395c5e460.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/208072188_f293096296.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/209615353_eeb38ba204.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/2104709400_8831b4fc6f.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/212100470_b485e7b7b9.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/2127908701_d49dc83c97.jpg \n", + " extracting: ants-bees-dataset-master/val/ants/2191997003_379df31291.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/2211974567_ee4606b493.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/2219621907_47bc7cc6b0.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/2238242353_52c82441df.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/2255445811_dabcdf7258.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/239161491_86ac23b0a3.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/263615709_cfb28f6b8e.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/308196310_1db5ffa01b.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/319494379_648fb5a1c6.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/35558229_1fa4608a7a.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/412436937_4c2378efc2.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/436944325_d4925a38c7.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/445356866_6cb3289067.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/459442412_412fecf3fe.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/470127071_8b8ee2bd74.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/477437164_bc3e6e594a.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/488272201_c5aa281348.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/502717153_3e4865621a.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/518746016_bcc28f8b5b.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/540543309_ddbb193ee5.jpg \n", + " extracting: ants-bees-dataset-master/val/ants/562589509_7e55469b97.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/57264437_a19006872f.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/573151833_ebbc274b77.jpg \n", + " extracting: ants-bees-dataset-master/val/ants/649407494_9b6bc4949f.jpg \n", + " extracting: ants-bees-dataset-master/val/ants/751649788_78dd7d16ce.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/768870506_8f115d3d37.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/800px-Meat_eater_ant_qeen_excavating_hole.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/8124241_36b290d372.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/8398478_50ef10c47a.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/854534770_31f6156383.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/892676922_4ab37dce07.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/94999827_36895faade.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/Ant-1818.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/F.pergan.28(f).jpg \n", + " inflating: ants-bees-dataset-master/val/ants/Hormiga.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/ants-devouring-remains-of-large-dead-insect-on-red-tile-in-Stellenbosch-South-Africa-closeup-1-DHD.jpg \n", + " inflating: ants-bees-dataset-master/val/ants/desert_ant.jpg \n", + " creating: ants-bees-dataset-master/val/bees/\n", + " inflating: ants-bees-dataset-master/val/bees/1032546534_06907fe3b3.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/10870992_eebeeb3a12.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/1181173278_23c36fac71.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/1297972485_33266a18d9.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/1328423762_f7a88a8451.jpg \n", + " extracting: ants-bees-dataset-master/val/bees/1355974687_1341c1face.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/144098310_a4176fd54d.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/1486120850_490388f84b.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/149973093_da3c446268.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/151594775_ee7dc17b60.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/151603988_2c6f7d14c7.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/1519368889_4270261ee3.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/152789693_220b003452.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/177677657_a38c97e572.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/1799729694_0c40101071.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/181171681_c5a1a82ded.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/187130242_4593a4c610.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/203868383_0fcbb48278.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2060668999_e11edb10d0.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2086294791_6f3789d8a6.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2103637821_8d26ee6b90.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2104135106_a65eede1de.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/215512424_687e1e0821.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2173503984_9c6aaaa7e2.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/220376539_20567395d8.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/224841383_d050f5f510.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2321144482_f3785ba7b2.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/238161922_55fa9a76ae.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2407809945_fb525ef54d.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2415414155_1916f03b42.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2438480600_40a1249879.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2444778727_4b781ac424.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2457841282_7867f16639.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2470492902_3572c90f75.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2478216347_535c8fe6d7.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2501530886_e20952b97d.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2506114833_90a41c5267.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2509402554_31821cb0b6.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2525379273_dcb26a516d.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/26589803_5ba7000313.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2668391343_45e272cd07.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2670536155_c170f49cd0.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2685605303_9eed79d59d.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2702408468_d9ed795f4f.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2709775832_85b4b50a57.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2717418782_bd83307d9f.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/272986700_d4d4bf8c4b.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2741763055_9a7bb00802.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2745389517_250a397f31.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2751836205_6f7b5eff30.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2782079948_8d4e94a826.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2809496124_5f25b5946a.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2815838190_0a9889d995.jpg \n", + " extracting: ants-bees-dataset-master/val/bees/2841437312_789699c740.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/2883093452_7e3a1eb53f.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/290082189_f66cb80bfc.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/296565463_d07a7bed96.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/3077452620_548c79fda0.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/348291597_ee836fbb1a.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/350436573_41f4ecb6c8.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/353266603_d3eac7e9a0.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/372228424_16da1f8884.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/400262091_701c00031c.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/416144384_961c326481.jpg \n", + " extracting: ants-bees-dataset-master/val/bees/44105569_16720a960c.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/456097971_860949c4fc.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/464594019_1b24a28bb1.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/485743562_d8cc6b8f73.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/540976476_844950623f.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/54736755_c057723f64.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/57459255_752774f1b2.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/576452297_897023f002.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/586474709_ae436da045.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/590318879_68cf112861.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/59798110_2b6a3c8031.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/603709866_a97c7cfc72.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/603711658_4c8cd2201e.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/65038344_52a45d090d.jpg \n", + " extracting: ants-bees-dataset-master/val/bees/6a00d8341c630a53ef00e553d0beb18834-800wi.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/72100438_73de9f17af.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/759745145_e8bc776ec8.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/936182217_c4caa5222d.jpg \n", + " inflating: ants-bees-dataset-master/val/bees/abeja.jpg \n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "os.rename(\"/content/data/ants-bees-dataset-master\", \"/content/data/hymenoptera_data\")" + ], + "metadata": { + "id": "rHwtzqkLuNJA" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "os.remove(\"/content/data/master.zip\")" + ], + "metadata": { + "id": "KG5sw1hcuwi0" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "cd /content/" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "JKbeTthpuzr9", + "outputId": "07def0ba-d2c9-452a-d459-e15978471ad7" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "/content\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "# Device configuration\n", + "device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n", + "\n", + "mean = np.array([0.485, 0.456, 0.406])\n", + "std = np.array([0.229, 0.224, 0.225])\n", + "\n", + "data_transforms = {\n", + " 'train': transforms.Compose([\n", + " transforms.RandomResizedCrop(224),\n", + " transforms.RandomHorizontalFlip(),\n", + " transforms.ToTensor(),\n", + " transforms.Normalize(mean,std)\n", + " ]),\n", + " 'val': transforms.Compose([\n", + " transforms.Resize(256),\n", + " transforms.CenterCrop(224),\n", + " transforms.ToTensor(),\n", + " transforms.Normalize(mean,std)\n", + " ]),\n", + "}" + ], + "metadata": { + "id": "8QyMULikpc7G" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "data_dir = 'data/hymenoptera_data'\n", + "sets = ['train', 'val']\n", + "image_datasets = {x: datasets.ImageFolder(os.path.join(data_dir, x), data_transforms[x]) for x in ['train', 'val']}\n", + "dataloaders = {x: torch.utils.data.DataLoader(image_datasets[x], batch_size=4, shuffle=True, num_workers=0) for x in ['train', 'val']}" + ], + "metadata": { + "id": "SSighiHtqhKH" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dataset_sizes = {x: len(image_datasets[x]) for x in ['train', 'val']}\n", + "class_names = image_datasets['train'].classes\n", + "print(dataset_sizes)\n", + "print(class_names)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Kh-C8-UHvHdn", + "outputId": "7389d2c9-0710-4437-a06a-83b524d86db8" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "{'train': 244, 'val': 153}\n", + "['ants', 'bees']\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Training Loop:" + ], + "metadata": { + "id": "bC-JIfwhv3z-" + } + }, + { + "cell_type": "markdown", + "source": [ + "###train() sets the modules in the network in training mode. It tells our model that we are currently in the training phase so the model keeps some layers, like dropout, batch-normalization which behaves differently depends on the current phase, active. whereas the model. eval() does the opposite." + ], + "metadata": { + "id": "PR7iM15mwlwd" + } + }, + { + "cell_type": "markdown", + "source": [ + "###A deep copy creates a new compound object before inserting copies of the items found in the original into it in a recursive manner. It means first constructing a new collection object and then recursively populating it with copies of the child objects found in the original. In the case of deep copy, a copy of the object is copied into another object. It means that any changes made to a copy of the object do not reflect in the original object. " + ], + "metadata": { + "id": "AupCdbC61SvU" + } + }, + { + "cell_type": "markdown", + "source": [ + "![Deep Copy.](https://media.geeksforgeeks.org/wp-content/uploads/deep-copy.jpg)\n" + ], + "metadata": { + "id": "F3bWOVW31I63" + } + }, + { + "cell_type": "markdown", + "source": [ + "###A shallow copy creates a new compound object and then references the objects contained in the original within it, which means it constructs a new collection object and then populates it with references to the child objects found in the original. The copying process does not recurse and therefore won’t create copies of the child objects themselves. In the case of shallow copy, a reference of an object is copied into another object. It means that any changes made to a copy of an object do reflect in the original object. In python, this is implemented using the “copy()” function. " + ], + "metadata": { + "id": "LXZ7qyUU1UHR" + } + }, + { + "cell_type": "markdown", + "source": [ + "![Shallow Copy.](https://media.geeksforgeeks.org/wp-content/uploads/shallow-copy.jpg)\n" + ], + "metadata": { + "id": "xVTmTyaG1Bku" + } + }, + { + "cell_type": "code", + "source": [ + "def train_model(model, criterion, optimizer, scheduler, num_epochs=25):\n", + " since = time.time()\n", + "\n", + " best_model_wts = copy.deepcopy(model.state_dict())\n", + " best_acc = 0.0\n", + "\n", + " for epoch in range(num_epochs):\n", + " print('Epoch {}/{}'.format(epoch, num_epochs - 1))\n", + " print('-' * 10)\n", + "\n", + " # Each epoch has a training and validation phase\n", + " for phase in ['train', 'val']:\n", + " if phase == 'train':\n", + " model.train() # Set model to training mode\n", + " else:\n", + " model.eval() # Set model to evaluate mode\n", + "\n", + " running_loss = 0.0\n", + " running_corrects = 0\n", + "\n", + " # Iterate over data.\n", + " for inputs, labels in dataloaders[phase]:\n", + " inputs = inputs.to(device)\n", + " labels = labels.to(device)\n", + "\n", + " # forward\n", + " # track history if only in train\n", + " with torch.set_grad_enabled(phase == 'train'):\n", + " outputs = model(inputs)\n", + " _, preds = torch.max(outputs, 1)\n", + " loss = criterion(outputs, labels)\n", + "\n", + " # backward + optimize only if in training phase\n", + " if phase == 'train':\n", + " optimizer.zero_grad()\n", + " loss.backward()\n", + " optimizer.step()\n", + "\n", + " # statistics\n", + " running_loss += loss.item() * inputs.size(0)\n", + " running_corrects += torch.sum(preds == labels.data)\n", + "\n", + " if phase == 'train':\n", + " scheduler.step() #scheduler is used to change the learning rate during training\n", + "\n", + " epoch_loss = running_loss / dataset_sizes[phase]\n", + " epoch_acc = running_corrects.double() / dataset_sizes[phase]\n", + "\n", + " print('{} Loss: {:.4f} Acc: {:.4f}'.format(\n", + " phase, epoch_loss, epoch_acc))\n", + "\n", + " # deep copy the model\n", + " if phase == 'val' and epoch_acc > best_acc:\n", + " best_acc = epoch_acc\n", + " best_model_wts = copy.deepcopy(model.state_dict())\n", + "\n", + " print()\n", + "\n", + " time_elapsed = time.time() - since\n", + " print('Training complete in {:.0f}m {:.0f}s'.format(\n", + " time_elapsed // 60, time_elapsed % 60))\n", + " print('Best val Acc: {:4f}'.format(best_acc))\n", + "\n", + " # load best model weights\n", + " model.load_state_dict(best_model_wts)\n", + " return model" + ], + "metadata": { + "id": "vefZVsV4vuxO" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Loading Pretrained Model & Changing Last Layer:" + ], + "metadata": { + "id": "j4h-2IW44Rnw" + } + }, + { + "cell_type": "markdown", + "source": [ + "###Fine-tuning:" + ], + "metadata": { + "id": "l9It-Rlk9Qt4" + } + }, + { + "cell_type": "code", + "source": [ + "model = models.resnet18(pretrained = True)\n", + "# We will replace the number of features in the last layer\n", + "num_ftrs = model.fc.in_features\n", + "print(num_ftrs)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 173, + "referenced_widgets": [ + "aa4360b92c334e75bddec15286d69e07", + "5426abf42e4146dcacb99de152816cca", + "367bffd1c8e3495ca21fa0480a834c3c", + "8475ac97e4bf46f381c2f73713b38914", + "7c1c421f06aa4bbda720c130dcd351a1", + "e38d67ade63144a3b3f3d92803eddb12", + "834b94e1b7d7481cb71e0f938c665f5b", + "547c3607f68e4d51bde93ec2212047a6", + "3eb089fb543e4de595d647153c2dc2da", + "1364723861f346a9b46ce056cb38f516", + "2a4b1c752f9d4c0ba9b65e6b23a0d0c0" + ] + }, + "id": "bBHdfvpv4NmH", + "outputId": "8b04e438-e12e-4157-8821-f8b82f654257" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.9/dist-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.\n", + " warnings.warn(\n", + "/usr/local/lib/python3.9/dist-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet18_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet18_Weights.DEFAULT` to get the most up-to-date weights.\n", + " warnings.warn(msg)\n", + "Downloading: \"https://download.pytorch.org/models/resnet18-f37072fd.pth\" to /root/.cache/torch/hub/checkpoints/resnet18-f37072fd.pth\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + " 0%| | 0.00/44.7M [00:00" + ] + }, + "metadata": {}, + "execution_count": 17 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Saving on GPU & Loading on GPU" + ], + "metadata": { + "id": "0dhOyzjP8QYj" + } + }, + { + "cell_type": "code", + "source": [ + "device = torch.device(\"cuda\")\n", + "model.to(device)\n", + "torch.save(model.state_dict(),File)" + ], + "metadata": { + "id": "jkipB7vg8QYk" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "model = Model(6)\n", + "model.load_state_dict(torch.load(File))\n", + "model.to(device)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "b2784ce6-6fc7-49e8-dfb6-f32477328a81", + "id": "MHPnBRDW8QYk" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Model(\n", + " (linear): Linear(in_features=6, out_features=1, bias=True)\n", + ")" + ] + }, + "metadata": {}, + "execution_count": 19 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Saving on CPU & Loading on GPU" + ], + "metadata": { + "id": "tFlCw_il8hJA" + } + }, + { + "cell_type": "code", + "source": [ + "torch.save(model.state_dict(),File)" + ], + "metadata": { + "id": "uTrRLSMt8hJA" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "device = torch.device(\"cuda\")\n", + "model = Model(6)\n", + "model.load_state_dict(torch.load(File, map_location = \"cuda:0\")) #Any GPU device number that I want\n", + "model.to(device)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "d973180e-9d8b-4d59-8e04-b0297aa06402", + "id": "e9g9t0Ja8hJA" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Model(\n", + " (linear): Linear(in_features=6, out_features=1, bias=True)\n", + ")" + ] + }, + "metadata": {}, + "execution_count": 21 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Recurrent Neural Network:" + ], + "metadata": { + "id": "G0VNBtEW7WHl" + } + }, + { + "cell_type": "markdown", + "source": [ + "###In this section, we will use a recurrent neural net to classify names (say which country this name belongs to)." + ], + "metadata": { + "id": "456n61TI_uWQ" + } + }, + { + "cell_type": "markdown", + "source": [ + "##Downloading Names Dataset:\n", + "\n" + ], + "metadata": { + "id": "Be_EYKci8gR1" + } + }, + { + "cell_type": "code", + "source": [ + "!wget https://download.pytorch.org/tutorial/data.zip" + ], + "metadata": { + "id": "LHOjXXsz8QYk", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "9d81a7d2-d4af-4ec1-b967-e1aba39dc0f6" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "--2023-03-25 18:02:22-- https://download.pytorch.org/tutorial/data.zip\n", + "Resolving download.pytorch.org (download.pytorch.org)... 52.222.139.90, 52.222.139.21, 52.222.139.109, ...\n", + "Connecting to download.pytorch.org (download.pytorch.org)|52.222.139.90|:443... connected.\n", + "HTTP request sent, awaiting response... 200 OK\n", + "Length: 2882130 (2.7M) [application/zip]\n", + "Saving to: ‘data.zip’\n", + "\n", + "data.zip 100%[===================>] 2.75M 4.34MB/s in 0.6s \n", + "\n", + "2023-03-25 18:02:23 (4.34 MB/s) - ‘data.zip’ saved [2882130/2882130]\n", + "\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "import os" + ], + "metadata": { + "id": "ktcFLVrH_LUL" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!unzip data.zip" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "kHErlRvU8fY3", + "outputId": "6a3bf8e6-39d3-4f90-9cd9-ff18306f57ec" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Archive: data.zip\n", + " creating: data/\n", + " inflating: data/eng-fra.txt \n", + " creating: data/names/\n", + " inflating: data/names/Arabic.txt \n", + " inflating: data/names/Chinese.txt \n", + " inflating: data/names/Czech.txt \n", + " inflating: data/names/Dutch.txt \n", + " inflating: data/names/English.txt \n", + " inflating: data/names/French.txt \n", + " inflating: data/names/German.txt \n", + " inflating: data/names/Greek.txt \n", + " inflating: data/names/Irish.txt \n", + " inflating: data/names/Italian.txt \n", + " inflating: data/names/Japanese.txt \n", + " inflating: data/names/Korean.txt \n", + " inflating: data/names/Polish.txt \n", + " inflating: data/names/Portuguese.txt \n", + " inflating: data/names/Russian.txt \n", + " inflating: data/names/Scottish.txt \n", + " inflating: data/names/Spanish.txt \n", + " inflating: data/names/Vietnamese.txt \n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "os.remove(\"data.zip\")" + ], + "metadata": { + "id": "Sr_CINp2_NPu" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "import io\n", + "import unicodedata\n", + "import string\n", + "import glob\n", + "import torch\n", + "import random" + ], + "metadata": { + "id": "s4F6yayK_W4j" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Utilities:" + ], + "metadata": { + "id": "g6yXn0ApbIHS" + } + }, + { + "cell_type": "code", + "source": [ + "# alphabet small + capital letters + \" .,;'\"\n", + "ALL_LETTERS = string.ascii_letters + \" .,;'\"\n", + "N_LETTERS = len(ALL_LETTERS)" + ], + "metadata": { + "id": "0CB6PXatbKIU" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(ALL_LETTERS)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "vEZ_UEFYcq5o", + "outputId": "994d038a-2fa1-4715-9357-9b3468c44d6e" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ .,;'\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "# Turn a Unicode string to plain ASCII, thanks to https://stackoverflow.com/a/518232/2809427\n", + "# Removes any special characters and keeps only ASCII\n", + "def unicode_to_ascii(s):\n", + " return ''.join(\n", + " c for c in unicodedata.normalize('NFD', s)\n", + " if unicodedata.category(c) != 'Mn'\n", + " and c in ALL_LETTERS\n", + " )" + ], + "metadata": { + "id": "zYsv5K__bKns" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(unicode_to_ascii('Ślusàrski'))" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "-PzvUS9Kco0p", + "outputId": "f713e053-56a3-4793-bbb3-0c2d447aad75" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Slusarski\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "def load_data():\n", + " # Build the category_lines dictionary, a list of names per language\n", + " category_lines = {}\n", + " all_categories = []\n", + " \n", + " def find_files(path):\n", + " return glob.glob(path)\n", + " \n", + " # Read a file and split into lines\n", + " def read_lines(filename):\n", + " lines = io.open(filename, encoding='utf-8').read().strip().split('\\n')\n", + " return [unicode_to_ascii(line) for line in lines]\n", + " \n", + " for filename in find_files('data/names/*.txt'):\n", + " category = os.path.splitext(os.path.basename(filename))[0]\n", + " all_categories.append(category)\n", + " \n", + " lines = read_lines(filename)\n", + " category_lines[category] = lines\n", + " \n", + " return category_lines, all_categories" + ], + "metadata": { + "id": "ulibn6WJbKp7" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "category_lines, all_categories = load_data()\n", + "print(category_lines['Italian'][:5])" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ZoP_RbIid22S", + "outputId": "1e5a4a79-f114-4eea-ecb5-551f823e5d5a" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "['Abandonato', 'Abatangelo', 'Abatantuono', 'Abate', 'Abategiovanni']\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "To represent a single letter, we use a “one-hot vector” of \n", + "size (1 x n_letters). \n", + "\n", + "A one-hot vector is filled with 0s\n", + "except for a 1 at index of the current letter, e.g. \"b\" = (0 1 0 0 0 ...).\n", + "\n", + "To make a word we join a bunch of those into a\n", + "2D matrix (line_length x 1 x n_letters). We say line_length because each line is a single word.\n", + "\n", + "\n", + "That extra 1 dimension is because PyTorch assumes\n", + "everything is in batches - we’re just using a batch size of 1 here." + ], + "metadata": { + "id": "sF_S45oHc5QL" + } + }, + { + "cell_type": "code", + "source": [ + "# Find letter index from all_letters, e.g. \"a\" = 0\n", + "def letter_to_index(letter):\n", + " return ALL_LETTERS.find(letter)" + ], + "metadata": { + "id": "1No78jFNbKtc" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Just for demonstration, turn a letter into a <1 x n_letters> Tensor\n", + "def letter_to_tensor(letter):\n", + " tensor = torch.zeros(1, N_LETTERS)\n", + " tensor[0][letter_to_index(letter)] = 1\n", + " return tensor" + ], + "metadata": { + "id": "oudlCzDrdZFJ" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(letter_to_tensor('J'))\n", + "print(letter_to_tensor('J').size())" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "yR8GD45bd65J", + "outputId": "9ae7d2ab-d89f-4bb1-e593-00636b704b9c" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0.]])\n", + "torch.Size([1, 57])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "# Turn a line into a , or an array of one-hot letter vectors\n", + "def line_to_tensor(line):\n", + " tensor = torch.zeros(len(line), 1, N_LETTERS)\n", + " for i, letter in enumerate(line):\n", + " tensor[i][0][letter_to_index(letter)] = 1\n", + " return tensor" + ], + "metadata": { + "id": "CmRRrxuNdZHM" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(line_to_tensor('Jones'))\n", + "print(line_to_tensor('Jones').size())" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "_Fv07lhWeAuO", + "outputId": "787eeb0b-695d-493b-e46a-1022d03cdb96" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.]],\n", + "\n", + " [[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.]],\n", + "\n", + " [[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.]],\n", + "\n", + " [[0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.]],\n", + "\n", + " [[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.]]])\n", + "torch.Size([5, 1, 57])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "def random_training_example(category_lines, all_categories):\n", + " \n", + " def random_choice(a):\n", + " random_idx = random.randint(0, len(a) - 1)\n", + " return a[random_idx]\n", + " \n", + " category = random_choice(all_categories)\n", + " line = random_choice(category_lines[category])\n", + " category_tensor = torch.tensor([all_categories.index(category)], dtype=torch.long)\n", + " line_tensor = line_to_tensor(line)\n", + " return category, line, category_tensor, line_tensor" + ], + "metadata": { + "id": "9jMx9G5-dZKz" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Architecture:" + ], + "metadata": { + "id": "pfpGeKqRe7BC" + } + }, + { + "cell_type": "markdown", + "source": [ + "![RNN.](https://i.imgur.com/Z2xbySO.png)\n" + ], + "metadata": { + "id": "TNVWqJgwhRip" + } + }, + { + "cell_type": "code", + "source": [ + "import torch\n", + "import torch.nn as nn\n", + "import matplotlib.pyplot as plt\n", + "# If the utilities were in a different folder we would import them like this:\n", + "# from utils import ALL_LETTERS, N_LETTERS\n", + "# from utils import load_data, letter_to_tensor, line_to_tensor, random_training_example" + ], + "metadata": { + "id": "FGZBfmQOe6WH" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# There is already a built-in RNN class which we will use later\n", + "class RNN(nn.Module):\n", + " def __init__(self, input_size, hidden_size, output_size):\n", + " super(RNN, self).__init__()\n", + "\n", + " self.hidden_size = hidden_size\n", + " self.input_to_hidden = nn.Linear(input_size + hidden_size, hidden_size)\n", + " self.input_to_output = nn.Linear(input_size + hidden_size, output_size)\n", + " self.softmax = nn.LogSoftmax(dim = 1) # Our input is of shape 1=(1,57), we only need the second dimension (57), So, we specify that we want the second dimension as input to the softmax layer\n", + "\n", + " def forward(self, input_tensor, hidden_tensor):\n", + " combined = torch.cat((input_tensor, hidden_tensor), 1) # We combined our two tensors along dimension 1\n", + " \n", + " hidden = self.input_to_hidden(combined)\n", + " output = self.input_to_output(combined)\n", + " output = self.softmax(output)\n", + " return output, hidden\n", + " \n", + " def initial_hidden(self):\n", + " return torch.zeros(1, self.hidden_size)\n" + ], + "metadata": { + "id": "yxr8HRASfxXa" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "category_lines, all_categories = load_data()\n", + "n_categories = len(all_categories)" + ], + "metadata": { + "id": "pFvY5rC78pQr" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "n_hidden = 128 # Hyper parameter\n", + "rnn = RNN(N_LETTERS, n_hidden, n_categories)" + ], + "metadata": { + "id": "qKyI9fP281fJ" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# one step\n", + "input_tensor = letter_to_tensor('A')\n", + "hidden_tensor = rnn.initial_hidden()" + ], + "metadata": { + "id": "0dzZhZAu84I6" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "output, next_hidden = rnn(input_tensor, hidden_tensor)\n", + "print(output.size())\n", + "print(next_hidden.size())" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "VUlifXEk84LX", + "outputId": "ce0b9fc6-1764-429d-d0ca-921ce9f847ce" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "torch.Size([1, 18])\n", + "torch.Size([1, 128])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "# whole sequence/name\n", + "input_tensor = line_to_tensor('Albert')\n", + "hidden_tensor = rnn.initial_hidden()" + ], + "metadata": { + "id": "vG2_mzA484N3" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "output, next_hidden = rnn(input_tensor[0], hidden_tensor) # input_tensor[0] is the first letter\n", + "print(output.size())\n", + "print(next_hidden.size())" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Oyo_mAT584RK", + "outputId": "2e246645-8d0f-417e-dc20-e1d2b702a77c" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "torch.Size([1, 18])\n", + "torch.Size([1, 128])\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "# The output of the softmax will be the likelihood of each category, so, we choose the biggest number\n", + "def category_from_output(output):\n", + " category_idx = torch.argmax(output).item()\n", + " return all_categories[category_idx]" + ], + "metadata": { + "id": "PEpoJfuqAqaC" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(category_from_output(output))" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "bdJF2yvHA2JJ", + "outputId": "4954d7e8-c54c-4a9d-d006-ffa4eedc1259" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Greek\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##Training:" + ], + "metadata": { + "id": "3kW9DlcYBcGO" + } + }, + { + "cell_type": "code", + "source": [ + "criterion = nn.NLLLoss() # Negative log likelihood loss\n", + "learning_rate = 0.005\n", + "optimizer = torch.optim.SGD(rnn.parameters(), lr=learning_rate)" + ], + "metadata": { + "id": "7hXNxknABKwz" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# category_tensor is the actual class label\n", + "def train(line_tensor, category_tensor):\n", + " hidden = rnn.initial_hidden()\n", + " \n", + " for i in range(line_tensor.size()[0]):\n", + " output, hidden = rnn(line_tensor[i], hidden) # We do this for the whole name and after we finish with the last letter, we calculate the loss\n", + " \n", + " loss = criterion(output, category_tensor)\n", + " \n", + " optimizer.zero_grad()\n", + " loss.backward()\n", + " optimizer.step()\n", + " \n", + " return output, loss.item()" + ], + "metadata": { + "id": "2krGAaZtBi8M" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "current_loss = 0\n", + "all_losses = []\n", + "plot_steps, print_steps = 1000, 5000\n", + "n_iters = 100000" + ], + "metadata": { + "id": "YfDT6GUBCfYf" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "for i in range(n_iters):\n", + " category, line, category_tensor, line_tensor = random_training_example(category_lines, all_categories)\n", + " \n", + " output, loss = train(line_tensor, category_tensor)\n", + " current_loss += loss \n", + " \n", + " if (i+1) % plot_steps == 0:\n", + " all_losses.append(current_loss / plot_steps)\n", + " current_loss = 0\n", + " \n", + " if (i+1) % print_steps == 0:\n", + " guess = category_from_output(output)\n", + " correct = \"CORRECT\" if guess == category else f\"WRONG ({category})\"\n", + " print(f\"{i+1} {(i+1)/n_iters*100} {loss:.4f} {line} / {guess} {correct}\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "K10CMHouCqOL", + "outputId": "51c5f972-6c4b-44e7-9d92-8de7e022f94d" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "5000 5.0 2.4894 Noh / Chinese WRONG (Korean)\n", + "10000 10.0 0.5214 Giannakos / Greek CORRECT\n", + "15000 15.0 2.6884 Daele / Irish WRONG (Dutch)\n", + "20000 20.0 0.6571 Nakatoni / Japanese CORRECT\n", + "25000 25.0 2.1837 Hiro / Portuguese WRONG (Japanese)\n", + "30000 30.0 0.5044 Sotiris / Greek CORRECT\n", + "35000 35.0 0.8844 Delacroix / French CORRECT\n", + "40000 40.0 3.5625 Fonseca / Dutch WRONG (Portuguese)\n", + "45000 45.0 1.3413 Guerra / Portuguese WRONG (Spanish)\n", + "50000 50.0 0.6482 Ban / Chinese CORRECT\n", + "55000 55.00000000000001 0.4844 Achteren / Dutch CORRECT\n", + "60000 60.0 0.3718 Sarraf / Arabic CORRECT\n", + "65000 65.0 1.3559 Leclair / Scottish WRONG (French)\n", + "70000 70.0 0.8900 Ortega / Spanish CORRECT\n", + "75000 75.0 0.1659 Vescovi / Italian CORRECT\n", + "80000 80.0 2.2688 Bazzi / Italian WRONG (Arabic)\n", + "85000 85.0 3.2687 Simon / English WRONG (German)\n", + "90000 90.0 0.2480 Vlahos / Greek CORRECT\n", + "95000 95.0 1.7333 Nyashin / Japanese WRONG (Russian)\n", + "100000 100.0 1.2350 Ding / Vietnamese WRONG (Chinese)\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "plt.figure()\n", + "plt.plot(all_losses)\n", + "plt.show()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 265 + }, + "id": "pu-gL3amDywo", + "outputId": "d6210760-281a-438a-c737-405afaa5c102" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "
" + ], + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAxn0lEQVR4nO3dd3xVVbr/8c+T3nsjjYRO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OEvQDjoj4Ae8DPzHGVLTcZ6xjZp1m3KyIXA4UGGO2O7qWc8wNmAw8bYyZBFTTppvGCc91MNar10QgGvDlzO6NAcGe59ZZgj4HiGvxc6xtm1MSEXesIb/MGLPctjm/6U85278FjqqvD8wCrhSRY1i75S7E2ncdZPvzHpzznGcD2caYLbaf38Ma/M58rhcAmcaYQmNMPbAc6/l39nPdpKNz26uMc5ag3wYMt92Z98B682alg2vqE7a+6ReBDGPMoy12rQRus31/G/Dhua6trxhjHjbGxBpjErCe2y+MMTcB64HrbM2c6pgBjDEngRMiMtK26SIgHSc+11i7bKaLiI/tv/WmY3bqc91CR+d2JXCrbfTNdKC8RRdP54wxTvEFXAocBI4A/+XoevrwOGdj/XNuD7DL9nUp1j7rdcAhYC0Q4uha++j45wEf274fAmwFDgPvAp6Orq8PjncikGo73x8Awc5+roH/BvYD+4DXAU9nPNfAm1jvQ9Rj/evtjo7OLSBYRxYeAfZiHZXU5c/SKRCUUsrJOUvXjVJKqQ5o0CullJPToFdKKSenQa+UUk5Og14ppZycBr1SSjk5DXqllHJy/x/2FsrzXSmQhAAAAABJRU5ErkJggg==\n" + }, + "metadata": { + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "## Prediction:" + ], + "metadata": { + "id": "vIV_8wjLD6UH" + } + }, + { + "cell_type": "code", + "source": [ + "def predict(input_line):\n", + " print(f\"\\n> {input_line}\")\n", + " with torch.no_grad():\n", + " line_tensor = line_to_tensor(input_line)\n", + " \n", + " hidden = rnn.initial_hidden()\n", + " \n", + " for i in range(line_tensor.size()[0]):\n", + " output, hidden = rnn(line_tensor[i], hidden)\n", + " \n", + " guess = category_from_output(output)\n", + " print(guess)" + ], + "metadata": { + "id": "gm5Gfwg7DyzI" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "while True:\n", + " sentence = input(\"Input:\")\n", + " if sentence == \"quit\":\n", + " break\n", + " \n", + " predict(sentence)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "QRdVzo_3Dy2g", + "outputId": "2a64f6b6-db4e-42e1-c756-e039f1538e9b" + }, + "execution_count": null, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Input:Nader\n", + "\n", + "> Nader\n", + "Arabic\n", + "Input:Antipas\n", + "\n", + "> Antipas\n", + "Dutch\n", + "Input:Aihara\n", + "\n", + "> Aihara\n", + "Japanese\n", + "Input:Baumann\n", + "\n", + "> Baumann\n", + "Dutch\n", + "Input:Bäcker\n", + "\n", + "> Bäcker\n", + "German\n", + "Input:quit\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#Built-in RNN, LSTM & GRU:" + ], + "metadata": { + "id": "xuZ2c6W0wepg" + } + }, + { + "cell_type": "markdown", + "source": [ + "###We are going to use image data here to show that even with images as inputs, we must turn them into sequences." + ], + "metadata": { + "id": "ENJoZun95beF" + } + }, + { + "cell_type": "code", + "source": [ + "import torch\n", + "import torch.nn as nn\n", + "import torchvision\n", + "import torchvision.transforms as transforms" + ], + "metadata": { + "id": "yN9YzMGoEgwp" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Device configuration\n", + "device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')" + ], + "metadata": { + "id": "8rjltqgYwoSk" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Hyper-parameters \n", + "# input_size = 784 # 28x28\n", + "num_classes = 10\n", + "num_epochs = 2\n", + "batch_size = 100\n", + "learning_rate = 0.001\n", + "\n", + "# We will look at the image, one row at a time\n", + "input_size = 28\n", + "sequence_length = 28\n", + "hidden_size = 128\n", + "num_layers = 2 # We will stack two RNNs and the second RNN will take as an input the output of the first RNN" + ], + "metadata": { + "id": "0FoiE8uawoVL" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Loading Dataset:" + ], + "metadata": { + "id": "t0eO1dBcwuAC" + } + }, + { + "cell_type": "code", + "source": [ + "train_dataset = torchvision.datasets.MNIST(root='./data', \n", + " train=True, \n", + " transform=transforms.ToTensor(), \n", + " download=True)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 423, + "referenced_widgets": [ + "08d865a4ea0747c7abf7c048158f580c", + "ec4830908e744a62a128cac7ef195de8", + "0f232b6a34de41d6b8f0faa75f5de4c8", + "1572a35b2df74fdcae9190f09912ace4", + "8443cacb665e4acd9804bd15cb18d31b", + "3ff6c1d530c7472f9b7e028ed8c5e038", + "3c85f343b59342afadc3ac24f474a61f", + "b0087a21890748e395678b23bcfc39c5", + "02311e6ca4a84b1798e8e0acec6afd1b", + "fad3d5b899594e67b5cecdb23646bd7b", + "060a3b6497f347ffaa6bbd16863c2429", + "5fe88dc7e8a7417fa9458abcf57df556", + "c1621682d2d243e382f04861147e4d1e", + "a20cdb51e8af439eab1d7fde447b6183", + "d5009fea670944798bba45167034be15", + "ee42c3b32a67474e8f39e99d73cad437", + "ee0be4052b98477686ad8ba7c04137f1", + "7d9ee5f86db147ed93305d1f177b0b4c", + "665633575b57488d89ee0f4b5dcc5c41", + "76cb84ce4c104bbfa9549f9a9994f519", + "d40a8fac5dd54e56b9848dda9935ab3c", + "9343be0105b34df7a12d4dc815e8d1a9", + "5d1f06fb5e494305a594af7503e3eee8", + "bd53c0da47454c55a4f32500d2fe629d", + "5791fc73cd3e49dc827b81c45c0bb803", + "fc24457e1ecb498c9617d1fcc72e137a", + "b36aead2966f4dfab7e6a7a82afcef30", + "5cb57618175c4ccf8951dfca37f8053f", + "893c9dba278b453292a2bc643ecc8944", + "23d52ca97fcf4df4b104060ace68c816", + "81529396a8494b488098cde54dae7306", + "8a75975a92184870b0644157e608fe2a", + "f962b3d000394a30b336a56b531ef095", + "d6cf83ce5c4d49159121e3208fc8a713", + "ff32272603fa4b14b2636e5fd2d9c241", + "01013f13409344b7ab7341454ce6c795", + "3058887d3b6343709f546b806e6f4378", + "ee11f0b4645e405bab530bf5b9217ce2", + "659966169e0641728d6f752b023ae825", + "d9ff6ab6b0e34a07b77f42e9fd3aabc5", + "13c7fc7aab5f4a8fa79200b176c147c0", + "7b1a91615eb94c36a7ed9d84a39943fa", + "a79f19edf0874d138e75095b0e27a122", + "274500131a7d4b87bb93627dec644f8a" + ] + }, + "id": "Nt4F36TuwoXw", + "outputId": "709e33e3-76b8-4f5a-c575-d61dabe6e64e" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz\n", + "Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to ./data/MNIST/raw/train-images-idx3-ubyte.gz\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + " 0%| | 0/9912422 [00:00=1.17.2 in /usr/local/lib/python3.9/dist-packages (from pytorch-lightning) (1.22.4)\n", + "Collecting lightning-utilities>=0.7.0\n", + " Downloading lightning_utilities-0.8.0-py3-none-any.whl (20 kB)\n", + "Requirement already satisfied: tqdm>=4.57.0 in /usr/local/lib/python3.9/dist-packages (from pytorch-lightning) (4.65.0)\n", + "Requirement already satisfied: typing-extensions>=4.0.0 in /usr/local/lib/python3.9/dist-packages (from pytorch-lightning) (4.5.0)\n", + "Requirement already satisfied: PyYAML>=5.4 in /usr/local/lib/python3.9/dist-packages (from pytorch-lightning) (6.0)\n", + "Requirement already satisfied: fsspec[http]>2021.06.0 in /usr/local/lib/python3.9/dist-packages (from pytorch-lightning) (2023.3.0)\n", + "Requirement already satisfied: torch>=1.11.0 in /usr/local/lib/python3.9/dist-packages (from pytorch-lightning) (1.13.1+cu116)\n", + "Requirement already satisfied: packaging>=17.1 in /usr/local/lib/python3.9/dist-packages (from pytorch-lightning) (23.0)\n", + "Collecting torchmetrics>=0.7.0\n", + " Downloading torchmetrics-0.11.4-py3-none-any.whl (519 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m519.2/519.2 KB\u001b[0m \u001b[31m23.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.9/dist-packages (from fsspec[http]>2021.06.0->pytorch-lightning) (2.27.1)\n", + "Collecting aiohttp!=4.0.0a0,!=4.0.0a1\n", + " Downloading aiohttp-3.8.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[31m25.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting frozenlist>=1.1.1\n", + " Downloading frozenlist-1.3.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (158 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m158.8/158.8 KB\u001b[0m \u001b[31m7.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>2021.06.0->pytorch-lightning) (2.0.12)\n", + "Collecting aiosignal>=1.1.2\n", + " Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)\n", + "Collecting multidict<7.0,>=4.5\n", + " Downloading multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m114.2/114.2 KB\u001b[0m \u001b[31m2.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting async-timeout<5.0,>=4.0.0a3\n", + " Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)\n", + "Collecting yarl<2.0,>=1.0\n", + " Downloading yarl-1.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (264 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m264.6/264.6 KB\u001b[0m \u001b[31m22.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>2021.06.0->pytorch-lightning) (22.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/dist-packages (from requests->fsspec[http]>2021.06.0->pytorch-lightning) (2022.12.7)\n", + "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.9/dist-packages (from requests->fsspec[http]>2021.06.0->pytorch-lightning) (1.26.15)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/dist-packages (from requests->fsspec[http]>2021.06.0->pytorch-lightning) (3.4)\n", + "Installing collected packages: multidict, lightning-utilities, frozenlist, async-timeout, yarl, torchmetrics, aiosignal, aiohttp, pytorch-lightning\n", + "Successfully installed aiohttp-3.8.4 aiosignal-1.3.1 async-timeout-4.0.2 frozenlist-1.3.3 lightning-utilities-0.8.0 multidict-6.0.4 pytorch-lightning-2.0.0 torchmetrics-0.11.4 yarl-1.8.2\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "import torch\n", + "import torch.nn as nn\n", + "import torchvision\n", + "import torchvision.transforms as transforms\n", + "import torch.nn.functional as F\n", + "import matplotlib.pyplot as plt\n", + "import pytorch_lightning as pl\n", + "from pytorch_lightning import Trainer" + ], + "metadata": { + "id": "0hDwmo22xpvA" + }, + "execution_count": 2, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Hyper-parameters\n", + "input_size = 784 # 28x28\n", + "hidden_size = 500\n", + "num_classes = 10\n", + "num_epochs = 2\n", + "batch_size = 100\n", + "learning_rate = 0.001" + ], + "metadata": { + "id": "lFdoEWXjxsOh" + }, + "execution_count": 3, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##Network Architecture:" + ], + "metadata": { + "id": "M-ZT12cFx3r1" + } + }, + { + "cell_type": "code", + "source": [ + "class LitNeuralNet(pl.LightningModule):\n", + " def __init__(self, input_size, hidden_size, num_classes):\n", + " super(LitNeuralNet, self).__init__()\n", + " self.validation_step_outputs = []\n", + " self.input_size = input_size\n", + " self.l1 = nn.Linear(input_size, hidden_size)\n", + " self.relu = nn.ReLU()\n", + " self.l2 = nn.Linear(hidden_size, num_classes)\n", + "\n", + " def forward(self, x):\n", + " out = self.l1(x)\n", + " out = self.relu(out)\n", + " out = self.l2(out)\n", + " # no activation and no softmax at the end\n", + " return out\n", + "\n", + " def training_step(self, batch, batch_idx):\n", + " images, labels = batch\n", + " images = images.reshape(-1, 28 * 28)\n", + "\n", + " # Forward pass\n", + " outputs = self(images)\n", + " loss = F.cross_entropy(outputs, labels)\n", + " \n", + " tensorboard_logs = {'train_loss': loss}\n", + " # use key 'log'\n", + " return {\"loss\": loss, 'log': tensorboard_logs}\n", + "\n", + " # define what happens for testing here\n", + "\n", + " def train_dataloader(self):\n", + " # MNIST dataset\n", + " train_dataset = torchvision.datasets.MNIST(\n", + " root=\"./data\", train=True, transform=transforms.ToTensor(), download=True\n", + " )\n", + " # Data loader\n", + " train_loader = torch.utils.data.DataLoader(\n", + " dataset=train_dataset, batch_size=batch_size, num_workers=4, shuffle=False\n", + " )\n", + " return train_loader\n", + "\n", + " def val_dataloader(self):\n", + " test_dataset = torchvision.datasets.MNIST(\n", + " root=\"./data\", train=False, transform=transforms.ToTensor(), download=True\n", + " )\n", + "\n", + " test_loader = torch.utils.data.DataLoader(\n", + " dataset=test_dataset, batch_size=batch_size, num_workers=4, shuffle=False\n", + " )\n", + " return test_loader\n", + " \n", + " def validation_step(self, batch, batch_idx):\n", + " images, labels = batch\n", + " images = images.reshape(-1, 28 * 28)\n", + "\n", + " # Forward pass\n", + " outputs = self(images)\n", + " \n", + " loss = F.cross_entropy(outputs, labels)\n", + "\n", + " self.validation_step_outputs.append(loss)\n", + " return {\"val_loss\": loss}\n", + " \n", + "\n", + " ## Used for accumilating steps; as it's executed after each validation epoch\n", + " def on_validation_epoch_end(self):\n", + " # outputs = list of dictionaries\n", + " avg_loss =torch.stack(self.validation_step_outputs).mean()\n", + " tensorboard_logs = {'avg_val_loss': avg_loss}\n", + " # use key 'log'\n", + " self.validation_step_outputs.clear() # free memory\n", + " return {'val_loss': avg_loss, 'log': tensorboard_logs}\n", + " \n", + "\n", + " ## If we want a testing phase then we could create two functions. test_step and test_dataloader\n", + " \n", + " def configure_optimizers(self):\n", + " return torch.optim.Adam(self.parameters(), lr=learning_rate)" + ], + "metadata": { + "id": "XNt6X2FCxsQ2" + }, + "execution_count": 6, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "model = LitNeuralNet(input_size, hidden_size, num_classes)\n", + " \n", + "# gpus=8\n", + "# fast_dev_run=True -> runs single batch through training and validation to quickly test wether the model works or not\n", + "# train_percent_check=0.1 -> train only on 10% of data\n", + "# auto_lr_find = True will run an algorithm to find the best lr\n", + "# deterministic = True will help reproduce my results\n", + "trainer = Trainer(max_epochs=num_epochs)\n", + "trainer.fit(model)\n", + " \n", + "# advanced features\n", + "# distributed_backend\n", + "# (DDP) implements data parallelism at the module level which can run across multiple machines.\n", + "# 16 bit precision\n", + "# log_gpu_memory\n", + "# TPU support\n", + "\n", + "# auto_lr_find: automatically finds a good learning rate before training\n", + "# deterministic: makes training reproducable\n", + "# gradient_clip_val: 0 default" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 787, + "referenced_widgets": [ + "52912bd33dc74a02a3f679c9bd75eeb3", + "13bb9ae1436c4a9982cc4f2600ec92f0", + "fd506646272f45f4b6594e84d2325991", + "ab159ce5121d4d09965bee6acec69c02", + "92656205dfa54cab9efbe62e20e8b0b3", + "57713f6c0a2f42f6b759c0f9a5564fe8", + "8dd75b5c94254e09a1418e4bcd9699b3", + "dab2858a04774a0b92a6b78a5820ba27", + "2597fc426f4d41a8aa9c23ab4e26bd75", + "b110d9b11c6943d2a4390b8d0a75b3ec", + "db41640e42624c72bebf7c9abe780fcf", + "7c8edd12776b4208bd8a4dede8053192", + "6049a7345a51485b8fa1b631fd2dbc60", + "a5970cde3a184da7a7cfc369a3b46569", + "d1e5a1df83744d668d56ee9d4a2f84f6", + "eb0db75564104edba466858a280a6d59", + "47d282a8ba834ed0a9076477e65a2ada", + "b35df21c693246748fbca88fc3da5235", + "9b7904fdc10c44b7a6aa540c544c5ede", + "2338ed0fabff47d29ac23031a87b35ca", + "fab3f367e35649f9a4ec0c2324e7b119", + "dc27e4be79bd425194074649dfea0f00", + "124a0b1b7dcc41af8d726f2cc46238df", + "5dcc4a1eae7f4cbfb03aa96c3cee9300", + "1eafebea3f7c46d98950b7ce7c31330a", + "6aeee8f43df24065bcc7e809f097a07a", + "972b43aecc3c42b8ac01b308d06ff1b3", + "d635a60d11d5430b88ed60559875b8e7", + "ec8fbbd25f784257968a2ab77aa0eb5d", + "684d49ebb9294467a8647f34bd921033", + "462fa741fa354882b8d2941e685d4f41", + "17504117a1aa41189edf815a30dce819", + "c25e2df379f54f9f9b660d2413f7f18e", + "979aef89ee0f4283898aded021e8c656", + "889f5d1527dc4ddb8c486e7a76108df9", + "4cdf563cd6324ecf869e697ebf0482b7", + "60bd724392e1461cbbdfbd2c9f35f60c", + "a6986230fd4e49bcbc2753cc0fc5c600", + "e1598e6ab2764d40a8fee80a3fd66a63", + "1eba897da0a947d1b877dc4643c88b11", + "860ac05c83624c14a966a24f4232bcd2", + "c6663874cec04e16898f4bd01915e7a4", + "fb3b378513964230a2f65c70472a3015", + "c6b4ce7a6e914dad818f4c5e74633ebc", + "19ffd4fe542f48af9da41961dc91a64d", + "34d544fdf6924acc90a3f66a4c5d7f2e", + "e09e602868d84f25ad593c22300641ff", + "92b2951c00db4b58bdb26361e5ad6ac5", + "faa0a9edd9dd485faa86be4bcafa56fa", + "85ebb4b6f83d4fc8b87306324ce6e116", + "7d4c9340d76142a395e200ff85a877d8", + "af6897b7906d4c97b010d25dac4ae2d0", + "a15dccfd008b47fc903f7cc799a07616", + "2ef36081061e4fa2a1170372215d8ca9", + "42f0221ccd4c4833b9e8972f59f6d3d0", + "78fb2f1a98054bca9ab2827385064ba7", + "221fbd4795f440be940e76cfe4c4b38d", + "5407cb3e676b4ca38025c2c65463ef3d", + "a22b6008735a44428986b5269bfa1524", + "7735c795e9364b4caa04c176781398cc", + "ea4e2dad6bf04863b375293096a1ffa4", + "88fbc5c81db94515b443d82131d15661", + "319c06ba763e44d18e5ba96c0c469b2f", + "7d0c40fd605847e1bbf30c8f6ab68cc0", + "0b0cc1247a0b4432b94b0294a9d8d4a0", + "deb8e6c0e25e4fdebb71a8ddc3f9f93a", + "13bbc81837b34479b626606ba2307de6", + "d3368397a9394f62b7bf82fdca369282", + "0c42f69476cc4d70861eacabad72af48", + "0d1e7c2537b24056a3179ef8ae50ae77", + "3f884468d47642b5b4bbc503d1c8f625", + "5bcda15161d74ab28de5429e13a68d89", + "4e5c7f48551d43619b1e0a76fd0fe1be", + "6ba3107c89154baca3872be30a525863", + "d550dcb8abc14e17952c9a27d01ba09b", + "f65be263185e43d8bb7289379d310ea4", + "e7f5224476574408954611999c2faed5", + "8a97162d5ab94718a9d5962943da9328", + "7bdc67a971214956a9a95fe58c82188d", + "508b7772f12045faa5bd0fe88bd6dc7f", + "03a31d66e4944392938f82c38ffb570d", + "83bb9eb22c7b41b2903c8ee6209633e0", + "9251d87216c347559b001bf9eee2ab94", + "d174785724ca4b1b9702eff05b95ea98", + "ababf52d3426476ea15301cf474c71db", + "784030986816424c9a6ebceef5d3bf41", + "25396e2c4f704a6183efdd95b85a823a", + "71b41467028f492fb6d7791a65075e68" + ] + }, + "id": "XLXp2GknxsTO", + "outputId": "6ac43fe2-49ef-431c-b4fb-b4b2b8587280" + }, + "execution_count": 7, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "INFO:pytorch_lightning.utilities.rank_zero:GPU available: False, used: False\n", + "INFO:pytorch_lightning.utilities.rank_zero:TPU available: False, using: 0 TPU cores\n", + "INFO:pytorch_lightning.utilities.rank_zero:IPU available: False, using: 0 IPUs\n", + "INFO:pytorch_lightning.utilities.rank_zero:HPU available: False, using: 0 HPUs\n", + "INFO:pytorch_lightning.callbacks.model_summary:\n", + " | Name | Type | Params\n", + "--------------------------------\n", + "0 | l1 | Linear | 392 K \n", + "1 | relu | ReLU | 0 \n", + "2 | l2 | Linear | 5.0 K \n", + "--------------------------------\n", + "397 K Trainable params\n", + "0 Non-trainable params\n", + "397 K Total params\n", + "1.590 Total estimated model params size (MB)\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "Sanity Checking: 0it [00:00, ?it/s]" + ], + "application/vnd.jupyter.widget-view+json": { + "version_major": 2, + "version_minor": 0, + "model_id": "52912bd33dc74a02a3f679c9bd75eeb3" + } + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz\n", + "Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to ./data/MNIST/raw/train-images-idx3-ubyte.gz\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + " 0%| | 0/9912422 [00:00