{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "provenance": [], "machine_shape": "hm", "gpuType": "T4" }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" }, "accelerator": "GPU", "widgets": { "application/vnd.jupyter.widget-state+json": { "3fcd5671998345fdb09141e78dac06cb": { "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_c70612a65eda444cab5124b962e0cee7", "IPY_MODEL_63a6c6e8662c497e9ff8b2be4b757810", "IPY_MODEL_c8b4354142734a32ad99561325596dfd" ], "layout": "IPY_MODEL_b39b62e8d2ad45dfab606982353c60e8" } }, "c70612a65eda444cab5124b962e0cee7": { "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_c990580f68d54fc989ad816819f46dde", "placeholder": "​", "style": "IPY_MODEL_e36342e4551348d18f12179014964b13", "value": "100%" } }, "63a6c6e8662c497e9ff8b2be4b757810": { "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_27a4402272b241daa6367aca7ba692ce", "max": 2, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_4f715c1a03fb44aeb92257fbe7c7e839", "value": 2 } }, "c8b4354142734a32ad99561325596dfd": { "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_27338958c6d24fdb8983b585e9edd292", "placeholder": "​", "style": "IPY_MODEL_ec957d10b29147ec8c8b90a59c7d4037", "value": " 2/2 [00:00<00:00, 57.00it/s]" } }, "b39b62e8d2ad45dfab606982353c60e8": { "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 } }, "c990580f68d54fc989ad816819f46dde": { "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 } }, "e36342e4551348d18f12179014964b13": { "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": "" } }, "27a4402272b241daa6367aca7ba692ce": { "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 } }, "4f715c1a03fb44aeb92257fbe7c7e839": { "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": "" } }, "27338958c6d24fdb8983b585e9edd292": { "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 } }, "ec957d10b29147ec8c8b90a59c7d4037": { "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": "" } }, "0f7c9ea31868471e8c2fb500f3e94d36": { "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_f2271bebba7a4b66a957592b6a37fe96", "IPY_MODEL_9170e53e3fd5413bbdfb6bbfcf9e5ea4", "IPY_MODEL_80a11ce4840b4d069f547199d0a2f14c" ], "layout": "IPY_MODEL_9ef4cdd9ed0c4ac39c75c275377349d1" } }, "f2271bebba7a4b66a957592b6a37fe96": { "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_81705e287b134db296c34db489fd0c1d", "placeholder": "​", "style": "IPY_MODEL_bf4c054d189e4c3786f76346dc2ef138", "value": "Map: 98%" } }, "9170e53e3fd5413bbdfb6bbfcf9e5ea4": { "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_98d7b2bab8274fed86f3f83c564a8215", "max": 16153, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_82e2b3a8fa034bea9016e4eabb16e6ef", "value": 16153 } }, "80a11ce4840b4d069f547199d0a2f14c": { "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_9ea6087301b44528adef74bab6d6567d", "placeholder": "​", "style": "IPY_MODEL_9733615affcb43cf93a99e2065e90272", "value": " 15795/16153 [00:11<00:00, 1563.88 examples/s]" } }, "9ef4cdd9ed0c4ac39c75c275377349d1": { "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": "hidden", "width": null } }, "81705e287b134db296c34db489fd0c1d": { "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 } }, "bf4c054d189e4c3786f76346dc2ef138": { "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": "" } }, "98d7b2bab8274fed86f3f83c564a8215": { "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 } }, "82e2b3a8fa034bea9016e4eabb16e6ef": { "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": "" } }, "9ea6087301b44528adef74bab6d6567d": { "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 } }, "9733615affcb43cf93a99e2065e90272": { "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": "" } }, "5f8c77503d57420496e7414250a89645": { "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_bf8737fe179d4959ab16aa62d385e788", "IPY_MODEL_e6344f27e5f24030bda964c65992c5cb", "IPY_MODEL_de6999c57aac444c9a5b54ba17bacf83" ], "layout": "IPY_MODEL_7e18799bb7224b7dbaf436e28033f7c5" } }, "bf8737fe179d4959ab16aa62d385e788": { "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_e26ec39e3ea444a2ab46b942e687c854", "placeholder": "​", "style": "IPY_MODEL_969416d6ff094b7f96a1f41d34517ad3", "value": "Map: 99%" } }, "e6344f27e5f24030bda964c65992c5cb": { "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_2269dc3ca919483384f41758a4693130", "max": 9094, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_154f44ca21c94f03b9400f059cf5110c", "value": 9094 } }, "de6999c57aac444c9a5b54ba17bacf83": { "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_0dba6fff23f74d84beca383ef467cce2", "placeholder": "​", "style": "IPY_MODEL_f82901ca544f4fc496fd102a140758fc", "value": " 9000/9094 [00:06<00:00, 1207.13 examples/s]" } }, "7e18799bb7224b7dbaf436e28033f7c5": { "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": "hidden", "width": null } }, "e26ec39e3ea444a2ab46b942e687c854": { "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 } }, "969416d6ff094b7f96a1f41d34517ad3": { "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": "" } }, "2269dc3ca919483384f41758a4693130": { "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 } }, "154f44ca21c94f03b9400f059cf5110c": { "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": "" } }, "0dba6fff23f74d84beca383ef467cce2": { "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 } }, "f82901ca544f4fc496fd102a140758fc": { "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": "" } }, "5e32c77feab1470585fb14010204a49f": { "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_9958ec712ec8458396a7cdb01a534d24", "IPY_MODEL_ed1993f5d5b542c99f0a2ae70a009494", "IPY_MODEL_686e87549e39445ab31b7941bccbc296" ], "layout": "IPY_MODEL_8cca8109b9554cdc9bd9fff42bbe1770" } }, "9958ec712ec8458396a7cdb01a534d24": { "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_a509fbab07e0498f86bca8608469f994", "placeholder": "​", "style": "IPY_MODEL_eaa3ed6779a44b23872f8823603d1f88", "value": "Map: 99%" } }, "ed1993f5d5b542c99f0a2ae70a009494": { "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_718143a8e62541929214b0bf57d2381e", "max": 16153, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_20643dba101b4ebea1ba47ed379b1195", "value": 16153 } }, "686e87549e39445ab31b7941bccbc296": { "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_0835947919864f3190c3be1f89463eb6", "placeholder": "​", "style": "IPY_MODEL_fc113406bb7f45deb77eb31ead37055c", "value": " 16000/16153 [00:08<00:00, 1974.54 examples/s]" } }, "8cca8109b9554cdc9bd9fff42bbe1770": { "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": "hidden", "width": null } }, "a509fbab07e0498f86bca8608469f994": { "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 } }, "eaa3ed6779a44b23872f8823603d1f88": { "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": "" } }, "718143a8e62541929214b0bf57d2381e": { "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 } }, "20643dba101b4ebea1ba47ed379b1195": { "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": "" } }, "0835947919864f3190c3be1f89463eb6": { "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 } }, "fc113406bb7f45deb77eb31ead37055c": { "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": "" } }, "7d532b2e827e48948cf834bec9f9671c": { "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_aebd6ab99f2345e7848605593fdbf505", "IPY_MODEL_705c2f087cea448fa6a1000ebd488cc6", "IPY_MODEL_8d0114c1443942f684ee1afbed6b900a" ], "layout": "IPY_MODEL_ad5cc02a81354abf815c5a580eb23a93" } }, "aebd6ab99f2345e7848605593fdbf505": { "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_f02e032cf8f64e7dad8bbce7829fc30a", "placeholder": "​", "style": "IPY_MODEL_07e84a1ab1684d0190a5cb33d5095977", "value": "Map: 99%" } }, "705c2f087cea448fa6a1000ebd488cc6": { "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_0bcaf4ec74134ec7ac7e11e039358cb8", "max": 9094, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_1fe7d113288d4937a088504e7c3478e9", "value": 9094 } }, "8d0114c1443942f684ee1afbed6b900a": { "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_ecd4a7c0cf124f96bf68ab426280a19a", "placeholder": "​", "style": "IPY_MODEL_2d0c4819279b4e36a6d554bf63ae02c4", "value": " 9000/9094 [00:04<00:00, 1793.87 examples/s]" } }, "ad5cc02a81354abf815c5a580eb23a93": { "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": "hidden", "width": null } }, "f02e032cf8f64e7dad8bbce7829fc30a": { "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 } }, "07e84a1ab1684d0190a5cb33d5095977": { "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": "" } }, "0bcaf4ec74134ec7ac7e11e039358cb8": { "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 } }, "1fe7d113288d4937a088504e7c3478e9": { "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": "" } }, "ecd4a7c0cf124f96bf68ab426280a19a": { "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 } }, "2d0c4819279b4e36a6d554bf63ae02c4": { "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": "" } }, "393556bf61f14caa90331c5459a96eef": { "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_eddf0d65dcf74b7cbe35acdf94f666e2", "IPY_MODEL_95d7df38d5e247df9289dc5942709103", "IPY_MODEL_ccd49b1779e14760a510acd5b5f6e20e" ], "layout": "IPY_MODEL_fac2066450c645f690a6518e9db2bc35" } }, "eddf0d65dcf74b7cbe35acdf94f666e2": { "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_d64e4b0c63e546e28ef240f5950ba70e", "placeholder": "​", "style": "IPY_MODEL_a1df1e5acb7240978b0a88c18a118ef9", "value": "Map: 100%" } }, "95d7df38d5e247df9289dc5942709103": { "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_c954881446104f0684e6baa44dd5a65b", "max": 16153, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_9ee1f579fcdb45e9949f5d078ab4a294", "value": 16153 } }, "ccd49b1779e14760a510acd5b5f6e20e": { "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_7d1ad0ce662146f38cae6f5ab1b0ea42", "placeholder": "​", "style": "IPY_MODEL_7a4643b94d034d8586dfbe5ebd1dfd7b", "value": " 16153/16153 [00:37<00:00, 513.97 examples/s]" } }, "fac2066450c645f690a6518e9db2bc35": { "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": "hidden", "width": null } }, "d64e4b0c63e546e28ef240f5950ba70e": { "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 } }, "a1df1e5acb7240978b0a88c18a118ef9": { "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": "" } }, "c954881446104f0684e6baa44dd5a65b": { "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 } }, "9ee1f579fcdb45e9949f5d078ab4a294": { "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": "" } }, "7d1ad0ce662146f38cae6f5ab1b0ea42": { "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 } }, "7a4643b94d034d8586dfbe5ebd1dfd7b": { "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": "" } }, "2824861544d946bdb05ced3397ca9bc2": { "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_2547762dc2af400992f8251937123cc9", "IPY_MODEL_741745b101b042e890e6e588bc9bdc63", "IPY_MODEL_ccc867e4d5fc452fb6ad1e03241e0873" ], "layout": "IPY_MODEL_49ba646f09cb40119455903afa842d08" } }, "2547762dc2af400992f8251937123cc9": { "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_ec793c29771842b08d8b4b09575420c8", "placeholder": "​", "style": "IPY_MODEL_dff87655256b4981b636452264e65206", "value": "Map: 100%" } }, "741745b101b042e890e6e588bc9bdc63": { "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_ed7c42fd191c4833a0c06f2a505c9a98", "max": 9094, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_a7fb5d645b1d4007ace0ab663f4b6560", "value": 9094 } }, "ccc867e4d5fc452fb6ad1e03241e0873": { "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_834b2162115d45e0b5424631098a659d", "placeholder": "​", "style": "IPY_MODEL_4eef9c63845d43ef93f764ef2aef374d", "value": " 9094/9094 [00:17<00:00, 521.71 examples/s]" } }, "49ba646f09cb40119455903afa842d08": { "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": "hidden", "width": null } }, "ec793c29771842b08d8b4b09575420c8": { "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 } }, "dff87655256b4981b636452264e65206": { "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": "" } }, "ed7c42fd191c4833a0c06f2a505c9a98": { "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 } }, "a7fb5d645b1d4007ace0ab663f4b6560": { "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": "" } }, "834b2162115d45e0b5424631098a659d": { "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 } }, "4eef9c63845d43ef93f764ef2aef374d": { "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": "" } }, "6483b3fa828d4a02afbccd42bb5969bb": { "model_module": "@jupyter-widgets/controls", "model_name": "VBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "VBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "VBoxView", "box_style": "", "children": [ "IPY_MODEL_8f0333ec39f24f0d9a75b19b6463532e", "IPY_MODEL_44b533e6171442468ca19a95c0337624", "IPY_MODEL_10b398d4e2e742f0b40da2a19b73907a", "IPY_MODEL_5c105e2ea7324d5ba92b2e35c84594b4" ], "layout": "IPY_MODEL_f67aba8de146433ab60aee99a70d9a4b" } }, "41a33bdcf71a4c14aa714e3021cad88c": { "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_f8c0ca13948542f5b21a632603af8023", "placeholder": "​", "style": "IPY_MODEL_ed46fa4a74d84fb1a1f304c9cb1509e2", "value": "

Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.
" } }, "390aa758fec54775886423d2fb4442c5": { "model_module": "@jupyter-widgets/controls", "model_name": "PasswordModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "PasswordModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "PasswordView", "continuous_update": true, "description": "Token:", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_d4f40bfa04a8419c9713a3c30370c76e", "placeholder": "​", "style": "IPY_MODEL_92866437f4324f67be43beff093e07d7", "value": "" } }, "7f44b27d085f40fe831d22f41509c495": { "model_module": "@jupyter-widgets/controls", "model_name": "CheckboxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "CheckboxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "CheckboxView", "description": "Add token as git credential?", "description_tooltip": null, "disabled": false, "indent": true, "layout": "IPY_MODEL_bc5baf3339b44703994aedad3614a373", "style": "IPY_MODEL_5580a8a01c9a471ab019d19b2f1a6083", "value": true } }, "3fc5cf6b4b084158ba291d04e98de95b": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ButtonView", "button_style": "", "description": "Login", "disabled": false, "icon": "", "layout": "IPY_MODEL_bea80930642e415c98942e19d6961bea", "style": "IPY_MODEL_bf2e0c7574924a9da3235a2813eb85a1", "tooltip": "" } }, "f6ead9021492479db0a0883636a68be7": { "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_9c596e6599a543f89b0aa58b2f040337", "placeholder": "​", "style": "IPY_MODEL_21884c9b23cb49edb5319f8b4dbc09fa", "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. " } }, "f67aba8de146433ab60aee99a70d9a4b": { "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": "center", "align_self": null, "border": null, "bottom": null, "display": "flex", "flex": null, "flex_flow": "column", "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": "50%" } }, "f8c0ca13948542f5b21a632603af8023": { "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 } }, "ed46fa4a74d84fb1a1f304c9cb1509e2": { "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": "" } }, "d4f40bfa04a8419c9713a3c30370c76e": { "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 } }, "92866437f4324f67be43beff093e07d7": { "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": "" } }, "bc5baf3339b44703994aedad3614a373": { "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 } }, "5580a8a01c9a471ab019d19b2f1a6083": { "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": "" } }, "bea80930642e415c98942e19d6961bea": { "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 } }, "bf2e0c7574924a9da3235a2813eb85a1": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "button_color": null, "font_weight": "" } }, "9c596e6599a543f89b0aa58b2f040337": { "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 } }, "21884c9b23cb49edb5319f8b4dbc09fa": { "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": "" } }, "5f3f998c135e42809597b04aeffe1c75": { "model_module": "@jupyter-widgets/controls", "model_name": "LabelModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_10c8e03577394a44823570f84dbf7fb9", "placeholder": "​", "style": "IPY_MODEL_0d4ed702344447239da9df287c454cc1", "value": "Connecting..." } }, "10c8e03577394a44823570f84dbf7fb9": { "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 } }, "0d4ed702344447239da9df287c454cc1": { "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": "" } }, "8f0333ec39f24f0d9a75b19b6463532e": { "model_module": "@jupyter-widgets/controls", "model_name": "LabelModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_13d6cc4b65724dcfb9b19745d3d02429", "placeholder": "​", "style": "IPY_MODEL_1ae67ea98b9c4429b0ccf951ba958851", "value": "Token is valid (permission: write)." } }, "44b533e6171442468ca19a95c0337624": { "model_module": "@jupyter-widgets/controls", "model_name": "LabelModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_2651ac59f2c74fda9a68b6ddcee5e8c6", "placeholder": "​", "style": "IPY_MODEL_80e6e4f9676b47cb898cf07b4efd7784", "value": "Your token has been saved in your configured git credential helpers (store)." } }, "10b398d4e2e742f0b40da2a19b73907a": { "model_module": "@jupyter-widgets/controls", "model_name": "LabelModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_3f0c671022994b1aadea7e1526d3bb97", "placeholder": "​", "style": "IPY_MODEL_5a23fc7f26194179b93ee2548b41f247", "value": "Your token has been saved to /root/.cache/huggingface/token" } }, "5c105e2ea7324d5ba92b2e35c84594b4": { "model_module": "@jupyter-widgets/controls", "model_name": "LabelModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_484268a9451c48be9f8ed51f55f0b726", "placeholder": "​", "style": "IPY_MODEL_8d97b75c803d41b187aca0ce43d90f52", "value": "Login successful" } }, "13d6cc4b65724dcfb9b19745d3d02429": { "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 } }, "1ae67ea98b9c4429b0ccf951ba958851": { "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": "" } }, "2651ac59f2c74fda9a68b6ddcee5e8c6": { "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 } }, "80e6e4f9676b47cb898cf07b4efd7784": { "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": "" } }, "3f0c671022994b1aadea7e1526d3bb97": { "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 } }, "5a23fc7f26194179b93ee2548b41f247": { "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": "" } }, "484268a9451c48be9f8ed51f55f0b726": { "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 } }, "8d97b75c803d41b187aca0ce43d90f52": { "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": "" } }, "93f98cafe9a54e49b1a6dae6031f9b8c": { "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_caa56c9fb75f43b0974f9c02a933fe43", "IPY_MODEL_991929bba22647d79be683d2946ebeac", "IPY_MODEL_268104e667c64665be940dc048050040" ], "layout": "IPY_MODEL_721f473c88c743ad8ababadc35bde1e9" } }, "caa56c9fb75f43b0974f9c02a933fe43": { "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_70cfa43583f54962bdc1cad4c32fc12a", "placeholder": "​", "style": "IPY_MODEL_7d714e7e7fd9464a9239c926d4d4357d", "value": "pytorch_model.bin: 100%" } }, "991929bba22647d79be683d2946ebeac": { "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_601ac88f59744374bfe70f6aa87473f3", "max": 267854125, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_414abfed64794b47830d125bbf89e39c", "value": 267854125 } }, "268104e667c64665be940dc048050040": { "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_6af51f896d74438f9b7f931ae2e78bfd", "placeholder": "​", "style": "IPY_MODEL_50c560a47cbb494bbf399efc4d464ce8", "value": " 268M/268M [00:11<00:00, 27.5MB/s]" } }, "721f473c88c743ad8ababadc35bde1e9": { "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 } }, "70cfa43583f54962bdc1cad4c32fc12a": { "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 } }, "7d714e7e7fd9464a9239c926d4d4357d": { "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": "" } }, "601ac88f59744374bfe70f6aa87473f3": { "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 } }, "414abfed64794b47830d125bbf89e39c": { "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": "" } }, "6af51f896d74438f9b7f931ae2e78bfd": { "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 } }, "50c560a47cbb494bbf399efc4d464ce8": { "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": "code", "source": [ "!pip install datasets\n", "!pip install transformers" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "3pCTD5isFrhN", "outputId": "e3b1cd9a-7ec2-4444-fca4-527f9244c786" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Requirement already satisfied: datasets in /usr/local/lib/python3.10/dist-packages (2.13.1)\n", "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.22.4)\n", "Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (9.0.0)\n", "Requirement already satisfied: dill<0.3.7,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.3.6)\n", "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (1.5.3)\n", "Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (2.27.1)\n", "Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.65.0)\n", "Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets) (3.2.0)\n", "Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from datasets) (0.70.14)\n", "Requirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (2023.6.0)\n", "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.8.4)\n", "Requirement already satisfied: huggingface-hub<1.0.0,>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.16.4)\n", "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (23.1)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0.1)\n", "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (23.1.0)\n", "Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (2.0.12)\n", "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.0.4)\n", "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.2)\n", "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.9.2)\n", "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.4.0)\n", "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0.0,>=0.11.0->datasets) (3.12.2)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0.0,>=0.11.0->datasets) (4.7.1)\n", "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (1.26.16)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (2023.5.7)\n", "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (3.4)\n", "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n", "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2022.7.1)\n", "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas->datasets) (1.16.0)\n", "Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (4.31.0)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers) (3.12.2)\n", "Requirement already satisfied: huggingface-hub<1.0,>=0.14.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.16.4)\n", "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (1.22.4)\n", "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (23.1)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (6.0.1)\n", "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (2022.10.31)\n", "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers) (2.27.1)\n", "Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.13.3)\n", "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.3.1)\n", "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers) (4.65.0)\n", "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers) (2023.6.0)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers) (4.7.1)\n", "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (1.26.16)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2023.5.7)\n", "Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2.0.12)\n", "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (3.4)\n" ] } ] }, { "cell_type": "code", "source": [ "pip install transformers[torch]" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "GTagr5gdU_Xh", "outputId": "89348a5d-a76c-4656-fc1d-e55566993131" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Requirement already satisfied: transformers[torch] in /usr/local/lib/python3.10/dist-packages (4.31.0)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (3.12.2)\n", "Requirement already satisfied: huggingface-hub<1.0,>=0.14.1 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (0.16.4)\n", "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (1.22.4)\n", "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (23.1)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (6.0.1)\n", "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (2022.10.31)\n", "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (2.27.1)\n", "Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (0.13.3)\n", "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (0.3.1)\n", "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (4.65.0)\n", "Requirement already satisfied: torch!=1.12.0,>=1.9 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (2.0.1+cu118)\n", "Requirement already satisfied: accelerate>=0.20.3 in /usr/local/lib/python3.10/dist-packages (from transformers[torch]) (0.21.0)\n", "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate>=0.20.3->transformers[torch]) (5.9.5)\n", "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers[torch]) (2023.6.0)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers[torch]) (4.7.1)\n", "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.9->transformers[torch]) (1.11.1)\n", "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.9->transformers[torch]) (3.1)\n", "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.9->transformers[torch]) (3.1.2)\n", "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.9->transformers[torch]) (2.0.0)\n", "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch!=1.12.0,>=1.9->transformers[torch]) (3.25.2)\n", "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch!=1.12.0,>=1.9->transformers[torch]) (16.0.6)\n", "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers[torch]) (1.26.16)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers[torch]) (2023.5.7)\n", "Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests->transformers[torch]) (2.0.12)\n", "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers[torch]) (3.4)\n", "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch!=1.12.0,>=1.9->transformers[torch]) (2.1.3)\n", "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch!=1.12.0,>=1.9->transformers[torch]) (1.3.0)\n" ] } ] }, { "cell_type": "code", "source": [ "pip install accelerate" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "W79jQrLDVa5y", "outputId": "993275fa-693f-409b-b9ee-4584f1138904" }, "execution_count": 155, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (0.21.0)\n", "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from accelerate) (1.22.4)\n", "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (23.1)\n", "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate) (5.9.5)\n", "Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from accelerate) (6.0.1)\n", "Requirement already satisfied: torch>=1.10.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (2.0.1+cu118)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.12.2)\n", "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (4.7.1)\n", "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (1.11.1)\n", "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.1)\n", "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.1.2)\n", "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (2.0.0)\n", "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.10.0->accelerate) (3.25.2)\n", "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.10.0->accelerate) (16.0.6)\n", "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.10.0->accelerate) (2.1.3)\n", "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.10.0->accelerate) (1.3.0)\n" ] } ] }, { "cell_type": "code", "source": [ "pip install huggingface_hub" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ttRAPdYa5N0d", "outputId": "dc166ea5-081b-45b6-a766-341e7c7ad68a" }, "execution_count": 156, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.10/dist-packages (0.16.4)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (3.12.2)\n", "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2023.6.0)\n", "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2.27.1)\n", "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.65.0)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (6.0.1)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.7.1)\n", "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (23.1)\n", "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (1.26.16)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2023.5.7)\n", "Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2.0.12)\n", "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.4)\n" ] } ] }, { "cell_type": "markdown", "source": [ "## Steps\n", "\n", "1. prepare dataset\n", "2. load pretrained Tokenizer, call it with dataset -> encoding\n", "3. build PyTorch Dataset with encodings\n", "4. Load pretrained Model\n", "5. a. Load Trainer and train it\n", " b. or use naive Pytorch training pipeline" ], "metadata": { "id": "rzk_Q6ACfTIl" } }, { "cell_type": "markdown", "source": [ "## Pretrained model for patentability from Hugging face" ], "metadata": { "id": "EALuEZYSJozD" } }, { "cell_type": "code", "source": [ "model_name = 'distilbert-base-uncased' #'AI-Growth-Lab/PatentSBERTa'" ], "metadata": { "id": "Ds0R-Aacnxj1" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": [ "## Import libraries and pretrained model" ], "metadata": { "id": "cPjlmk7aFwkR" } }, { "cell_type": "code", "source": [ "# Pretty print\n", "from pprint import pprint\n", "# Datasets load_dataset function\n", "from datasets import load_dataset\n", "# Transformers Autokenizer\n", "from transformers import AutoTokenizer, AutoModelForSequenceClassification, DistilBertForSequenceClassification\n", "tokenizer = AutoTokenizer.from_pretrained(model_name)\n", "# Standard PyTorch DataLoader\n", "from torch.utils.data import DataLoader\n", "\n", "from transformers import pipeline, Trainer, TrainingArguments\n", "\n", "import numpy as np\n", "import torch\n", "import torch.nn.functional as F\n", "\n", "from transformers import logging\n", "\n", "logging.set_verbosity_warning()\n", "\n", "from huggingface_hub import notebook_login\n", "\n", "notebook_login()" ], "metadata": { "id": "FxZeFFTlFvz1", "colab": { "base_uri": "https://localhost:8080/", "height": 145, "referenced_widgets": [ "6483b3fa828d4a02afbccd42bb5969bb", "41a33bdcf71a4c14aa714e3021cad88c", "390aa758fec54775886423d2fb4442c5", "7f44b27d085f40fe831d22f41509c495", "3fc5cf6b4b084158ba291d04e98de95b", "f6ead9021492479db0a0883636a68be7", "f67aba8de146433ab60aee99a70d9a4b", "f8c0ca13948542f5b21a632603af8023", "ed46fa4a74d84fb1a1f304c9cb1509e2", "d4f40bfa04a8419c9713a3c30370c76e", "92866437f4324f67be43beff093e07d7", "bc5baf3339b44703994aedad3614a373", "5580a8a01c9a471ab019d19b2f1a6083", "bea80930642e415c98942e19d6961bea", "bf2e0c7574924a9da3235a2813eb85a1", "9c596e6599a543f89b0aa58b2f040337", "21884c9b23cb49edb5319f8b4dbc09fa", "5f3f998c135e42809597b04aeffe1c75", "10c8e03577394a44823570f84dbf7fb9", "0d4ed702344447239da9df287c454cc1", "8f0333ec39f24f0d9a75b19b6463532e", "44b533e6171442468ca19a95c0337624", "10b398d4e2e742f0b40da2a19b73907a", "5c105e2ea7324d5ba92b2e35c84594b4", "13d6cc4b65724dcfb9b19745d3d02429", "1ae67ea98b9c4429b0ccf951ba958851", "2651ac59f2c74fda9a68b6ddcee5e8c6", "80e6e4f9676b47cb898cf07b4efd7784", "3f0c671022994b1aadea7e1526d3bb97", "5a23fc7f26194179b93ee2548b41f247", "484268a9451c48be9f8ed51f55f0b726", "8d97b75c803d41b187aca0ce43d90f52" ] }, "outputId": "24e185c0-54dc-4a14-9012-4f6edeeb4e07" }, "execution_count": 157, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "VBox(children=(HTML(value='
BACKGROUND OF THE INVENTION A network interface device permits a subscriber to access a network. A passive optical network (PON) is an example of a network capable of delivering voice, video and other data among multiple network subscribers, using a common optical fiber link. Passive optical splitters and combiners enable multiple optical network terminals (ONTs) to share the optical fiber link. In a PON, each ONT terminates the optical fiber link for a residential or business subscriber, and is sometimes referred to as a subscriber premises node that delivers Fiber to the Premises (FTTP) services. An ONT is connected to one or more subscriber devices, such as televisions, set-top boxes, telephones, computers, or network appliances, which ultimately receive the voice, video and data delivered vii the PON. An ONT is an example of a network interface, device. Other examples of a network interface device, in different network types, include cable modems and digital subscriber line (DSL) boxes. Generally, a network also includes a network access interface. In a PON, the network access interface is sometimes referred to as an optical line terminator (OLT), having multiple, independent PON interface modules that serve multiple optical fiber links. A PON interface module provides an interface for transmission and reception of data packets over a particular optical fiber link that serves a group of ONTs. A PON is a downstream-multicast medium. Each packet transmitted on an optical fiber link can be received by every ONT served by that link. ONTs identify selected packets or frames on the fiber link based on addressing information included within the packets or frames. Network equipment, such as network interface devices, in a cable or hybrid network may be connected to power provided by a central office (CO), which commonly utilizes battery and generator back-up power to maintain a continuous power supply. In contrast, an ONT in an all-fiber optic network is ordinarily powered locally at the subscriber premises. For this reason, an ONT often includes a battery to provide backup power during a power outage to maintain critical services, such as voice service. Conventionally, the fibre of a PON typically terminates at a street cabinet to be shared by a number of subscriber equipment. The street cabinet houses an optical network terminal (ONT). The last few meters or kilometer from the street cabinet to a subscriber's home is typically bridged using existing twisted pair copper cables or radio links. The bandwidth resources of the fibre to the street cabinet are typically shared amongst a group of subscribers using an Ethernet switch. For example the fibre may extend to a street cabinet, a kerb outside a subscribers home, or directly into the subscribers home itself. Due to the bulkiness, size and complexity of the ONT cabinets are all factors that increase design difficulty and accrue additional costs. Also, the ONT itself is valuable, and its mounting on a wall, especially outside, makes it susceptible to theft or to being accidentally knocked down. Therefore, it would be desirable to have a compact optical network terminal to make passive optical networks seamlessly connected to regular computers and any other systems to overcome the above restrictions.\"],\n", " 'summary': [' SUMMARY OF THE INVENTION An aspect of the present invention is to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below. Accordingly, an aspect of the present invention is to provide a compact optical network terminal, comprising a first interface coupled to a communications network, a second interface coupled to a network client and a processor including a circuitry and a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network. Other aspects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention.'],\n", " 'description': [\"FIELD OF THE INVENTION The present invention relates to the field of passive optical network (PON), and in particular, to an optical network terminal (ONT) in the PON system. BACKGROUND OF THE INVENTION A network interface device permits a subscriber to access a network. A passive optical network (PON) is an example of a network capable of delivering voice, video and other data among multiple network subscribers, using a common optical fiber link. Passive optical splitters and combiners enable multiple optical network terminals (ONTs) to share the optical fiber link. In a PON, each ONT terminates the optical fiber link for a residential or business subscriber, and is sometimes referred to as a subscriber premises node that delivers Fiber to the Premises (FTTP) services. An ONT is connected to one or more subscriber devices, such as televisions, set-top boxes, telephones, computers, or network appliances, which ultimately receive the voice, video and data delivered vii the PON. An ONT is an example of a network interface, device. Other examples of a network interface device, in different network types, include cable modems and digital subscriber line (DSL) boxes. Generally, a network also includes a network access interface. In a PON, the network access interface is sometimes referred to as an optical line terminator (OLT), having multiple, independent PON interface modules that serve multiple optical fiber links. A PON interface module provides an interface for transmission and reception of data packets over a particular optical fiber link that serves a group of ONTs. A PON is a downstream-multicast medium. Each packet transmitted on an optical fiber link can be received by every ONT served by that link. ONTs identify selected packets or frames on the fiber link based on addressing information included within the packets or frames. Network equipment, such as network interface devices, in a cable or hybrid network may be connected to power provided by a central office (CO), which commonly utilizes battery and generator back-up power to maintain a continuous power supply. In contrast, an ONT in an all-fiber optic network is ordinarily powered locally at the subscriber premises. For this reason, an ONT often includes a battery to provide backup power during a power outage to maintain critical services, such as voice service. Conventionally, the fibre of a PON typically terminates at a street cabinet to be shared by a number of subscriber equipment. The street cabinet houses an optical network terminal (ONT). The last few meters or kilometer from the street cabinet to a subscriber's home is typically bridged using existing twisted pair copper cables or radio links. The bandwidth resources of the fibre to the street cabinet are typically shared amongst a group of subscribers using an Ethernet switch. For example the fibre may extend to a street cabinet, a kerb outside a subscribers home, or directly into the subscribers home itself. Due to the bulkiness, size and complexity of the ONT cabinets are all factors that increase design difficulty and accrue additional costs. Also, the ONT itself is valuable, and its mounting on a wall, especially outside, makes it susceptible to theft or to being accidentally knocked down. Therefore, it would be desirable to have a compact optical network terminal to make passive optical networks seamlessly connected to regular computers and any other systems to overcome the above restrictions. SUMMARY OF THE INVENTION An aspect of the present invention is to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below. Accordingly, an aspect of the present invention is to provide a compact optical network terminal, comprising a first interface coupled to a communications network, a second interface coupled to a network client and a processor including a circuitry and a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network. Other aspects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention. BRIEF DESCRIPTION OF THE DRAWINGS The above and other aspects, features, and advantages of certain exemplary embodiments of the present invention will be more apparent from the following description taken in conjunction with the accompanying drawings in which: FIG. 1A is a mechanical diagram of an optical network terminal (ONT) typical of customer premises equipment (CPE). FIG. 1B is a mechanical diagram of the ONT of FIG. 1A attached to a mounting bracket. FIG. 2 shows a typical Passive Optical Network (PON) Architecture. FIG. 3 shows a compatible optical network terminal (ONT) according to one embodiment of the present invention. FIG. 4 is a diagrammatic system view of a data processing system in which any of the embodiments disclosed herein may be performed. Persons skilled in the art will appreciate that elements in the figures are illustrated for simplicity and clarity and may have not been drawn to scale. For example, the dimensions of some of the elements in the figure may be exaggerated relative to other elements to help to improve understanding of various exemplary embodiments of the present disclosure. Throughout the drawings, it should be noted that like reference numbers are used to depict the same or similar elements, features, and structures. DETAIL DESCRIPTION OF THE INVENTION The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of exemplary embodiments of the invention as defined by the claims and their equivalents. It includes various specific details to assist in that understanding but′ these are to be regarded as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness. The terms and words used in the following description and claims are not limited to the bibliographical meanings, but, are merely used by the inventor to enable a clear and consistent understanding of the invention. Accordingly, it should be apparent to those skilled in the art that the following description of exemplary embodiments of the present invention are provided for illustration purpose only and not for the purpose of limiting the invention as defined by the appended claims and their equivalents. It is to be understood that the singular forms “a,” “an,” and “the” include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to “a component surface” includes reference to one or more of such surfaces. By the term “substantially” it is meant that the recited characteristic, parameter, or value need not be achieved exactly, but that deviations or variations, including for example, tolerances, measurement error, measurement accuracy limitations and other factors known to those of skill in the art, may occur in amounts that do not preclude the effect the characteristic was intended to provide. FIGS. 1 through 4, discussed below, and the various embodiments used to describe the principles of the present disclosure in this patent document are by way of illustration only and should not be construed in any way that would limit the scope of the disclosure. Those skilled in the art will understand that the principles of the present disclosure may be implemented in any suitably arranged communications system. The terms used to describe various embodiments are exemplary. It should be understood that these are provided to merely aid the understanding of the description, and that their use and definitions in no way limit the scope of the invention. Terms first, second, and the like are used to differentiate between objects having the same terminology and are in no way intended to represent a chronological order, unless where explicitly stated otherwise. A set is defined as a non-empty set including at least one element. FIG. 1A shows an optical network terminal (ONT) 100, which is an example of customer premises equipment (CPE), that connects a customer's communications equipment, e.g., computers, telephones, and televisions, to a telecommunications service provider. The ONT 100 includes an outer case 102 with an engagable cover 104 that covers a battery compartment (not shown) or another cavity of the ONT 100. A face 106 of the ONT 100 carries various connectors, including a power connector 108, coaxial cable connector 110, fiber optic cable connector 112, Ethernet (CAT-5) connector 114, and two telephone connectors 116. The ONT 100 transmits data to and receives data from a telecommunications network (not shown) via a fiber optic cable (not shown) connected to a fiber optic cable connector 112. Televisions, computers, and telephones on the customer's premises may be connected to the coaxial cable connector 110, Ethernet connector 114, and telephone connectors 116, respectively, on the ONT 100. FIG. 1B shows the ONT 100 of FIG. 1A with connector details with a bracket 120 attached to the outer case 102. The bracket 120 may be mounted to a wall (not shown), and the ONT 100 may be hung on the bracket. In many applications, the bracket 120 is installed on an exterior wall of a building or inside a garage, locations at which the ONT may be exposed to large temperature variations and different weather conditions. FIG. 2 shows a general Passive Optical Network (PON) Architecture. The elements of a PON are (i) Optical Line Terminal (OLT) 210 (ii) Passive Optical Splitter 220 and (iii) Optical Network Unit (ONU) 230. The Optical Line Terminal 210 is the main element of the network and is usually placed in the Local Exchange. It is a network element with PON line card, basically a aggregation switch. It works as an interface between core network and PON network. Optical Splitter 220 is a passive device with single input and multiple outputs. Optical power at input is split evenly between outputs. Not only signal travels from input to the outputs, signal can also travel from the output to the input. Splitters can be placed anywhere in between Central Office (CO) and Subscriber premises. It is used to connect an optical port of OLT with multiple subscribers. Optical Network units (ONUs) 230 serve as an interface to the network and are deployed at customer premises 240. It provides several interfaces for accessing triple play services and in the upper side it connects with the OLT via optical splitter. Although PONs can exist in three basic configuration (tree, bus and ring), the tree topology is favored due to smaller variation in the signal power from different end station. PON uses 1490 nm for the downstream wavelength and 1310 nm for the upstream wavelength. Signals are inserted or extracted from the fibre using a coarse wavelength division multiplexer (CWDM) filter at the CO and subscriber premises. FIG. 3 shows a compatible optical network terminal (ONT) according to one embodiment of the present invention. The optical network terminal (ONT) 300 includes a first interface 310, a second interface 320 and a middle region 330 sandwiched between the first and second interface. The first interface 310 coupled to a communications network 340, a second interface 320 coupled to a network client 350. The first interface is connected through a dedicated optical fiber link 360 (bi-directional) to receive optical signals from one or more communication network 340. The communication network may be or may include one or more but not limited to any of the xPON network 340 (e.g. of a broadband passive optical network (BPON), a gigabit-capable passive optical network (GPON), an Ethernet passive optical network (EPON), a gigabit-capable Ethernet passive optical network (GEPON), an active Ethernet optical network and any other future passive optical networks etc). The second interface 320 is coupled to the network client 350 though a USB port. In an operation, the middle region which may be a processor 330 including a memory (not shown in figure) coupled to the first interface 310 and to the second interface 320, wherein the processor 330 includes a circuitry which is configured for converting optical signals to electric signals, such that the network client can access the communications network. The first interface 310 may include an optical module (not shown in figure) which receives optical signals via the optical fiber link 360 and capable of converting the optical signals to electrical signals. The second interface 320 may include a control circuit (not shown in figure) which is capable of receiving the power from the network client 350 for processing the received electrical signals thereby reducing the required protocol processing time from the network client. Due to this behavior of the second interface 320 results in simplifying the ONT design by offloading the “non-volatile” part of the software to the network client 350 and downloading it on power to turn it. Most of the backend work can also be done by a software driver residing in the network client. Further, the second interface 320 acts as a network connectivity dongle with an optical transceiver at one end. Furthermore, the second interface may include a Universal Serial Bus (USB) jack which is couplable to Universal Serial Bus (USB) plug or connector of the network client 350. The second interface 320 capable of power up the “dongle” to connect it to the central office or Optical Line Terminal (OLT) by excluding external power source as required in the conventional design of ONT. In an example operation the Optical Network Terminal. (ONT) is connected to the network client through a USB port. Once the USB port of the network client 360 is coupled to the USB interface i.e. second interface 320, one or more driver needs to be installed at the network client 360 which then onwards controls the USB dongle (ONT) with the configured parameters at the installation time. The software boots up the USB dongle and communicates to network client 360 as a memory device with a built-in driver. The xPON protocol selected at the network client 360 will run and then converts the data coming from the WAN/LAN side to network client 360 as a network device. Once the software starts running in the network client 360, it would get connected to the OLT using the required xPON protocol. Once the network client 360 and the xPON network are connected, each network client 360 will have a dedicated connection (e.g. speed, bandwidth etc) as requested or selected by the client side. By this kind of novel and compatible design i.e. having xPON interface on one side and USB protocol interface on the other side will eradicate the necessity of the external power for the ONT. Also, by this kind of compatible design reduce the unnecessary splitting of equal upstream wavelength to all the network clients in the network. The network client may be or may include a host computer, a optical network unit, a optical network terminal or any other unit or terminal or device which is capable of accessing the passive optical network (xPON). FIG. 4 is a diagrammatic system view 400 of a data processing system in which any of the embodiments disclosed herein may be performed, according to one embodiment. Particularly, the diagrammatic system view of FIG. 4 illustrates a processor 402, a main memory 404, a static memory 406, a bus 408, a video display 410, an alpha-numeric input device 412, a cursor control device 414, a drive unit 416, a signal generation device 418, a network interface device 420, a machine readable medium 422, instructions 424 and a network 426. The diagrammatic system view 400 may indicate a personal computer and/or a data processing system in which one or more operations disclosed herein are performed. The processor 402 may be a microprocessor, a state machine, an application specific integrated circuit, a field programmable gate array; etc. (e.g., Intel® Pentium® processor). The main memory 404 may be a dynamic random access memory and/or a primary memory of a computer system. The static memory 406 may be a hard drive, a flash drive, and/or other memory information associated with the data processing system. The bus 408 may be an interconnection between various circuits and/or structures of the data processing system. The video display 410 may provide graphical representation of information on the data processing system. The alpha-numeric input device 412 may be a keypad, keyboard and/or any other input device of text (e.g., a special device to aid the physically handicapped). The cursor control device 414 may be a pointing device such as a mouse. The drive unit 416 may be a hard drive, a storage system, and/or other longer term storage subsystem. The signal generation device 418 may be a bios and/or a functional operating system of the data processing system. The network interface device 420 may perform interface functions (e.g., code conversion, protocol conversion, and/or buffering) required for communications to and from the network 426 between a number of independent devices (e.g., of varying protocols). The machine readable medium 422 may provide instructions on which any of the methods disclosed herein may be performed. The instructions 424 may provide source code and/or data code to the processor 402 to enable any one/or more operations disclosed herein. FIGS. 1-4 are merely representational and are not drawn to scale. Certain portions thereof may be exaggerated, while others may be minimized. FIGS. 1-4 illustrate various embodiments of the invention that can be understood and appropriately carried out by those of ordinary skill in the art. In the foregoing detailed description of embodiments of the invention, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive subject matter lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby incorporated into the detailed description of embodiments of the invention, with each claim standing on its own as a separate embodiment. It is understood that the above description is intended to be illustrative, and not restrictive. It is intended to cover all alternatives, modifications and equivalents as may be included within the spirit and scope of the invention as defined in the appended claims. Many other embodiments will be apparent to those of skill in the art upon reviewing the above description. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled. In the appended claims, the terms “including” and “in which” are used as the plain-English equivalents of the respective terms “comprising” and “wherein,” respectively.\"],\n", " 'cpc_label': ['H04Q110071'],\n", " 'ipc_label': ['H04Q1100'],\n", " 'filing_date': ['20160120'],\n", " 'patent_issue_date': ['20170606'],\n", " 'date_published': ['20160526'],\n", " 'examiner_id': ['95191.0']}" ] }, "metadata": {}, "execution_count": 106 } ] }, { "cell_type": "code", "source": [ "train_dict[0]['claims']" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 157 }, "id": "jDBvcgmP5Puh", "outputId": "847beca8-1461-4f8b-d06d-c83acf3c2c65" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "'1. A compact optical network terminal, comprising: a first interface coupled to a communications network; a second interface coupled to a network client, wherein the second interface is a network connectivity dongle with an optical transceiver at one end; and a processor including a circuitry and a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network thereby reducing the unnecessary splitting of equal upstream wavelengths to all the network clients in the network. 2. The optical network terminal of claim 1, wherein the first interface includes an optical module that receives optical signals via the optical fiber link and converts the optical signals to electrical signals. 3. The optical network terminal of claim 2, wherein the optical module is selectively configurable to support two or more of a broadband passive optical network (BPON), a gigabit-capable passive optical network (GPON), an Ethernet passive optical network (EPON), a gigabit-capable Ethernet passive optical network (GEPON) and an active Ethernet optical network. 4. The optical network terminal of claim 1, wherein the network client includes a converter unit for converting at least some of the electrical signals to data units which is selectively configurable to support a plurality of optical network protocols. 5. The optical, network terminal of claim 1, wherein the second interface includes a control circuitry which is capable of receiving the power from the network client for processing the received electrical signals thereby reducing the required protocol processing time from the network client. 6. The optical network terminal of claim 1, wherein the network client is capable of processing the xPON protocols to communicate with one or more Optical Line Terminal (OLT). 7. (canceled) 8. The optical network terminal of claim 1, wherein the second interface includes a Universal Serial Bus (USB) jack which is couplable to Universal Serial Bus (USB) plug or connector of the network client. 9. The optical network terminal of claim 1, wherein the at least one communication service with the xPON network comprises a first communication service and a second communication service, and wherein the communication service includes at least one voice communication service, a data communication service, and a video service. 10. (canceled)'" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" } }, "metadata": {}, "execution_count": 107 } ] }, { "cell_type": "code", "source": [ "train_dict[0]['abstract']" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 105 }, "id": "sBhSPSV-5XKS", "outputId": "ac955e81-b5e2-4a73-a011-e3090482a15a" }, "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "'The present invention relates to passive optical network (PON), and in particular, to an optical network terminal (ONT) in the PON system. In one embodiment, the optical network terminal includes a first interface coupled to a communications network, a second interface coupled to a network client and a processor including a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network.'" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" } }, "metadata": {}, "execution_count": 108 } ] }, { "cell_type": "code", "source": [ "# Print info about the sizes of the train and validation sets\n", "print(f'Train dataset size: {dataset_dict[\"train\"].shape}')\n", "print(f'Validation dataset size: {dataset_dict[\"validation\"].shape}')" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "_737fP8byR80", "outputId": "258a614e-7514-43c6-bce9-92192c9404cc" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Train dataset size: (16153, 14)\n", "Validation dataset size: (9094, 14)\n" ] } ] }, { "cell_type": "markdown", "source": [ "## Pre-Processing the data" ], "metadata": { "id": "vsDHmJOQyaJo" } }, { "cell_type": "markdown", "source": [ "the label-to-index mapping for the decision status field by assigning the decision status labels to the class indices.\n", "\n", "Since we want a patentability score between 0 to 1, I will assign the labels to either 0 or 1.\n", "\n", "Pending is 1 for this project." ], "metadata": { "id": "Ir63W-lwyjIE" } }, { "cell_type": "code", "source": [ "# Label-to-index mapping for the decision status field\n", "decision_to_str = {'REJECTED': 0, 'ACCEPTED': 1, 'PENDING': 1, 'CONT-REJECTED': 0, 'CONT-ACCEPTED': 1, 'CONT-PENDING': 1}\n", "\n", "# Helper function\n", "def map_decision_to_string(example):\n", " return {'decision': decision_to_str[example['decision']]}" ], "metadata": { "id": "tmyPz1nRyZoG" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": [ "re-label the decision status fields of the examples in the training and validation sets" ], "metadata": { "id": "3fN3dJrzypqJ" } }, { "cell_type": "code", "source": [ "# Re-labeling/mapping.\n", "train_set = dataset_dict['train'].map(map_decision_to_string)\n", "val_set = dataset_dict['validation'].map(map_decision_to_string)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 17, "referenced_widgets": [ "0f7c9ea31868471e8c2fb500f3e94d36", "f2271bebba7a4b66a957592b6a37fe96", "9170e53e3fd5413bbdfb6bbfcf9e5ea4", "80a11ce4840b4d069f547199d0a2f14c", "9ef4cdd9ed0c4ac39c75c275377349d1", "81705e287b134db296c34db489fd0c1d", "bf4c054d189e4c3786f76346dc2ef138", "98d7b2bab8274fed86f3f83c564a8215", "82e2b3a8fa034bea9016e4eabb16e6ef", "9ea6087301b44528adef74bab6d6567d", "9733615affcb43cf93a99e2065e90272", "5f8c77503d57420496e7414250a89645", "bf8737fe179d4959ab16aa62d385e788", "e6344f27e5f24030bda964c65992c5cb", "de6999c57aac444c9a5b54ba17bacf83", "7e18799bb7224b7dbaf436e28033f7c5", "e26ec39e3ea444a2ab46b942e687c854", "969416d6ff094b7f96a1f41d34517ad3", "2269dc3ca919483384f41758a4693130", "154f44ca21c94f03b9400f059cf5110c", "0dba6fff23f74d84beca383ef467cce2", "f82901ca544f4fc496fd102a140758fc" ] }, "id": "7uH1FRQVyqf6", "outputId": "35405988-0acb-4c1b-bc24-c37836238a62" }, "execution_count": null, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "Map: 0%| | 0/16153 [00:00 BACKGROUND OF THE INVENTION A network interface device permits a subscriber to access a network. A passive optical network (PON) is an example of a network capable of delivering voice, video and other data among multiple network subscribers, using a common optical fiber link. Passive optical splitters and combiners enable multiple optical network terminals (ONTs) to share the optical fiber link. In a PON, each ONT terminates the optical fiber link for a residential or business subscriber, and is sometimes referred to as a subscriber premises node that delivers Fiber to the Premises (FTTP) services. An ONT is connected to one or more subscriber devices, such as televisions, set-top boxes, telephones, computers, or network appliances, which ultimately receive the voice, video and data delivered vii the PON. An ONT is an example of a network interface, device. Other examples of a network interface device, in different network types, include cable modems and digital subscriber line (DSL) boxes. Generally, a network also includes a network access interface. In a PON, the network access interface is sometimes referred to as an optical line terminator (OLT), having multiple, independent PON interface modules that serve multiple optical fiber links. A PON interface module provides an interface for transmission and reception of data packets over a particular optical fiber link that serves a group of ONTs. A PON is a downstream-multicast medium. Each packet transmitted on an optical fiber link can be received by every ONT served by that link. ONTs identify selected packets or frames on the fiber link based on addressing information included within the packets or frames. Network equipment, such as network interface devices, in a cable or hybrid network may be connected to power provided by a central office (CO), which commonly utilizes battery and generator back-up power to maintain a continuous power supply. In contrast, an ONT in an all-fiber optic network is ordinarily powered locally at the subscriber premises. For this reason, an ONT often includes a battery to provide backup power during a power outage to maintain critical services, such as voice service. Conventionally, the fibre of a PON typically terminates at a street cabinet to be shared by a number of subscriber equipment. The street cabinet houses an optical network terminal (ONT). The last few meters or kilometer from the street cabinet to a subscriber's home is typically bridged using existing twisted pair copper cables or radio links. The bandwidth resources of the fibre to the street cabinet are typically shared amongst a group of subscribers using an Ethernet switch. For example the fibre may extend to a street cabinet, a kerb outside a subscribers home, or directly into the subscribers home itself. Due to the bulkiness, size and complexity of the ONT cabinets are all factors that increase design difficulty and accrue additional costs. Also, the ONT itself is valuable, and its mounting on a wall, especially outside, makes it susceptible to theft or to being accidentally knocked down. Therefore, it would be desirable to have a compact optical network terminal to make passive optical networks seamlessly connected to regular computers and any other systems to overcome the above restrictions.\"],\n", " 'summary': [' SUMMARY OF THE INVENTION An aspect of the present invention is to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below. Accordingly, an aspect of the present invention is to provide a compact optical network terminal, comprising a first interface coupled to a communications network, a second interface coupled to a network client and a processor including a circuitry and a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network. Other aspects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention.'],\n", " 'description': [\"FIELD OF THE INVENTION The present invention relates to the field of passive optical network (PON), and in particular, to an optical network terminal (ONT) in the PON system. BACKGROUND OF THE INVENTION A network interface device permits a subscriber to access a network. A passive optical network (PON) is an example of a network capable of delivering voice, video and other data among multiple network subscribers, using a common optical fiber link. Passive optical splitters and combiners enable multiple optical network terminals (ONTs) to share the optical fiber link. In a PON, each ONT terminates the optical fiber link for a residential or business subscriber, and is sometimes referred to as a subscriber premises node that delivers Fiber to the Premises (FTTP) services. An ONT is connected to one or more subscriber devices, such as televisions, set-top boxes, telephones, computers, or network appliances, which ultimately receive the voice, video and data delivered vii the PON. An ONT is an example of a network interface, device. Other examples of a network interface device, in different network types, include cable modems and digital subscriber line (DSL) boxes. Generally, a network also includes a network access interface. In a PON, the network access interface is sometimes referred to as an optical line terminator (OLT), having multiple, independent PON interface modules that serve multiple optical fiber links. A PON interface module provides an interface for transmission and reception of data packets over a particular optical fiber link that serves a group of ONTs. A PON is a downstream-multicast medium. Each packet transmitted on an optical fiber link can be received by every ONT served by that link. ONTs identify selected packets or frames on the fiber link based on addressing information included within the packets or frames. Network equipment, such as network interface devices, in a cable or hybrid network may be connected to power provided by a central office (CO), which commonly utilizes battery and generator back-up power to maintain a continuous power supply. In contrast, an ONT in an all-fiber optic network is ordinarily powered locally at the subscriber premises. For this reason, an ONT often includes a battery to provide backup power during a power outage to maintain critical services, such as voice service. Conventionally, the fibre of a PON typically terminates at a street cabinet to be shared by a number of subscriber equipment. The street cabinet houses an optical network terminal (ONT). The last few meters or kilometer from the street cabinet to a subscriber's home is typically bridged using existing twisted pair copper cables or radio links. The bandwidth resources of the fibre to the street cabinet are typically shared amongst a group of subscribers using an Ethernet switch. For example the fibre may extend to a street cabinet, a kerb outside a subscribers home, or directly into the subscribers home itself. Due to the bulkiness, size and complexity of the ONT cabinets are all factors that increase design difficulty and accrue additional costs. Also, the ONT itself is valuable, and its mounting on a wall, especially outside, makes it susceptible to theft or to being accidentally knocked down. Therefore, it would be desirable to have a compact optical network terminal to make passive optical networks seamlessly connected to regular computers and any other systems to overcome the above restrictions. SUMMARY OF THE INVENTION An aspect of the present invention is to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below. Accordingly, an aspect of the present invention is to provide a compact optical network terminal, comprising a first interface coupled to a communications network, a second interface coupled to a network client and a processor including a circuitry and a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network. Other aspects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention. BRIEF DESCRIPTION OF THE DRAWINGS The above and other aspects, features, and advantages of certain exemplary embodiments of the present invention will be more apparent from the following description taken in conjunction with the accompanying drawings in which: FIG. 1A is a mechanical diagram of an optical network terminal (ONT) typical of customer premises equipment (CPE). FIG. 1B is a mechanical diagram of the ONT of FIG. 1A attached to a mounting bracket. FIG. 2 shows a typical Passive Optical Network (PON) Architecture. FIG. 3 shows a compatible optical network terminal (ONT) according to one embodiment of the present invention. FIG. 4 is a diagrammatic system view of a data processing system in which any of the embodiments disclosed herein may be performed. Persons skilled in the art will appreciate that elements in the figures are illustrated for simplicity and clarity and may have not been drawn to scale. For example, the dimensions of some of the elements in the figure may be exaggerated relative to other elements to help to improve understanding of various exemplary embodiments of the present disclosure. Throughout the drawings, it should be noted that like reference numbers are used to depict the same or similar elements, features, and structures. DETAIL DESCRIPTION OF THE INVENTION The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of exemplary embodiments of the invention as defined by the claims and their equivalents. It includes various specific details to assist in that understanding but′ these are to be regarded as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness. The terms and words used in the following description and claims are not limited to the bibliographical meanings, but, are merely used by the inventor to enable a clear and consistent understanding of the invention. Accordingly, it should be apparent to those skilled in the art that the following description of exemplary embodiments of the present invention are provided for illustration purpose only and not for the purpose of limiting the invention as defined by the appended claims and their equivalents. It is to be understood that the singular forms “a,” “an,” and “the” include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to “a component surface” includes reference to one or more of such surfaces. By the term “substantially” it is meant that the recited characteristic, parameter, or value need not be achieved exactly, but that deviations or variations, including for example, tolerances, measurement error, measurement accuracy limitations and other factors known to those of skill in the art, may occur in amounts that do not preclude the effect the characteristic was intended to provide. FIGS. 1 through 4, discussed below, and the various embodiments used to describe the principles of the present disclosure in this patent document are by way of illustration only and should not be construed in any way that would limit the scope of the disclosure. Those skilled in the art will understand that the principles of the present disclosure may be implemented in any suitably arranged communications system. The terms used to describe various embodiments are exemplary. It should be understood that these are provided to merely aid the understanding of the description, and that their use and definitions in no way limit the scope of the invention. Terms first, second, and the like are used to differentiate between objects having the same terminology and are in no way intended to represent a chronological order, unless where explicitly stated otherwise. A set is defined as a non-empty set including at least one element. FIG. 1A shows an optical network terminal (ONT) 100, which is an example of customer premises equipment (CPE), that connects a customer's communications equipment, e.g., computers, telephones, and televisions, to a telecommunications service provider. The ONT 100 includes an outer case 102 with an engagable cover 104 that covers a battery compartment (not shown) or another cavity of the ONT 100. A face 106 of the ONT 100 carries various connectors, including a power connector 108, coaxial cable connector 110, fiber optic cable connector 112, Ethernet (CAT-5) connector 114, and two telephone connectors 116. The ONT 100 transmits data to and receives data from a telecommunications network (not shown) via a fiber optic cable (not shown) connected to a fiber optic cable connector 112. Televisions, computers, and telephones on the customer's premises may be connected to the coaxial cable connector 110, Ethernet connector 114, and telephone connectors 116, respectively, on the ONT 100. FIG. 1B shows the ONT 100 of FIG. 1A with connector details with a bracket 120 attached to the outer case 102. The bracket 120 may be mounted to a wall (not shown), and the ONT 100 may be hung on the bracket. In many applications, the bracket 120 is installed on an exterior wall of a building or inside a garage, locations at which the ONT may be exposed to large temperature variations and different weather conditions. FIG. 2 shows a general Passive Optical Network (PON) Architecture. The elements of a PON are (i) Optical Line Terminal (OLT) 210 (ii) Passive Optical Splitter 220 and (iii) Optical Network Unit (ONU) 230. The Optical Line Terminal 210 is the main element of the network and is usually placed in the Local Exchange. It is a network element with PON line card, basically a aggregation switch. It works as an interface between core network and PON network. Optical Splitter 220 is a passive device with single input and multiple outputs. Optical power at input is split evenly between outputs. Not only signal travels from input to the outputs, signal can also travel from the output to the input. Splitters can be placed anywhere in between Central Office (CO) and Subscriber premises. It is used to connect an optical port of OLT with multiple subscribers. Optical Network units (ONUs) 230 serve as an interface to the network and are deployed at customer premises 240. It provides several interfaces for accessing triple play services and in the upper side it connects with the OLT via optical splitter. Although PONs can exist in three basic configuration (tree, bus and ring), the tree topology is favored due to smaller variation in the signal power from different end station. PON uses 1490 nm for the downstream wavelength and 1310 nm for the upstream wavelength. Signals are inserted or extracted from the fibre using a coarse wavelength division multiplexer (CWDM) filter at the CO and subscriber premises. FIG. 3 shows a compatible optical network terminal (ONT) according to one embodiment of the present invention. The optical network terminal (ONT) 300 includes a first interface 310, a second interface 320 and a middle region 330 sandwiched between the first and second interface. The first interface 310 coupled to a communications network 340, a second interface 320 coupled to a network client 350. The first interface is connected through a dedicated optical fiber link 360 (bi-directional) to receive optical signals from one or more communication network 340. The communication network may be or may include one or more but not limited to any of the xPON network 340 (e.g. of a broadband passive optical network (BPON), a gigabit-capable passive optical network (GPON), an Ethernet passive optical network (EPON), a gigabit-capable Ethernet passive optical network (GEPON), an active Ethernet optical network and any other future passive optical networks etc). The second interface 320 is coupled to the network client 350 though a USB port. In an operation, the middle region which may be a processor 330 including a memory (not shown in figure) coupled to the first interface 310 and to the second interface 320, wherein the processor 330 includes a circuitry which is configured for converting optical signals to electric signals, such that the network client can access the communications network. The first interface 310 may include an optical module (not shown in figure) which receives optical signals via the optical fiber link 360 and capable of converting the optical signals to electrical signals. The second interface 320 may include a control circuit (not shown in figure) which is capable of receiving the power from the network client 350 for processing the received electrical signals thereby reducing the required protocol processing time from the network client. Due to this behavior of the second interface 320 results in simplifying the ONT design by offloading the “non-volatile” part of the software to the network client 350 and downloading it on power to turn it. Most of the backend work can also be done by a software driver residing in the network client. Further, the second interface 320 acts as a network connectivity dongle with an optical transceiver at one end. Furthermore, the second interface may include a Universal Serial Bus (USB) jack which is couplable to Universal Serial Bus (USB) plug or connector of the network client 350. The second interface 320 capable of power up the “dongle” to connect it to the central office or Optical Line Terminal (OLT) by excluding external power source as required in the conventional design of ONT. In an example operation the Optical Network Terminal. (ONT) is connected to the network client through a USB port. Once the USB port of the network client 360 is coupled to the USB interface i.e. second interface 320, one or more driver needs to be installed at the network client 360 which then onwards controls the USB dongle (ONT) with the configured parameters at the installation time. The software boots up the USB dongle and communicates to network client 360 as a memory device with a built-in driver. The xPON protocol selected at the network client 360 will run and then converts the data coming from the WAN/LAN side to network client 360 as a network device. Once the software starts running in the network client 360, it would get connected to the OLT using the required xPON protocol. Once the network client 360 and the xPON network are connected, each network client 360 will have a dedicated connection (e.g. speed, bandwidth etc) as requested or selected by the client side. By this kind of novel and compatible design i.e. having xPON interface on one side and USB protocol interface on the other side will eradicate the necessity of the external power for the ONT. Also, by this kind of compatible design reduce the unnecessary splitting of equal upstream wavelength to all the network clients in the network. The network client may be or may include a host computer, a optical network unit, a optical network terminal or any other unit or terminal or device which is capable of accessing the passive optical network (xPON). FIG. 4 is a diagrammatic system view 400 of a data processing system in which any of the embodiments disclosed herein may be performed, according to one embodiment. Particularly, the diagrammatic system view of FIG. 4 illustrates a processor 402, a main memory 404, a static memory 406, a bus 408, a video display 410, an alpha-numeric input device 412, a cursor control device 414, a drive unit 416, a signal generation device 418, a network interface device 420, a machine readable medium 422, instructions 424 and a network 426. The diagrammatic system view 400 may indicate a personal computer and/or a data processing system in which one or more operations disclosed herein are performed. The processor 402 may be a microprocessor, a state machine, an application specific integrated circuit, a field programmable gate array; etc. (e.g., Intel® Pentium® processor). The main memory 404 may be a dynamic random access memory and/or a primary memory of a computer system. The static memory 406 may be a hard drive, a flash drive, and/or other memory information associated with the data processing system. The bus 408 may be an interconnection between various circuits and/or structures of the data processing system. The video display 410 may provide graphical representation of information on the data processing system. The alpha-numeric input device 412 may be a keypad, keyboard and/or any other input device of text (e.g., a special device to aid the physically handicapped). The cursor control device 414 may be a pointing device such as a mouse. The drive unit 416 may be a hard drive, a storage system, and/or other longer term storage subsystem. The signal generation device 418 may be a bios and/or a functional operating system of the data processing system. The network interface device 420 may perform interface functions (e.g., code conversion, protocol conversion, and/or buffering) required for communications to and from the network 426 between a number of independent devices (e.g., of varying protocols). The machine readable medium 422 may provide instructions on which any of the methods disclosed herein may be performed. The instructions 424 may provide source code and/or data code to the processor 402 to enable any one/or more operations disclosed herein. FIGS. 1-4 are merely representational and are not drawn to scale. Certain portions thereof may be exaggerated, while others may be minimized. FIGS. 1-4 illustrate various embodiments of the invention that can be understood and appropriately carried out by those of ordinary skill in the art. In the foregoing detailed description of embodiments of the invention, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive subject matter lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby incorporated into the detailed description of embodiments of the invention, with each claim standing on its own as a separate embodiment. It is understood that the above description is intended to be illustrative, and not restrictive. It is intended to cover all alternatives, modifications and equivalents as may be included within the spirit and scope of the invention as defined in the appended claims. Many other embodiments will be apparent to those of skill in the art upon reviewing the above description. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled. In the appended claims, the terms “including” and “in which” are used as the plain-English equivalents of the respective terms “comprising” and “wherein,” respectively.\"],\n", " 'cpc_label': ['H04Q110071'],\n", " 'ipc_label': ['H04Q1100'],\n", " 'filing_date': ['20160120'],\n", " 'patent_issue_date': ['20170606'],\n", " 'date_published': ['20160526'],\n", " 'examiner_id': ['95191.0']}" ] }, "metadata": {}, "execution_count": 112 } ] }, { "cell_type": "markdown", "source": [ "the abstract section of the patent applications" ], "metadata": { "id": "0S8N1KyZy4Gg" } }, { "cell_type": "code", "source": [ "# Focus on the abstract section and tokenize the text using the tokenizer.\n", "_SECTION_ = 'abstract'" ], "metadata": { "id": "DSQTi4POy31s" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "# Training set\n", "train_set = train_set.map(\n", " lambda e: tokenizer((e[_SECTION_]), truncation=True, padding='max_length'),\n", " batched=True)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 17, "referenced_widgets": [ "5e32c77feab1470585fb14010204a49f", "9958ec712ec8458396a7cdb01a534d24", "ed1993f5d5b542c99f0a2ae70a009494", "686e87549e39445ab31b7941bccbc296", "8cca8109b9554cdc9bd9fff42bbe1770", "a509fbab07e0498f86bca8608469f994", "eaa3ed6779a44b23872f8823603d1f88", "718143a8e62541929214b0bf57d2381e", "20643dba101b4ebea1ba47ed379b1195", "0835947919864f3190c3be1f89463eb6", "fc113406bb7f45deb77eb31ead37055c" ] }, "id": "wFNuWMLs0Kk7", "outputId": "3b9ac690-88a6-4efe-9b06-7e2b03a85694" }, "execution_count": null, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "Map: 0%| | 0/16153 [00:00 BACKGROUND OF THE INVENTION A network interface device permits a subscriber to access a network. A passive optical network (PON) is an example of a network capable of delivering voice, video and other data among multiple network subscribers, using a common optical fiber link. Passive optical splitters and combiners enable multiple optical network terminals (ONTs) to share the optical fiber link. In a PON, each ONT terminates the optical fiber link for a residential or business subscriber, and is sometimes referred to as a subscriber premises node that delivers Fiber to the Premises (FTTP) services. An ONT is connected to one or more subscriber devices, such as televisions, set-top boxes, telephones, computers, or network appliances, which ultimately receive the voice, video and data delivered vii the PON. An ONT is an example of a network interface, device. Other examples of a network interface device, in different network types, include cable modems and digital subscriber line (DSL) boxes. Generally, a network also includes a network access interface. In a PON, the network access interface is sometimes referred to as an optical line terminator (OLT), having multiple, independent PON interface modules that serve multiple optical fiber links. A PON interface module provides an interface for transmission and reception of data packets over a particular optical fiber link that serves a group of ONTs. A PON is a downstream-multicast medium. Each packet transmitted on an optical fiber link can be received by every ONT served by that link. ONTs identify selected packets or frames on the fiber link based on addressing information included within the packets or frames. Network equipment, such as network interface devices, in a cable or hybrid network may be connected to power provided by a central office (CO), which commonly utilizes battery and generator back-up power to maintain a continuous power supply. In contrast, an ONT in an all-fiber optic network is ordinarily powered locally at the subscriber premises. For this reason, an ONT often includes a battery to provide backup power during a power outage to maintain critical services, such as voice service. Conventionally, the fibre of a PON typically terminates at a street cabinet to be shared by a number of subscriber equipment. The street cabinet houses an optical network terminal (ONT). The last few meters or kilometer from the street cabinet to a subscriber's home is typically bridged using existing twisted pair copper cables or radio links. The bandwidth resources of the fibre to the street cabinet are typically shared amongst a group of subscribers using an Ethernet switch. For example the fibre may extend to a street cabinet, a kerb outside a subscribers home, or directly into the subscribers home itself. Due to the bulkiness, size and complexity of the ONT cabinets are all factors that increase design difficulty and accrue additional costs. Also, the ONT itself is valuable, and its mounting on a wall, especially outside, makes it susceptible to theft or to being accidentally knocked down. Therefore, it would be desirable to have a compact optical network terminal to make passive optical networks seamlessly connected to regular computers and any other systems to overcome the above restrictions.\"],\n", " 'summary': [' SUMMARY OF THE INVENTION An aspect of the present invention is to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below. Accordingly, an aspect of the present invention is to provide a compact optical network terminal, comprising a first interface coupled to a communications network, a second interface coupled to a network client and a processor including a circuitry and a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network. Other aspects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention.'],\n", " 'description': [\"FIELD OF THE INVENTION The present invention relates to the field of passive optical network (PON), and in particular, to an optical network terminal (ONT) in the PON system. BACKGROUND OF THE INVENTION A network interface device permits a subscriber to access a network. A passive optical network (PON) is an example of a network capable of delivering voice, video and other data among multiple network subscribers, using a common optical fiber link. Passive optical splitters and combiners enable multiple optical network terminals (ONTs) to share the optical fiber link. In a PON, each ONT terminates the optical fiber link for a residential or business subscriber, and is sometimes referred to as a subscriber premises node that delivers Fiber to the Premises (FTTP) services. An ONT is connected to one or more subscriber devices, such as televisions, set-top boxes, telephones, computers, or network appliances, which ultimately receive the voice, video and data delivered vii the PON. An ONT is an example of a network interface, device. Other examples of a network interface device, in different network types, include cable modems and digital subscriber line (DSL) boxes. Generally, a network also includes a network access interface. In a PON, the network access interface is sometimes referred to as an optical line terminator (OLT), having multiple, independent PON interface modules that serve multiple optical fiber links. A PON interface module provides an interface for transmission and reception of data packets over a particular optical fiber link that serves a group of ONTs. A PON is a downstream-multicast medium. Each packet transmitted on an optical fiber link can be received by every ONT served by that link. ONTs identify selected packets or frames on the fiber link based on addressing information included within the packets or frames. Network equipment, such as network interface devices, in a cable or hybrid network may be connected to power provided by a central office (CO), which commonly utilizes battery and generator back-up power to maintain a continuous power supply. In contrast, an ONT in an all-fiber optic network is ordinarily powered locally at the subscriber premises. For this reason, an ONT often includes a battery to provide backup power during a power outage to maintain critical services, such as voice service. Conventionally, the fibre of a PON typically terminates at a street cabinet to be shared by a number of subscriber equipment. The street cabinet houses an optical network terminal (ONT). The last few meters or kilometer from the street cabinet to a subscriber's home is typically bridged using existing twisted pair copper cables or radio links. The bandwidth resources of the fibre to the street cabinet are typically shared amongst a group of subscribers using an Ethernet switch. For example the fibre may extend to a street cabinet, a kerb outside a subscribers home, or directly into the subscribers home itself. Due to the bulkiness, size and complexity of the ONT cabinets are all factors that increase design difficulty and accrue additional costs. Also, the ONT itself is valuable, and its mounting on a wall, especially outside, makes it susceptible to theft or to being accidentally knocked down. Therefore, it would be desirable to have a compact optical network terminal to make passive optical networks seamlessly connected to regular computers and any other systems to overcome the above restrictions. SUMMARY OF THE INVENTION An aspect of the present invention is to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below. Accordingly, an aspect of the present invention is to provide a compact optical network terminal, comprising a first interface coupled to a communications network, a second interface coupled to a network client and a processor including a circuitry and a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network. Other aspects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention. BRIEF DESCRIPTION OF THE DRAWINGS The above and other aspects, features, and advantages of certain exemplary embodiments of the present invention will be more apparent from the following description taken in conjunction with the accompanying drawings in which: FIG. 1A is a mechanical diagram of an optical network terminal (ONT) typical of customer premises equipment (CPE). FIG. 1B is a mechanical diagram of the ONT of FIG. 1A attached to a mounting bracket. FIG. 2 shows a typical Passive Optical Network (PON) Architecture. FIG. 3 shows a compatible optical network terminal (ONT) according to one embodiment of the present invention. FIG. 4 is a diagrammatic system view of a data processing system in which any of the embodiments disclosed herein may be performed. Persons skilled in the art will appreciate that elements in the figures are illustrated for simplicity and clarity and may have not been drawn to scale. For example, the dimensions of some of the elements in the figure may be exaggerated relative to other elements to help to improve understanding of various exemplary embodiments of the present disclosure. Throughout the drawings, it should be noted that like reference numbers are used to depict the same or similar elements, features, and structures. DETAIL DESCRIPTION OF THE INVENTION The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of exemplary embodiments of the invention as defined by the claims and their equivalents. It includes various specific details to assist in that understanding but′ these are to be regarded as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness. The terms and words used in the following description and claims are not limited to the bibliographical meanings, but, are merely used by the inventor to enable a clear and consistent understanding of the invention. Accordingly, it should be apparent to those skilled in the art that the following description of exemplary embodiments of the present invention are provided for illustration purpose only and not for the purpose of limiting the invention as defined by the appended claims and their equivalents. It is to be understood that the singular forms “a,” “an,” and “the” include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to “a component surface” includes reference to one or more of such surfaces. By the term “substantially” it is meant that the recited characteristic, parameter, or value need not be achieved exactly, but that deviations or variations, including for example, tolerances, measurement error, measurement accuracy limitations and other factors known to those of skill in the art, may occur in amounts that do not preclude the effect the characteristic was intended to provide. FIGS. 1 through 4, discussed below, and the various embodiments used to describe the principles of the present disclosure in this patent document are by way of illustration only and should not be construed in any way that would limit the scope of the disclosure. Those skilled in the art will understand that the principles of the present disclosure may be implemented in any suitably arranged communications system. The terms used to describe various embodiments are exemplary. It should be understood that these are provided to merely aid the understanding of the description, and that their use and definitions in no way limit the scope of the invention. Terms first, second, and the like are used to differentiate between objects having the same terminology and are in no way intended to represent a chronological order, unless where explicitly stated otherwise. A set is defined as a non-empty set including at least one element. FIG. 1A shows an optical network terminal (ONT) 100, which is an example of customer premises equipment (CPE), that connects a customer's communications equipment, e.g., computers, telephones, and televisions, to a telecommunications service provider. The ONT 100 includes an outer case 102 with an engagable cover 104 that covers a battery compartment (not shown) or another cavity of the ONT 100. A face 106 of the ONT 100 carries various connectors, including a power connector 108, coaxial cable connector 110, fiber optic cable connector 112, Ethernet (CAT-5) connector 114, and two telephone connectors 116. The ONT 100 transmits data to and receives data from a telecommunications network (not shown) via a fiber optic cable (not shown) connected to a fiber optic cable connector 112. Televisions, computers, and telephones on the customer's premises may be connected to the coaxial cable connector 110, Ethernet connector 114, and telephone connectors 116, respectively, on the ONT 100. FIG. 1B shows the ONT 100 of FIG. 1A with connector details with a bracket 120 attached to the outer case 102. The bracket 120 may be mounted to a wall (not shown), and the ONT 100 may be hung on the bracket. In many applications, the bracket 120 is installed on an exterior wall of a building or inside a garage, locations at which the ONT may be exposed to large temperature variations and different weather conditions. FIG. 2 shows a general Passive Optical Network (PON) Architecture. The elements of a PON are (i) Optical Line Terminal (OLT) 210 (ii) Passive Optical Splitter 220 and (iii) Optical Network Unit (ONU) 230. The Optical Line Terminal 210 is the main element of the network and is usually placed in the Local Exchange. It is a network element with PON line card, basically a aggregation switch. It works as an interface between core network and PON network. Optical Splitter 220 is a passive device with single input and multiple outputs. Optical power at input is split evenly between outputs. Not only signal travels from input to the outputs, signal can also travel from the output to the input. Splitters can be placed anywhere in between Central Office (CO) and Subscriber premises. It is used to connect an optical port of OLT with multiple subscribers. Optical Network units (ONUs) 230 serve as an interface to the network and are deployed at customer premises 240. It provides several interfaces for accessing triple play services and in the upper side it connects with the OLT via optical splitter. Although PONs can exist in three basic configuration (tree, bus and ring), the tree topology is favored due to smaller variation in the signal power from different end station. PON uses 1490 nm for the downstream wavelength and 1310 nm for the upstream wavelength. Signals are inserted or extracted from the fibre using a coarse wavelength division multiplexer (CWDM) filter at the CO and subscriber premises. FIG. 3 shows a compatible optical network terminal (ONT) according to one embodiment of the present invention. The optical network terminal (ONT) 300 includes a first interface 310, a second interface 320 and a middle region 330 sandwiched between the first and second interface. The first interface 310 coupled to a communications network 340, a second interface 320 coupled to a network client 350. The first interface is connected through a dedicated optical fiber link 360 (bi-directional) to receive optical signals from one or more communication network 340. The communication network may be or may include one or more but not limited to any of the xPON network 340 (e.g. of a broadband passive optical network (BPON), a gigabit-capable passive optical network (GPON), an Ethernet passive optical network (EPON), a gigabit-capable Ethernet passive optical network (GEPON), an active Ethernet optical network and any other future passive optical networks etc). The second interface 320 is coupled to the network client 350 though a USB port. In an operation, the middle region which may be a processor 330 including a memory (not shown in figure) coupled to the first interface 310 and to the second interface 320, wherein the processor 330 includes a circuitry which is configured for converting optical signals to electric signals, such that the network client can access the communications network. The first interface 310 may include an optical module (not shown in figure) which receives optical signals via the optical fiber link 360 and capable of converting the optical signals to electrical signals. The second interface 320 may include a control circuit (not shown in figure) which is capable of receiving the power from the network client 350 for processing the received electrical signals thereby reducing the required protocol processing time from the network client. Due to this behavior of the second interface 320 results in simplifying the ONT design by offloading the “non-volatile” part of the software to the network client 350 and downloading it on power to turn it. Most of the backend work can also be done by a software driver residing in the network client. Further, the second interface 320 acts as a network connectivity dongle with an optical transceiver at one end. Furthermore, the second interface may include a Universal Serial Bus (USB) jack which is couplable to Universal Serial Bus (USB) plug or connector of the network client 350. The second interface 320 capable of power up the “dongle” to connect it to the central office or Optical Line Terminal (OLT) by excluding external power source as required in the conventional design of ONT. In an example operation the Optical Network Terminal. (ONT) is connected to the network client through a USB port. Once the USB port of the network client 360 is coupled to the USB interface i.e. second interface 320, one or more driver needs to be installed at the network client 360 which then onwards controls the USB dongle (ONT) with the configured parameters at the installation time. The software boots up the USB dongle and communicates to network client 360 as a memory device with a built-in driver. The xPON protocol selected at the network client 360 will run and then converts the data coming from the WAN/LAN side to network client 360 as a network device. Once the software starts running in the network client 360, it would get connected to the OLT using the required xPON protocol. Once the network client 360 and the xPON network are connected, each network client 360 will have a dedicated connection (e.g. speed, bandwidth etc) as requested or selected by the client side. By this kind of novel and compatible design i.e. having xPON interface on one side and USB protocol interface on the other side will eradicate the necessity of the external power for the ONT. Also, by this kind of compatible design reduce the unnecessary splitting of equal upstream wavelength to all the network clients in the network. The network client may be or may include a host computer, a optical network unit, a optical network terminal or any other unit or terminal or device which is capable of accessing the passive optical network (xPON). FIG. 4 is a diagrammatic system view 400 of a data processing system in which any of the embodiments disclosed herein may be performed, according to one embodiment. Particularly, the diagrammatic system view of FIG. 4 illustrates a processor 402, a main memory 404, a static memory 406, a bus 408, a video display 410, an alpha-numeric input device 412, a cursor control device 414, a drive unit 416, a signal generation device 418, a network interface device 420, a machine readable medium 422, instructions 424 and a network 426. The diagrammatic system view 400 may indicate a personal computer and/or a data processing system in which one or more operations disclosed herein are performed. The processor 402 may be a microprocessor, a state machine, an application specific integrated circuit, a field programmable gate array; etc. (e.g., Intel® Pentium® processor). The main memory 404 may be a dynamic random access memory and/or a primary memory of a computer system. The static memory 406 may be a hard drive, a flash drive, and/or other memory information associated with the data processing system. The bus 408 may be an interconnection between various circuits and/or structures of the data processing system. The video display 410 may provide graphical representation of information on the data processing system. The alpha-numeric input device 412 may be a keypad, keyboard and/or any other input device of text (e.g., a special device to aid the physically handicapped). The cursor control device 414 may be a pointing device such as a mouse. The drive unit 416 may be a hard drive, a storage system, and/or other longer term storage subsystem. The signal generation device 418 may be a bios and/or a functional operating system of the data processing system. The network interface device 420 may perform interface functions (e.g., code conversion, protocol conversion, and/or buffering) required for communications to and from the network 426 between a number of independent devices (e.g., of varying protocols). The machine readable medium 422 may provide instructions on which any of the methods disclosed herein may be performed. The instructions 424 may provide source code and/or data code to the processor 402 to enable any one/or more operations disclosed herein. FIGS. 1-4 are merely representational and are not drawn to scale. Certain portions thereof may be exaggerated, while others may be minimized. FIGS. 1-4 illustrate various embodiments of the invention that can be understood and appropriately carried out by those of ordinary skill in the art. In the foregoing detailed description of embodiments of the invention, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive subject matter lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby incorporated into the detailed description of embodiments of the invention, with each claim standing on its own as a separate embodiment. It is understood that the above description is intended to be illustrative, and not restrictive. It is intended to cover all alternatives, modifications and equivalents as may be included within the spirit and scope of the invention as defined in the appended claims. Many other embodiments will be apparent to those of skill in the art upon reviewing the above description. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled. In the appended claims, the terms “including” and “in which” are used as the plain-English equivalents of the respective terms “comprising” and “wherein,” respectively.\"],\n", " 'cpc_label': ['H04Q110071'],\n", " 'ipc_label': ['H04Q1100'],\n", " 'filing_date': ['20160120'],\n", " 'patent_issue_date': ['20170606'],\n", " 'date_published': ['20160526'],\n", " 'examiner_id': ['95191.0'],\n", " 'input_ids': [[101,\n", " 1996,\n", " 2556,\n", " 11028,\n", " 14623,\n", " 2000,\n", " 13135,\n", " 9380,\n", " 2897,\n", " 1006,\n", " 13433,\n", " 2078,\n", " 1007,\n", " 1010,\n", " 1998,\n", " 1999,\n", " 3327,\n", " 1010,\n", " 2000,\n", " 2019,\n", " 9380,\n", " 2897,\n", " 5536,\n", " 1006,\n", " 2006,\n", " 2102,\n", " 1007,\n", " 1999,\n", " 1996,\n", " 13433,\n", " 2078,\n", " 2291,\n", " 1012,\n", " 1999,\n", " 2028,\n", " 7861,\n", " 5092,\n", " 21341,\n", " 1010,\n", " 1996,\n", " 9380,\n", " 2897,\n", " 5536,\n", " 2950,\n", " 1037,\n", " 2034,\n", " 8278,\n", " 11211,\n", " 2000,\n", " 1037,\n", " 4806,\n", " 2897,\n", " 1010,\n", " 1037,\n", " 2117,\n", " 8278,\n", " 11211,\n", " 2000,\n", " 1037,\n", " 2897,\n", " 7396,\n", " 1998,\n", " 1037,\n", " 13151,\n", " 2164,\n", " 1037,\n", " 3638,\n", " 11211,\n", " 2000,\n", " 1996,\n", " 2034,\n", " 8278,\n", " 1998,\n", " 2000,\n", " 1996,\n", " 2117,\n", " 8278,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 13151,\n", " 2003,\n", " 5214,\n", " 1997,\n", " 16401,\n", " 9380,\n", " 7755,\n", " 2000,\n", " 3751,\n", " 7755,\n", " 1010,\n", " 2107,\n", " 2008,\n", " 1996,\n", " 2897,\n", " 7396,\n", " 2064,\n", " 3229,\n", " 1996,\n", " 4806,\n", " 2897,\n", " 1012,\n", " 102,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0]],\n", " 'attention_mask': [[1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0]]}" ] }, "metadata": {}, "execution_count": 116 } ] }, { "cell_type": "markdown", "source": [ "the claims section of the patent applications" ], "metadata": { "id": "anpCrdUr9_0_" } }, { "cell_type": "code", "source": [ "# Focus on the abstract section and tokenize the text using the tokenizer.\n", "_SECTION1_ = 'claims'" ], "metadata": { "id": "vIN41V3X-Boh" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "# Training set\n", "train_set = train_set.map(\n", " lambda e: tokenizer((e[_SECTION1_]), truncation=True, padding='max_length'),\n", " batched=True)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 17, "referenced_widgets": [ "393556bf61f14caa90331c5459a96eef", "eddf0d65dcf74b7cbe35acdf94f666e2", "95d7df38d5e247df9289dc5942709103", "ccd49b1779e14760a510acd5b5f6e20e", "fac2066450c645f690a6518e9db2bc35", "d64e4b0c63e546e28ef240f5950ba70e", "a1df1e5acb7240978b0a88c18a118ef9", "c954881446104f0684e6baa44dd5a65b", "9ee1f579fcdb45e9949f5d078ab4a294", "7d1ad0ce662146f38cae6f5ab1b0ea42", "7a4643b94d034d8586dfbe5ebd1dfd7b" ] }, "id": "JOvF2Egv-GAp", "outputId": "bf07e6a0-7844-4738-e4e0-f40df9ef056a" }, "execution_count": null, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "Map: 0%| | 0/16153 [00:00 BACKGROUND OF THE INVENTION A network interface device permits a subscriber to access a network. A passive optical network (PON) is an example of a network capable of delivering voice, video and other data among multiple network subscribers, using a common optical fiber link. Passive optical splitters and combiners enable multiple optical network terminals (ONTs) to share the optical fiber link. In a PON, each ONT terminates the optical fiber link for a residential or business subscriber, and is sometimes referred to as a subscriber premises node that delivers Fiber to the Premises (FTTP) services. An ONT is connected to one or more subscriber devices, such as televisions, set-top boxes, telephones, computers, or network appliances, which ultimately receive the voice, video and data delivered vii the PON. An ONT is an example of a network interface, device. Other examples of a network interface device, in different network types, include cable modems and digital subscriber line (DSL) boxes. Generally, a network also includes a network access interface. In a PON, the network access interface is sometimes referred to as an optical line terminator (OLT), having multiple, independent PON interface modules that serve multiple optical fiber links. A PON interface module provides an interface for transmission and reception of data packets over a particular optical fiber link that serves a group of ONTs. A PON is a downstream-multicast medium. Each packet transmitted on an optical fiber link can be received by every ONT served by that link. ONTs identify selected packets or frames on the fiber link based on addressing information included within the packets or frames. Network equipment, such as network interface devices, in a cable or hybrid network may be connected to power provided by a central office (CO), which commonly utilizes battery and generator back-up power to maintain a continuous power supply. In contrast, an ONT in an all-fiber optic network is ordinarily powered locally at the subscriber premises. For this reason, an ONT often includes a battery to provide backup power during a power outage to maintain critical services, such as voice service. Conventionally, the fibre of a PON typically terminates at a street cabinet to be shared by a number of subscriber equipment. The street cabinet houses an optical network terminal (ONT). The last few meters or kilometer from the street cabinet to a subscriber's home is typically bridged using existing twisted pair copper cables or radio links. The bandwidth resources of the fibre to the street cabinet are typically shared amongst a group of subscribers using an Ethernet switch. For example the fibre may extend to a street cabinet, a kerb outside a subscribers home, or directly into the subscribers home itself. Due to the bulkiness, size and complexity of the ONT cabinets are all factors that increase design difficulty and accrue additional costs. Also, the ONT itself is valuable, and its mounting on a wall, especially outside, makes it susceptible to theft or to being accidentally knocked down. Therefore, it would be desirable to have a compact optical network terminal to make passive optical networks seamlessly connected to regular computers and any other systems to overcome the above restrictions.\"],\n", " 'summary': [' SUMMARY OF THE INVENTION An aspect of the present invention is to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below. Accordingly, an aspect of the present invention is to provide a compact optical network terminal, comprising a first interface coupled to a communications network, a second interface coupled to a network client and a processor including a circuitry and a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network. Other aspects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention.'],\n", " 'description': [\"FIELD OF THE INVENTION The present invention relates to the field of passive optical network (PON), and in particular, to an optical network terminal (ONT) in the PON system. BACKGROUND OF THE INVENTION A network interface device permits a subscriber to access a network. A passive optical network (PON) is an example of a network capable of delivering voice, video and other data among multiple network subscribers, using a common optical fiber link. Passive optical splitters and combiners enable multiple optical network terminals (ONTs) to share the optical fiber link. In a PON, each ONT terminates the optical fiber link for a residential or business subscriber, and is sometimes referred to as a subscriber premises node that delivers Fiber to the Premises (FTTP) services. An ONT is connected to one or more subscriber devices, such as televisions, set-top boxes, telephones, computers, or network appliances, which ultimately receive the voice, video and data delivered vii the PON. An ONT is an example of a network interface, device. Other examples of a network interface device, in different network types, include cable modems and digital subscriber line (DSL) boxes. Generally, a network also includes a network access interface. In a PON, the network access interface is sometimes referred to as an optical line terminator (OLT), having multiple, independent PON interface modules that serve multiple optical fiber links. A PON interface module provides an interface for transmission and reception of data packets over a particular optical fiber link that serves a group of ONTs. A PON is a downstream-multicast medium. Each packet transmitted on an optical fiber link can be received by every ONT served by that link. ONTs identify selected packets or frames on the fiber link based on addressing information included within the packets or frames. Network equipment, such as network interface devices, in a cable or hybrid network may be connected to power provided by a central office (CO), which commonly utilizes battery and generator back-up power to maintain a continuous power supply. In contrast, an ONT in an all-fiber optic network is ordinarily powered locally at the subscriber premises. For this reason, an ONT often includes a battery to provide backup power during a power outage to maintain critical services, such as voice service. Conventionally, the fibre of a PON typically terminates at a street cabinet to be shared by a number of subscriber equipment. The street cabinet houses an optical network terminal (ONT). The last few meters or kilometer from the street cabinet to a subscriber's home is typically bridged using existing twisted pair copper cables or radio links. The bandwidth resources of the fibre to the street cabinet are typically shared amongst a group of subscribers using an Ethernet switch. For example the fibre may extend to a street cabinet, a kerb outside a subscribers home, or directly into the subscribers home itself. Due to the bulkiness, size and complexity of the ONT cabinets are all factors that increase design difficulty and accrue additional costs. Also, the ONT itself is valuable, and its mounting on a wall, especially outside, makes it susceptible to theft or to being accidentally knocked down. Therefore, it would be desirable to have a compact optical network terminal to make passive optical networks seamlessly connected to regular computers and any other systems to overcome the above restrictions. SUMMARY OF THE INVENTION An aspect of the present invention is to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below. Accordingly, an aspect of the present invention is to provide a compact optical network terminal, comprising a first interface coupled to a communications network, a second interface coupled to a network client and a processor including a circuitry and a memory coupled to the first interface and to the second interface, wherein the processor is capable of converting optical signals to electric signals, such that the network client can access the communications network. Other aspects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention. BRIEF DESCRIPTION OF THE DRAWINGS The above and other aspects, features, and advantages of certain exemplary embodiments of the present invention will be more apparent from the following description taken in conjunction with the accompanying drawings in which: FIG. 1A is a mechanical diagram of an optical network terminal (ONT) typical of customer premises equipment (CPE). FIG. 1B is a mechanical diagram of the ONT of FIG. 1A attached to a mounting bracket. FIG. 2 shows a typical Passive Optical Network (PON) Architecture. FIG. 3 shows a compatible optical network terminal (ONT) according to one embodiment of the present invention. FIG. 4 is a diagrammatic system view of a data processing system in which any of the embodiments disclosed herein may be performed. Persons skilled in the art will appreciate that elements in the figures are illustrated for simplicity and clarity and may have not been drawn to scale. For example, the dimensions of some of the elements in the figure may be exaggerated relative to other elements to help to improve understanding of various exemplary embodiments of the present disclosure. Throughout the drawings, it should be noted that like reference numbers are used to depict the same or similar elements, features, and structures. DETAIL DESCRIPTION OF THE INVENTION The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of exemplary embodiments of the invention as defined by the claims and their equivalents. It includes various specific details to assist in that understanding but′ these are to be regarded as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness. The terms and words used in the following description and claims are not limited to the bibliographical meanings, but, are merely used by the inventor to enable a clear and consistent understanding of the invention. Accordingly, it should be apparent to those skilled in the art that the following description of exemplary embodiments of the present invention are provided for illustration purpose only and not for the purpose of limiting the invention as defined by the appended claims and their equivalents. It is to be understood that the singular forms “a,” “an,” and “the” include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to “a component surface” includes reference to one or more of such surfaces. By the term “substantially” it is meant that the recited characteristic, parameter, or value need not be achieved exactly, but that deviations or variations, including for example, tolerances, measurement error, measurement accuracy limitations and other factors known to those of skill in the art, may occur in amounts that do not preclude the effect the characteristic was intended to provide. FIGS. 1 through 4, discussed below, and the various embodiments used to describe the principles of the present disclosure in this patent document are by way of illustration only and should not be construed in any way that would limit the scope of the disclosure. Those skilled in the art will understand that the principles of the present disclosure may be implemented in any suitably arranged communications system. The terms used to describe various embodiments are exemplary. It should be understood that these are provided to merely aid the understanding of the description, and that their use and definitions in no way limit the scope of the invention. Terms first, second, and the like are used to differentiate between objects having the same terminology and are in no way intended to represent a chronological order, unless where explicitly stated otherwise. A set is defined as a non-empty set including at least one element. FIG. 1A shows an optical network terminal (ONT) 100, which is an example of customer premises equipment (CPE), that connects a customer's communications equipment, e.g., computers, telephones, and televisions, to a telecommunications service provider. The ONT 100 includes an outer case 102 with an engagable cover 104 that covers a battery compartment (not shown) or another cavity of the ONT 100. A face 106 of the ONT 100 carries various connectors, including a power connector 108, coaxial cable connector 110, fiber optic cable connector 112, Ethernet (CAT-5) connector 114, and two telephone connectors 116. The ONT 100 transmits data to and receives data from a telecommunications network (not shown) via a fiber optic cable (not shown) connected to a fiber optic cable connector 112. Televisions, computers, and telephones on the customer's premises may be connected to the coaxial cable connector 110, Ethernet connector 114, and telephone connectors 116, respectively, on the ONT 100. FIG. 1B shows the ONT 100 of FIG. 1A with connector details with a bracket 120 attached to the outer case 102. The bracket 120 may be mounted to a wall (not shown), and the ONT 100 may be hung on the bracket. In many applications, the bracket 120 is installed on an exterior wall of a building or inside a garage, locations at which the ONT may be exposed to large temperature variations and different weather conditions. FIG. 2 shows a general Passive Optical Network (PON) Architecture. The elements of a PON are (i) Optical Line Terminal (OLT) 210 (ii) Passive Optical Splitter 220 and (iii) Optical Network Unit (ONU) 230. The Optical Line Terminal 210 is the main element of the network and is usually placed in the Local Exchange. It is a network element with PON line card, basically a aggregation switch. It works as an interface between core network and PON network. Optical Splitter 220 is a passive device with single input and multiple outputs. Optical power at input is split evenly between outputs. Not only signal travels from input to the outputs, signal can also travel from the output to the input. Splitters can be placed anywhere in between Central Office (CO) and Subscriber premises. It is used to connect an optical port of OLT with multiple subscribers. Optical Network units (ONUs) 230 serve as an interface to the network and are deployed at customer premises 240. It provides several interfaces for accessing triple play services and in the upper side it connects with the OLT via optical splitter. Although PONs can exist in three basic configuration (tree, bus and ring), the tree topology is favored due to smaller variation in the signal power from different end station. PON uses 1490 nm for the downstream wavelength and 1310 nm for the upstream wavelength. Signals are inserted or extracted from the fibre using a coarse wavelength division multiplexer (CWDM) filter at the CO and subscriber premises. FIG. 3 shows a compatible optical network terminal (ONT) according to one embodiment of the present invention. The optical network terminal (ONT) 300 includes a first interface 310, a second interface 320 and a middle region 330 sandwiched between the first and second interface. The first interface 310 coupled to a communications network 340, a second interface 320 coupled to a network client 350. The first interface is connected through a dedicated optical fiber link 360 (bi-directional) to receive optical signals from one or more communication network 340. The communication network may be or may include one or more but not limited to any of the xPON network 340 (e.g. of a broadband passive optical network (BPON), a gigabit-capable passive optical network (GPON), an Ethernet passive optical network (EPON), a gigabit-capable Ethernet passive optical network (GEPON), an active Ethernet optical network and any other future passive optical networks etc). The second interface 320 is coupled to the network client 350 though a USB port. In an operation, the middle region which may be a processor 330 including a memory (not shown in figure) coupled to the first interface 310 and to the second interface 320, wherein the processor 330 includes a circuitry which is configured for converting optical signals to electric signals, such that the network client can access the communications network. The first interface 310 may include an optical module (not shown in figure) which receives optical signals via the optical fiber link 360 and capable of converting the optical signals to electrical signals. The second interface 320 may include a control circuit (not shown in figure) which is capable of receiving the power from the network client 350 for processing the received electrical signals thereby reducing the required protocol processing time from the network client. Due to this behavior of the second interface 320 results in simplifying the ONT design by offloading the “non-volatile” part of the software to the network client 350 and downloading it on power to turn it. Most of the backend work can also be done by a software driver residing in the network client. Further, the second interface 320 acts as a network connectivity dongle with an optical transceiver at one end. Furthermore, the second interface may include a Universal Serial Bus (USB) jack which is couplable to Universal Serial Bus (USB) plug or connector of the network client 350. The second interface 320 capable of power up the “dongle” to connect it to the central office or Optical Line Terminal (OLT) by excluding external power source as required in the conventional design of ONT. In an example operation the Optical Network Terminal. (ONT) is connected to the network client through a USB port. Once the USB port of the network client 360 is coupled to the USB interface i.e. second interface 320, one or more driver needs to be installed at the network client 360 which then onwards controls the USB dongle (ONT) with the configured parameters at the installation time. The software boots up the USB dongle and communicates to network client 360 as a memory device with a built-in driver. The xPON protocol selected at the network client 360 will run and then converts the data coming from the WAN/LAN side to network client 360 as a network device. Once the software starts running in the network client 360, it would get connected to the OLT using the required xPON protocol. Once the network client 360 and the xPON network are connected, each network client 360 will have a dedicated connection (e.g. speed, bandwidth etc) as requested or selected by the client side. By this kind of novel and compatible design i.e. having xPON interface on one side and USB protocol interface on the other side will eradicate the necessity of the external power for the ONT. Also, by this kind of compatible design reduce the unnecessary splitting of equal upstream wavelength to all the network clients in the network. The network client may be or may include a host computer, a optical network unit, a optical network terminal or any other unit or terminal or device which is capable of accessing the passive optical network (xPON). FIG. 4 is a diagrammatic system view 400 of a data processing system in which any of the embodiments disclosed herein may be performed, according to one embodiment. Particularly, the diagrammatic system view of FIG. 4 illustrates a processor 402, a main memory 404, a static memory 406, a bus 408, a video display 410, an alpha-numeric input device 412, a cursor control device 414, a drive unit 416, a signal generation device 418, a network interface device 420, a machine readable medium 422, instructions 424 and a network 426. The diagrammatic system view 400 may indicate a personal computer and/or a data processing system in which one or more operations disclosed herein are performed. The processor 402 may be a microprocessor, a state machine, an application specific integrated circuit, a field programmable gate array; etc. (e.g., Intel® Pentium® processor). The main memory 404 may be a dynamic random access memory and/or a primary memory of a computer system. The static memory 406 may be a hard drive, a flash drive, and/or other memory information associated with the data processing system. The bus 408 may be an interconnection between various circuits and/or structures of the data processing system. The video display 410 may provide graphical representation of information on the data processing system. The alpha-numeric input device 412 may be a keypad, keyboard and/or any other input device of text (e.g., a special device to aid the physically handicapped). The cursor control device 414 may be a pointing device such as a mouse. The drive unit 416 may be a hard drive, a storage system, and/or other longer term storage subsystem. The signal generation device 418 may be a bios and/or a functional operating system of the data processing system. The network interface device 420 may perform interface functions (e.g., code conversion, protocol conversion, and/or buffering) required for communications to and from the network 426 between a number of independent devices (e.g., of varying protocols). The machine readable medium 422 may provide instructions on which any of the methods disclosed herein may be performed. The instructions 424 may provide source code and/or data code to the processor 402 to enable any one/or more operations disclosed herein. FIGS. 1-4 are merely representational and are not drawn to scale. Certain portions thereof may be exaggerated, while others may be minimized. FIGS. 1-4 illustrate various embodiments of the invention that can be understood and appropriately carried out by those of ordinary skill in the art. In the foregoing detailed description of embodiments of the invention, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive subject matter lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby incorporated into the detailed description of embodiments of the invention, with each claim standing on its own as a separate embodiment. It is understood that the above description is intended to be illustrative, and not restrictive. It is intended to cover all alternatives, modifications and equivalents as may be included within the spirit and scope of the invention as defined in the appended claims. Many other embodiments will be apparent to those of skill in the art upon reviewing the above description. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled. In the appended claims, the terms “including” and “in which” are used as the plain-English equivalents of the respective terms “comprising” and “wherein,” respectively.\"],\n", " 'cpc_label': ['H04Q110071'],\n", " 'ipc_label': ['H04Q1100'],\n", " 'filing_date': ['20160120'],\n", " 'patent_issue_date': ['20170606'],\n", " 'date_published': ['20160526'],\n", " 'examiner_id': ['95191.0'],\n", " 'input_ids': [[101,\n", " 1015,\n", " 1012,\n", " 1037,\n", " 9233,\n", " 9380,\n", " 2897,\n", " 5536,\n", " 1010,\n", " 9605,\n", " 1024,\n", " 1037,\n", " 2034,\n", " 8278,\n", " 11211,\n", " 2000,\n", " 1037,\n", " 4806,\n", " 2897,\n", " 1025,\n", " 1037,\n", " 2117,\n", " 8278,\n", " 11211,\n", " 2000,\n", " 1037,\n", " 2897,\n", " 7396,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 2117,\n", " 8278,\n", " 2003,\n", " 1037,\n", " 2897,\n", " 20831,\n", " 11947,\n", " 2571,\n", " 2007,\n", " 2019,\n", " 9380,\n", " 9099,\n", " 3401,\n", " 16402,\n", " 2012,\n", " 2028,\n", " 2203,\n", " 1025,\n", " 1998,\n", " 1037,\n", " 13151,\n", " 2164,\n", " 1037,\n", " 4984,\n", " 2854,\n", " 1998,\n", " 1037,\n", " 3638,\n", " 11211,\n", " 2000,\n", " 1996,\n", " 2034,\n", " 8278,\n", " 1998,\n", " 2000,\n", " 1996,\n", " 2117,\n", " 8278,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 13151,\n", " 2003,\n", " 5214,\n", " 1997,\n", " 16401,\n", " 9380,\n", " 7755,\n", " 2000,\n", " 3751,\n", " 7755,\n", " 1010,\n", " 2107,\n", " 2008,\n", " 1996,\n", " 2897,\n", " 7396,\n", " 2064,\n", " 3229,\n", " 1996,\n", " 4806,\n", " 2897,\n", " 8558,\n", " 8161,\n", " 1996,\n", " 14203,\n", " 14541,\n", " 1997,\n", " 5020,\n", " 13909,\n", " 29263,\n", " 2000,\n", " 2035,\n", " 1996,\n", " 2897,\n", " 7846,\n", " 1999,\n", " 1996,\n", " 2897,\n", " 1012,\n", " 1016,\n", " 1012,\n", " 1996,\n", " 9380,\n", " 2897,\n", " 5536,\n", " 1997,\n", " 4366,\n", " 1015,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 2034,\n", " 8278,\n", " 2950,\n", " 2019,\n", " 9380,\n", " 11336,\n", " 2008,\n", " 8267,\n", " 9380,\n", " 7755,\n", " 3081,\n", " 1996,\n", " 9380,\n", " 11917,\n", " 4957,\n", " 1998,\n", " 19884,\n", " 1996,\n", " 9380,\n", " 7755,\n", " 2000,\n", " 5992,\n", " 7755,\n", " 1012,\n", " 1017,\n", " 1012,\n", " 1996,\n", " 9380,\n", " 2897,\n", " 5536,\n", " 1997,\n", " 4366,\n", " 1016,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 9380,\n", " 11336,\n", " 2003,\n", " 13228,\n", " 2135,\n", " 9530,\n", " 8873,\n", " 27390,\n", " 3085,\n", " 2000,\n", " 2490,\n", " 2048,\n", " 2030,\n", " 2062,\n", " 1997,\n", " 1037,\n", " 19595,\n", " 13135,\n", " 9380,\n", " 2897,\n", " 1006,\n", " 17531,\n", " 2239,\n", " 1007,\n", " 1010,\n", " 1037,\n", " 15453,\n", " 28518,\n", " 2102,\n", " 1011,\n", " 5214,\n", " 13135,\n", " 9380,\n", " 2897,\n", " 1006,\n", " 14246,\n", " 2239,\n", " 1007,\n", " 1010,\n", " 2019,\n", " 26110,\n", " 13135,\n", " 9380,\n", " 2897,\n", " 1006,\n", " 4958,\n", " 2239,\n", " 1007,\n", " 1010,\n", " 1037,\n", " 15453,\n", " 28518,\n", " 2102,\n", " 1011,\n", " 5214,\n", " 26110,\n", " 13135,\n", " 9380,\n", " 2897,\n", " 1006,\n", " 16216,\n", " 26029,\n", " 1007,\n", " 1998,\n", " 2019,\n", " 3161,\n", " 26110,\n", " 9380,\n", " 2897,\n", " 1012,\n", " 1018,\n", " 1012,\n", " 1996,\n", " 9380,\n", " 2897,\n", " 5536,\n", " 1997,\n", " 4366,\n", " 1015,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 2897,\n", " 7396,\n", " 2950,\n", " 1037,\n", " 10463,\n", " 2121,\n", " 3131,\n", " 2005,\n", " 16401,\n", " 2012,\n", " 2560,\n", " 2070,\n", " 1997,\n", " 1996,\n", " 5992,\n", " 7755,\n", " 2000,\n", " 2951,\n", " 3197,\n", " 2029,\n", " 2003,\n", " 13228,\n", " 2135,\n", " 9530,\n", " 8873,\n", " 27390,\n", " 3085,\n", " 2000,\n", " 2490,\n", " 1037,\n", " 29018,\n", " 1997,\n", " 9380,\n", " 2897,\n", " 16744,\n", " 1012,\n", " 1019,\n", " 1012,\n", " 1996,\n", " 9380,\n", " 1010,\n", " 2897,\n", " 5536,\n", " 1997,\n", " 4366,\n", " 1015,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 2117,\n", " 8278,\n", " 2950,\n", " 1037,\n", " 2491,\n", " 4984,\n", " 2854,\n", " 2029,\n", " 2003,\n", " 5214,\n", " 1997,\n", " 4909,\n", " 1996,\n", " 2373,\n", " 2013,\n", " 1996,\n", " 2897,\n", " 7396,\n", " 2005,\n", " 6364,\n", " 1996,\n", " 2363,\n", " 5992,\n", " 7755,\n", " 8558,\n", " 8161,\n", " 1996,\n", " 3223,\n", " 8778,\n", " 6364,\n", " 2051,\n", " 2013,\n", " 1996,\n", " 2897,\n", " 7396,\n", " 1012,\n", " 1020,\n", " 1012,\n", " 1996,\n", " 9380,\n", " 2897,\n", " 5536,\n", " 1997,\n", " 4366,\n", " 1015,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 2897,\n", " 7396,\n", " 2003,\n", " 5214,\n", " 1997,\n", " 6364,\n", " 1996,\n", " 26726,\n", " 2239,\n", " 16744,\n", " 2000,\n", " 10639,\n", " 2007,\n", " 2028,\n", " 2030,\n", " 2062,\n", " 9380,\n", " 2240,\n", " 5536,\n", " 1006,\n", " 19330,\n", " 2102,\n", " 1007,\n", " 1012,\n", " 1021,\n", " 1012,\n", " 1006,\n", " 13261,\n", " 1007,\n", " 1022,\n", " 1012,\n", " 1996,\n", " 9380,\n", " 2897,\n", " 5536,\n", " 1997,\n", " 4366,\n", " 1015,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 2117,\n", " 8278,\n", " 2950,\n", " 1037,\n", " 5415,\n", " 7642,\n", " 3902,\n", " 1006,\n", " 18833,\n", " 1007,\n", " 2990,\n", " 2029,\n", " 2003,\n", " 8648,\n", " 20470,\n", " 2571,\n", " 2000,\n", " 5415,\n", " 7642,\n", " 3902,\n", " 1006,\n", " 18833,\n", " 1007,\n", " 13354,\n", " 2030,\n", " 19400,\n", " 1997,\n", " 1996,\n", " 2897,\n", " 7396,\n", " 1012,\n", " 1023,\n", " 1012,\n", " 1996,\n", " 9380,\n", " 2897,\n", " 5536,\n", " 1997,\n", " 4366,\n", " 1015,\n", " 1010,\n", " 16726,\n", " 1996,\n", " 2012,\n", " 2560,\n", " 2028,\n", " 4807,\n", " 2326,\n", " 2007,\n", " 1996,\n", " 26726,\n", " 2239,\n", " 2897,\n", " 8681,\n", " 1037,\n", " 2034,\n", " 4807,\n", " 2326,\n", " 1998,\n", " 1037,\n", " 2117,\n", " 4807,\n", " 2326,\n", " 1010,\n", " 1998,\n", " 16726,\n", " 1996,\n", " 4807,\n", " 2326,\n", " 2950,\n", " 2012,\n", " 2560,\n", " 2028,\n", " 2376,\n", " 4807,\n", " 2326,\n", " 1010,\n", " 1037,\n", " 2951,\n", " 4807,\n", " 2326,\n", " 1010,\n", " 1998,\n", " 1037,\n", " 2678,\n", " 2326,\n", " 1012,\n", " 2184,\n", " 1012,\n", " 1006,\n", " 13261,\n", " 1007,\n", " 102,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0]],\n", " 'attention_mask': [[1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 1,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0,\n", " 0]]}" ] }, "metadata": {}, "execution_count": 120 } ] }, { "cell_type": "code", "source": [ "# Set the format\n", "train_set.set_format(type='torch',\n", " columns=['input_ids', 'attention_mask', 'decision'])\n", "\n", "val_set.set_format(type='torch',\n", " columns=['input_ids', 'attention_mask', 'decision'])" ], "metadata": { "id": "cclVA5qr0XWp" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": [ "## Dataloader to create the training set and validation set loaders" ], "metadata": { "id": "tladb8wJ0bOD" } }, { "cell_type": "code", "source": [ "# train_dataloader and val_data_loader\n", "train_dataloader = DataLoader(train_set, batch_size=16)\n", "val_dataloader = DataLoader(val_set, batch_size=16)" ], "metadata": { "id": "ycr-gn3B0Zpx" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "# Get the next batch\n", "batch = next(iter(train_dataloader))\n", "# Print the ids\n", "pprint(batch['input_ids'])\n", "# Print the labels\n", "pprint(batch['decision'])" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ISY7NybI0iaM", "outputId": "c35f4653-8b48-4242-b576-b1208ba63dfc" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "tensor([[ 101, 1015, 1012, ..., 0, 0, 0],\n", " [ 101, 1015, 1012, ..., 1996, 3653, 102],\n", " [ 101, 1015, 1012, ..., 16726, 1996, 102],\n", " ...,\n", " [ 101, 1015, 1012, ..., 1012, 1996, 102],\n", " [ 101, 1015, 1012, ..., 2034, 28688, 102],\n", " [ 101, 1015, 1012, ..., 2000, 4366, 102]])\n", "tensor([1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1])\n" ] } ] }, { "cell_type": "code", "source": [ "# Print the input and output shapes\n", "input_shape = batch['input_ids'].shape\n", "output_shape = batch['decision'].shape\n", "print(f'Input shape: {input_shape}')\n", "print(f'Output shape: {output_shape}')" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "RLojYySe0lC9", "outputId": "6406d93f-e7d6-4df1-b4e6-80f676116a45" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Input shape: torch.Size([16, 512])\n", "Output shape: torch.Size([16])\n" ] } ] }, { "cell_type": "code", "source": [ "# A helper function that converts ids into tokens\n", "def convert_ids_to_string(tokenizer, input):\n", " return ' '.join(tokenizer.convert_ids_to_tokens(input))" ], "metadata": { "id": "_hKij3wk0n4U" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": [ "print an example in the batch" ], "metadata": { "id": "R0PAyrkv0qaR" } }, { "cell_type": "code", "source": [ "# Print the example\n", "pprint(convert_ids_to_string(tokenizer,batch['input_ids'][1]))" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "01u3V6T40uMM", "outputId": "7ea2365b-8836-47c8-ae21-48b56a628fcc" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "('[CLS] 1 . a method comprising : using a first reader to take a first reading '\n", " 'of an inherent disorder feature of a tag ; using at least a second reader to '\n", " 'take at least a second reading of the inherent disorder feature of the tag ; '\n", " 'matching the first reading with at least the second reading ; determining '\n", " 'one or more acceptance criteria , wherein at least one of the acceptance '\n", " 'criteria is based on whether the first reading and the second reading match '\n", " 'within a pre ##de ##ter ##mined threshold ; accepting the tag if the '\n", " 'acceptance criteria are met ; and recording a finger ##print for the tag if '\n", " 'the tag was accepted . 2 . the method of claim 1 , wherein determining one '\n", " 'or more acceptance criteria further comprises : determining an acceptance '\n", " 'criterion based on an individual reading . 3 . the method of claim 2 , '\n", " 'wherein determining an acceptance criterion based on an individual reading '\n", " 'comprises determining an acceptance criterion based on a strength of a '\n", " 'signal in at least one of the first reading and the second reading . 4 . the '\n", " 'method of claim 2 , wherein determining an acceptance criterion based on an '\n", " 'individual reading comprises determining an acceptance criterion based on a '\n", " 'complexity of a signal in at least one of the first reading and the second '\n", " 'reading . 5 . the method of claim 1 , further comprising : rejecting the tag '\n", " 'if it is not accepted . 6 . the method of claim 5 , wherein rejecting the '\n", " 'tag comprises removing the tag without stopping the flow of production . 7 . '\n", " 'the method of claim 6 , wherein removing the tag comprises one or more of '\n", " 'marking the tag as rejected , cutting out the tag , punching out the tag , '\n", " 'and removing a tag using a su ##ction method . 8 . the method of claim 5 , '\n", " 'wherein rejecting the tag further comprises noting the rejected tag in a '\n", " 'database . 9 . the method of claim 1 , further comprising : using at least a '\n", " 'third reader to take at least a third reading of the inherent disorder '\n", " 'feature of the tag if the acceptance criteria are not met ; matching the '\n", " 'third reading with the first reading and the second reading ; determining '\n", " 'one or more further acceptance criteria , wherein at least one of the '\n", " 'further acceptance criteria is based on whether the first reading and the '\n", " 'third reading match within the pre ##de ##ter ##mined threshold or whether '\n", " 'the second reading and the third reading match within the pre ##de ##ter '\n", " '##mined threshold ; and accepting the tag if the further acceptance criteria '\n", " 'are met ; and if the tag is accepted , recording a finger ##print for the '\n", " 'tag based on the first reading if the first reading and the third reading '\n", " 'match within the pre ##de ##ter ##mined threshold or based on the second '\n", " 'reading if the second reading and the third reading match within the pre '\n", " '[SEP]')\n" ] } ] }, { "cell_type": "markdown", "source": [ "## Tune the Model" ], "metadata": { "id": "40CnkXnUnuzU" } }, { "cell_type": "code", "source": [ "model = DistilBertForSequenceClassification.from_pretrained(model_name, num_labels=2)\n", "\n" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "cR-q_5PuUt0x", "outputId": "718cdac1-4a2c-4270-cc0e-bf7b0748ed7e" }, "execution_count": 140, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "Some weights of DistilBertForSequenceClassification were not initialized from the model checkpoint at distilbert-base-uncased and are newly initialized: ['pre_classifier.weight', 'classifier.bias', 'classifier.weight', 'pre_classifier.bias']\n", "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n" ] } ] }, { "cell_type": "code", "source": [ "\n", "device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')\n", "\n", "model.to(device)\n", "model.train()\n", "\n", "optim = torch.optim.AdamW(model.parameters(), lr=5e-5)\n", "\n", "for epoch in range(3):\n", " for batch in train_dataloader:\n", " optim.zero_grad()\n", " input_ids = batch['input_ids'].to(device)\n", " attention_mask = batch['attention_mask'].to(device)\n", " labels = batch['decision'].to(device)\n", " outputs = model(input_ids, attention_mask=attention_mask, labels=labels)\n", " loss = outputs[0]\n", " loss.backward()\n", " optim.step()\n", "\n", "model.eval()" ], "metadata": { "id": "AXS86iRRahsV", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "7ad03693-57f7-4a9e-d603-47adcec1bd5b" }, "execution_count": 141, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "DistilBertForSequenceClassification(\n", " (distilbert): DistilBertModel(\n", " (embeddings): Embeddings(\n", " (word_embeddings): Embedding(30522, 768, padding_idx=0)\n", " (position_embeddings): Embedding(512, 768)\n", " (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n", " (dropout): Dropout(p=0.1, inplace=False)\n", " )\n", " (transformer): Transformer(\n", " (layer): ModuleList(\n", " (0-5): 6 x TransformerBlock(\n", " (attention): MultiHeadSelfAttention(\n", " (dropout): Dropout(p=0.1, inplace=False)\n", " (q_lin): Linear(in_features=768, out_features=768, bias=True)\n", " (k_lin): Linear(in_features=768, out_features=768, bias=True)\n", " (v_lin): Linear(in_features=768, out_features=768, bias=True)\n", " (out_lin): Linear(in_features=768, out_features=768, bias=True)\n", " )\n", " (sa_layer_norm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n", " (ffn): FFN(\n", " (dropout): Dropout(p=0.1, inplace=False)\n", " (lin1): Linear(in_features=768, out_features=3072, bias=True)\n", " (lin2): Linear(in_features=3072, out_features=768, bias=True)\n", " (activation): GELUActivation()\n", " )\n", " (output_layer_norm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n", " )\n", " )\n", " )\n", " )\n", " (pre_classifier): Linear(in_features=768, out_features=768, bias=True)\n", " (classifier): Linear(in_features=768, out_features=2, bias=True)\n", " (dropout): Dropout(p=0.2, inplace=False)\n", ")" ] }, "metadata": {}, "execution_count": 141 } ] }, { "cell_type": "markdown", "source": [ "## Testing" ], "metadata": { "id": "3cjroUKznbGM" } }, { "cell_type": "code", "source": [ "# Get the next batch\n", "batch = next(iter(val_dataloader))\n", "# Print the ids\n", "pprint(batch['input_ids'])\n", "# Print the labels\n", "pprint(batch['decision'])" ], "metadata": { "id": "ep_6o2WGonYP", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "1a62ef33-8cfe-48aa-c3a9-e82894afa8ef" }, "execution_count": 142, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "tensor([[ 101, 1015, 1012, ..., 16503, 2063, 102],\n", " [ 101, 1015, 1012, ..., 3341, 2012, 102],\n", " [ 101, 1015, 1011, ..., 1012, 2861, 102],\n", " ...,\n", " [ 101, 1015, 1011, ..., 3012, 2978, 102],\n", " [ 101, 1015, 1011, ..., 2689, 5418, 102],\n", " [ 101, 1015, 1012, ..., 27983, 2638, 102]])\n", "tensor([0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1])\n" ] } ] }, { "cell_type": "code", "source": [ "print(batch['input_ids'])" ], "metadata": { "id": "BJJi5AAqoZjC", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "d713606f-d3e7-4bc8-b466-df8f6b23f19f" }, "execution_count": 143, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "tensor([[ 101, 1015, 1012, ..., 16503, 2063, 102],\n", " [ 101, 1015, 1012, ..., 3341, 2012, 102],\n", " [ 101, 1015, 1011, ..., 1012, 2861, 102],\n", " ...,\n", " [ 101, 1015, 1011, ..., 3012, 2978, 102],\n", " [ 101, 1015, 1011, ..., 2689, 5418, 102],\n", " [ 101, 1015, 1012, ..., 27983, 2638, 102]])\n" ] } ] }, { "cell_type": "code", "source": [ "batch_size = 16\n", "model_cpu = model.cpu()\n", "with torch.no_grad():\n", " outputs = model_cpu(batch['input_ids']).logits\n", " print(outputs)\n", " predictions = F.softmax(outputs, dim = 1)\n", " print(predictions)\n", " labels = torch.argmax(predictions, dim = 1)\n", " print(labels)\n", " print(\"--------\")\n", " print(batch['decision'])\n", " print(\"--------\")\n", " res = labels == batch['decision']\n", " print(res)\n", " print(res.sum() / batch_size)" ], "metadata": { "id": "_2YWPoM7qW9g", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "18e9c962-2d18-4dd8-9a6c-aa0f0c5fc140" }, "execution_count": 144, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "tensor([[-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5924, 1.0367],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5924, 1.0367],\n", " [-1.5924, 1.0367],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5924, 1.0367]])\n", "tensor([[0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327]])\n", "tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n", "--------\n", "tensor([0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1])\n", "--------\n", "tensor([False, True, False, True, False, True, True, True, True, True,\n", " True, True, False, True, True, True])\n", "tensor(0.7500)\n" ] } ] }, { "cell_type": "markdown", "source": [ "## Validation" ], "metadata": { "id": "CNYszo4atZUd" } }, { "cell_type": "code", "source": [ "accuracy = []\n", "for batch in val_dataloader:\n", " with torch.no_grad():\n", " outputs = model_cpu(batch['input_ids']).logits\n", " predictions_batch = F.softmax(outputs, dim = 1)\n", " labels = torch.argmax(predictions_batch, dim = 1)\n", " acc = (labels == batch['decision']).numpy().sum() / batch_size\n", " print(f\"batch_average_accuray: {acc}\")\n", " accuracy.append(acc)" ], "metadata": { "id": "h7bzRvkItdir", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "8798415e-8ecb-4650-b31f-c47b3cf51fcf" }, "execution_count": 145, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.625\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.625\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.5625\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.5625\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.6875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.75\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.9375\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 1.0\n", "batch_average_accuray: 0.8125\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.875\n", "batch_average_accuray: 0.3125\n" ] } ] }, { "cell_type": "code", "source": [ "print(f\"average accuracy: {np.mean(accuracy)}\")" ], "metadata": { "id": "-Ow1N7MnEc98", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "79afdbed-1a03-44aa-91e0-d740ba403b6e" }, "execution_count": 146, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "average accuracy: 0.8896089630931459\n" ] } ] }, { "cell_type": "markdown", "source": [ "## Save the tuned model in \"saved\" directory" ], "metadata": { "id": "b-w2IO76d834" } }, { "cell_type": "code", "source": [ "save_directory = \"saved\"\n", "tokenizer.save_pretrained(save_directory)\n", "model_cpu.save_pretrained(save_directory)" ], "metadata": { "id": "KefqatP-YDSC" }, "execution_count": 147, "outputs": [] }, { "cell_type": "code", "source": [ "tokenizer = AutoTokenizer.from_pretrained(save_directory)\n", "model_saved = AutoModelForSequenceClassification.from_pretrained(save_directory)" ], "metadata": { "id": "Km8eScKJl4VP" }, "execution_count": 148, "outputs": [] }, { "cell_type": "markdown", "source": [ "## Testing the saved model" ], "metadata": { "id": "dCZQwr_ZE-cB" } }, { "cell_type": "code", "source": [ "with torch.no_grad():\n", " outputs = model_saved(batch['input_ids']).logits\n", " print(outputs)\n", " predictions = F.softmax(outputs, dim = 1)\n", " print(predictions)\n", " labels = torch.argmax(predictions, dim = 1)\n", " print(labels)\n", " print(\"--------\")\n", " print(batch['decision'])\n", " print(\"--------\")\n", " res = labels == batch['decision']\n", " print(res)\n", " print(res.sum() / batch_size)" ], "metadata": { "id": "u_iN3BSHFB27", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "b72c9950-fd93-4dd8-da7e-4b14b6a6851f" }, "execution_count": 149, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "tensor([[-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5925, 1.0366],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368],\n", " [-1.5923, 1.0368]])\n", "tensor([[0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327],\n", " [0.0673, 0.9327]])\n", "tensor([1, 1, 1, 1, 1, 1])\n", "--------\n", "tensor([1, 1, 0, 1, 1, 1])\n", "--------\n", "tensor([ True, True, False, True, True, True])\n", "tensor(0.3125)\n" ] } ] }, { "cell_type": "markdown", "source": [ "## Share the tuned model to Hugging Face" ], "metadata": { "id": "rdWo3Erg3Nbo" } }, { "cell_type": "code", "source": [ "model_cpu.push_to_hub(\"ayethuzar/tuned-for-patentability\")\n" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 101, "referenced_widgets": [ "93f98cafe9a54e49b1a6dae6031f9b8c", "caa56c9fb75f43b0974f9c02a933fe43", "991929bba22647d79be683d2946ebeac", "268104e667c64665be940dc048050040", "721f473c88c743ad8ababadc35bde1e9", "70cfa43583f54962bdc1cad4c32fc12a", "7d714e7e7fd9464a9239c926d4d4357d", "601ac88f59744374bfe70f6aa87473f3", "414abfed64794b47830d125bbf89e39c", "6af51f896d74438f9b7f931ae2e78bfd", "50c560a47cbb494bbf399efc4d464ce8" ] }, "id": "BItDY3Up6yma", "outputId": "88c62d08-dd32-449d-cc9f-5fa524e7c569" }, "execution_count": 160, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "pytorch_model.bin: 0%| | 0.00/268M [00:00