{ "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": "" } } } } }, "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": "e3f0b092-36d8-40fd-9644-48ae4ca58b89" }, "execution_count": null, "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": "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" ], "metadata": { "id": "FxZeFFTlFvz1" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": [ "## Download Dataset (USPTO)" ], "metadata": { "id": "jDVxfOsznnQP" } }, { "cell_type": "markdown", "source": [ "use the `load_dataset` function to load all the patent applications that were filed to the USPTO in January 2016. We specify the date ranges of the training and validation sets as January 1-21, 2016 and January 22-31, 2016, respectively." ], "metadata": { "id": "JtxpuQV7F712" } }, { "cell_type": "code", "source": [ "dataset_dict = load_dataset('HUPD/hupd',\n", " name='sample',\n", " data_files=\"https://huggingface.co/datasets/HUPD/hupd/blob/main/hupd_metadata_2022-02-22.feather\",\n", " icpr_label=None,\n", " train_filing_start_date='2016-01-01',\n", " train_filing_end_date='2016-01-21',\n", " val_filing_start_date='2016-01-22',\n", " val_filing_end_date='2016-01-31',\n", ")\n", "\n", "print('Loading is done!')" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 104, "referenced_widgets": [ "3fcd5671998345fdb09141e78dac06cb", "c70612a65eda444cab5124b962e0cee7", "63a6c6e8662c497e9ff8b2be4b757810", "c8b4354142734a32ad99561325596dfd", "b39b62e8d2ad45dfab606982353c60e8", "c990580f68d54fc989ad816819f46dde", "e36342e4551348d18f12179014964b13", "27a4402272b241daa6367aca7ba692ce", "4f715c1a03fb44aeb92257fbe7c7e839", "27338958c6d24fdb8983b585e9edd292", "ec957d10b29147ec8c8b90a59c7d4037" ] }, "id": "pIDmYbLGF1a7", "outputId": "746ac43b-b372-4004-acc7-296e4978c13f" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "WARNING:datasets.builder:Found cached dataset hupd (/root/.cache/huggingface/datasets/HUPD___hupd/sample-bf35d7d92b870122/0.0.0/6920d2def8fd7767046c0470603357f76866e5a09c97e19571896bfdca521142)\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ " 0%| | 0/2 [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": 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=6)\n", "\n" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "cR-q_5PuUt0x", "outputId": "b86df9ec-48eb-4052-ec58-dcf90fc7bb99" }, "execution_count": null, "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": "5850704d-3c97-448b-f2b0-13514b68ae42" }, "execution_count": 128, "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=6, bias=True)\n", " (dropout): Dropout(p=0.2, inplace=False)\n", ")" ] }, "metadata": {}, "execution_count": 128 } ] }, { "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": "ad833a7e-3538-452b-cdc9-e84f8b14f1a9" }, "execution_count": 129, "outputs": [ { "metadata": { "tags": null }, "name": "stdout", "output_type": "stream", "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": "1a726e4a-3051-408a-b687-2306f9daab0e" }, "execution_count": 130, "outputs": [ { "metadata": { "tags": null }, "name": "stdout", "output_type": "stream", "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": "a1b063ac-611d-453b-b220-b79c9264d050" }, "execution_count": 131, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "tensor([[ 1.5257, 4.2095, -7.3412, -7.4089, -7.3049, -7.4469],\n", " [ 1.5311, 4.4304, -7.5747, -7.6553, -7.5388, -7.6841],\n", " [ 1.5313, 4.5091, -7.6554, -7.7426, -7.6216, -7.7662],\n", " [ 1.4804, 4.9547, -8.0065, -8.1703, -8.0285, -8.1130],\n", " [ 1.4874, 4.9436, -8.0094, -8.1669, -8.0274, -8.1148],\n", " [ 1.5307, 4.5651, -7.7120, -7.8047, -7.6822, -7.8233],\n", " [ 1.5206, 4.0651, -7.1815, -7.2398, -7.1449, -7.2809],\n", " [ 1.5176, 4.0424, -7.1503, -7.2078, -7.1145, -7.2489],\n", " [ 1.5204, 4.0991, -7.2159, -7.2773, -7.1805, -7.3173],\n", " [ 1.4843, 4.9489, -8.0084, -8.1686, -8.0282, -8.1143],\n", " [ 2.2387, 2.5537, -6.7667, -6.6407, -6.6800, -6.8230],\n", " [ 1.5200, 4.0760, -7.1917, -7.2511, -7.1551, -7.2923],\n", " [ 1.5181, 3.9730, -7.0767, -7.1285, -7.0401, -7.1731],\n", " [ 1.4789, 4.9569, -8.0052, -8.1709, -8.0283, -8.1122],\n", " [ 1.4837, 4.9495, -8.0079, -8.1686, -8.0280, -8.1139],\n", " [ 1.5285, 4.5719, -7.7140, -7.8085, -7.6860, -7.8266]])\n", "tensor([[6.3933e-02, 9.3603e-01, 9.0133e-06, 8.4228e-06, 9.3459e-06, 8.1093e-06],\n", " [5.2187e-02, 9.4779e-01, 5.7940e-06, 5.3452e-06, 6.0058e-06, 5.1932e-06],\n", " [4.8435e-02, 9.5155e-01, 4.9594e-06, 4.5455e-06, 5.1301e-06, 4.4395e-06],\n", " [3.0053e-02, 9.6994e-01, 2.2792e-06, 1.9348e-06, 2.2296e-06, 2.0488e-06],\n", " [3.0584e-02, 9.6941e-01, 2.2967e-06, 1.9620e-06, 2.2556e-06, 2.0669e-06],\n", " [4.5894e-02, 9.5409e-01, 4.4434e-06, 4.0501e-06, 4.5777e-06, 3.9752e-06],\n", " [7.2796e-02, 9.2716e-01, 1.2102e-05, 1.1416e-05, 1.2553e-05, 1.0957e-05],\n", " [7.4131e-02, 9.2582e-01, 1.2752e-05, 1.2040e-05, 1.3217e-05, 1.1555e-05],\n", " [7.0519e-02, 9.2944e-01, 1.1329e-05, 1.0654e-05, 1.1737e-05, 1.0237e-05],\n", " [3.0336e-02, 9.6966e-01, 2.2874e-06, 1.9488e-06, 2.2426e-06, 2.0575e-06],\n", " [4.2181e-01, 5.7798e-01, 5.1776e-05, 5.8730e-05, 5.6465e-05, 4.8942e-05],\n", " [7.2019e-02, 9.2794e-01, 1.1858e-05, 1.1174e-05, 1.2299e-05, 1.0723e-05],\n", " [7.9076e-02, 9.2087e-01, 1.4634e-05, 1.3895e-05, 1.5180e-05, 1.3289e-05],\n", " [2.9945e-02, 9.7005e-01, 2.2774e-06, 1.9298e-06, 2.2254e-06, 2.0463e-06],\n", " [3.0302e-02, 9.6969e-01, 2.2872e-06, 1.9477e-06, 2.2417e-06, 2.0573e-06],\n", " [4.5503e-02, 9.5448e-01, 4.4061e-06, 4.0091e-06, 4.5314e-06, 3.9371e-06]])\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": "4bdfd8a5-f451-4421-d744-e257218e1333" }, "execution_count": 132, "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": "498a92dc-0ba0-4e36-997a-e476f246a8f2" }, "execution_count": 133, "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": 134, "outputs": [] }, { "cell_type": "code", "source": [ "tokenizer = AutoTokenizer.from_pretrained(save_directory)\n", "model_saved = AutoModelForSequenceClassification.from_pretrained(save_directory)" ], "metadata": { "id": "Km8eScKJl4VP" }, "execution_count": 135, "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": "b42bc1e7-ab87-4047-80c2-1d2188db47fe" }, "execution_count": 136, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "tensor([[ 1.5309, 4.4470, -7.5914, -7.6736, -7.5564, -7.7017],\n", " [ 1.5087, 4.8181, -7.9330, -8.0604, -7.9278, -8.0432],\n", " [ 2.3087, 2.4332, -6.8006, -6.6907, -6.7263, -6.8546],\n", " [ 1.4795, 4.9560, -8.0057, -8.1706, -8.0284, -8.1125],\n", " [ 1.4838, 4.9435, -8.0029, -8.1612, -8.0226, -8.1092],\n", " [ 1.4833, 4.9506, -8.0081, -8.1692, -8.0285, -8.1141]])\n", "tensor([[5.1366e-02, 9.4861e-01, 5.6090e-06, 5.1667e-06, 5.8089e-06, 5.0231e-06],\n", " [3.5249e-02, 9.6474e-01, 2.7968e-06, 2.4623e-06, 2.8115e-06, 2.5049e-06],\n", " [4.6880e-01, 5.3098e-01, 5.1865e-05, 5.7893e-05, 5.5865e-05, 4.9141e-05],\n", " [2.9986e-02, 9.7001e-01, 2.2780e-06, 1.9317e-06, 2.2269e-06, 2.0472e-06],\n", " [3.0480e-02, 9.6951e-01, 2.3120e-06, 1.9736e-06, 2.2670e-06, 2.0790e-06],\n", " [3.0255e-02, 9.6974e-01, 2.2843e-06, 1.9443e-06, 2.2383e-06, 2.0545e-06]])\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": [ "References:\n", "\n", "1. https://colab.research.google.com/drive/1_ZsI7WFTsEO0iu_0g3BLTkIkOUqPzCET?usp=sharing#scrollTo=B5wxZNhXdUK6\n", "\n", "2. https://huggingface.co/AI-Growth-Lab/PatentSBERTa\n", "\n", "3. https://huggingface.co/anferico/bert-for-patents\n", "\n", "4. https://huggingface.co/transformers/v3.2.0/custom_datasets.html" ], "metadata": { "id": "s_ryUnFdGB5L" } } ] }