{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Welcome to Deep Learning with conx!\n", "\n", "This is a live Jupyter notebook running in the cloud via mybinder.\n", "\n", "Quick links:\n", "\n", "* [Conx Notebooks](../notebooks/)\n", "* [SIGCSE 2018 Workshop Materials](../notebooks/collections/sigcse-2018/)\n", "\n", "Or you can start working right here:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Using TensorFlow backend.\n", "/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6\n", " return f(*args, **kwds)\n", "conx, version 3.5.11\n" ] } ], "source": [ "import conx as cx" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "net = cx.Network(\"XOR\", 2, 5, 1, activation=\"sigmoid\")\n", "net.compile(error=\"mse\", optimizer=cx.SGD(lr=0.1, momentum=0.9))" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "net.dataset.load([\n", " [(0, 0), (1,)],\n", " [(0, 1), (0,)],\n", " [(1, 0), (0,)],\n", " [(1, 1), (1,)],\n", "])" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9b5de2cdaeba4cc2be73572dc68dd1e9", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Dashboard.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Dashboard(children=(Accordion(children=(HBox(children=(VBox(children=(Select(description='Dataset:', index=1, options=('Test', 'Train'), rows=1, value='Train'), FloatSlider(value=1.0, continuous_update=False, description='Zoom', max=3.0, min=0.5), IntText(value=150, description='Horizontal space between banks:', style=DescriptionStyle(description_width='initial')), IntText(value=30, description='Vertical space between layers:', style=DescriptionStyle(description_width='initial')), HBox(children=(Checkbox(value=False, description='Show Targets', style=DescriptionStyle(description_width='initial')), Checkbox(value=False, description='Errors', style=DescriptionStyle(description_width='initial')))), Select(description='Features:', options=('',), rows=1, value=''), IntText(value=3, description='Feature columns:', style=DescriptionStyle(description_width='initial')), FloatText(value=2.0, description='Feature scale:', style=DescriptionStyle(description_width='initial'))), layout=Layout(width='100%')), VBox(children=(Select(description='Layer:', index=2, options=('input', 'hidden', 'output'), rows=1, value='output'), Checkbox(value=True, description='Visible'), Select(description='Colormap:', options=('', 'Accent', 'Accent_r', 'Blues', 'Blues_r', 'BrBG', 'BrBG_r', 'BuGn', 'BuGn_r', 'BuPu', 'BuPu_r', 'CMRmap', 'CMRmap_r', 'Dark2', 'Dark2_r', 'GnBu', 'GnBu_r', 'Greens', 'Greens_r', 'Greys', 'Greys_r', 'OrRd', 'OrRd_r', 'Oranges', 'Oranges_r', 'PRGn', 'PRGn_r', 'Paired', 'Paired_r', 'Pastel1', 'Pastel1_r', 'Pastel2', 'Pastel2_r', 'PiYG', 'PiYG_r', 'PuBu', 'PuBuGn', 'PuBuGn_r', 'PuBu_r', 'PuOr', 'PuOr_r', 'PuRd', 'PuRd_r', 'Purples', 'Purples_r', 'RdBu', 'RdBu_r', 'RdGy', 'RdGy_r', 'RdPu', 'RdPu_r', 'RdYlBu', 'RdYlBu_r', 'RdYlGn', 'RdYlGn_r', 'Reds', 'Reds_r', 'Set1', 'Set1_r', 'Set2', 'Set2_r', 'Set3', 'Set3_r', 'Spectral', 'Spectral_r', 'Vega10', 'Vega10_r', 'Vega20', 'Vega20_r', 'Vega20b', 'Vega20b_r', 'Vega20c', 'Vega20c_r', 'Wistia', 'Wistia_r', 'YlGn', 'YlGnBu', 'YlGnBu_r', 'YlGn_r', 'YlOrBr', 'YlOrBr_r', 'YlOrRd', 'YlOrRd_r', 'afmhot', 'afmhot_r', 'autumn', 'autumn_r', 'binary', 'binary_r', 'bone', 'bone_r', 'brg', 'brg_r', 'bwr', 'bwr_r', 'cool', 'cool_r', 'coolwarm', 'coolwarm_r', 'copper', 'copper_r', 'cubehelix', 'cubehelix_r', 'flag', 'flag_r', 'gist_earth', 'gist_earth_r', 'gist_gray', 'gist_gray_r', 'gist_heat', 'gist_heat_r', 'gist_ncar', 'gist_ncar_r', 'gist_rainbow', 'gist_rainbow_r', 'gist_stern', 'gist_stern_r', 'gist_yarg', 'gist_yarg_r', 'gnuplot', 'gnuplot2', 'gnuplot2_r', 'gnuplot_r', 'gray', 'gray_r', 'hot', 'hot_r', 'hsv', 'hsv_r', 'inferno', 'inferno_r', 'jet', 'jet_r', 'magma', 'magma_r', 'nipy_spectral', 'nipy_spectral_r', 'ocean', 'ocean_r', 'pink', 'pink_r', 'plasma', 'plasma_r', 'prism', 'prism_r', 'rainbow', 'rainbow_r', 'seismic', 'seismic_r', 'spectral', 'spectral_r', 'spring', 'spring_r', 'summer', 'summer_r', 'tab10', 'tab10_r', 'tab20', 'tab20_r', 'tab20b', 'tab20b_r', 'tab20c', 'tab20c_r', 'terrain', 'terrain_r', 'viridis', 'viridis_r', 'winter', 'winter_r'), rows=1, value=''), HTML(value=''), FloatText(value=-1.0, description='Leftmost color maps to:', style=DescriptionStyle(description_width='initial')), FloatText(value=1.0, description='Rightmost color maps to:', style=DescriptionStyle(description_width='initial')), IntText(value=0, description='Feature to show:', style=DescriptionStyle(description_width='initial'))), layout=Layout(width='100%')))),), selected_index=None, _titles={'0': 'XOR'}), VBox(children=(HBox(children=(IntSlider(value=0, continuous_update=False, description='Dataset index', layout=Layout(width='100%'), max=3), Label(value='of 4', layout=Layout(width='100px'))), layout=Layout(height='40px')), HBox(children=(Button(icon='fast-backward', layout=Layout(width='100%'), style=ButtonStyle()), Button(icon='backward', layout=Layout(width='100%'), style=ButtonStyle()), IntText(value=0, layout=Layout(width='100%')), Button(icon='forward', layout=Layout(width='100%'), style=ButtonStyle()), Button(icon='fast-forward', layout=Layout(width='100%'), style=ButtonStyle()), Button(description='Play', icon='play', layout=Layout(width='100%'), style=ButtonStyle()), Button(icon='refresh', layout=Layout(width='25%'), style=ButtonStyle())), layout=Layout(height='50px', width='100%'))), layout=Layout(width='100%')), HTML(value='

', layout=Layout(justify_content='center', overflow_x='auto', overflow_y='auto', width='95%')), Output()))" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "require(['base/js/namespace'], function(Jupyter) {\n", " Jupyter.notebook.kernel.comm_manager.register_target('conx_svg_control', function(comm, msg) {\n", " comm.on_msg(function(msg) {\n", " var data = msg[\"content\"][\"data\"];\n", " var images = document.getElementsByClassName(data[\"class\"]);\n", " for (var i = 0; i < images.length; i++) {\n", " if (data[\"href\"]) {\n", " images[i].setAttributeNS(null, \"href\", data[\"href\"]);\n", " }\n", " if (data[\"src\"]) {\n", " images[i].setAttributeNS(null, \"src\", data[\"src\"]);\n", " }\n", " }\n", " });\n", " });\n", "});\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "require(['base/js/namespace'], function(Jupyter) {\n", " Jupyter.notebook.kernel.comm_manager.register_target('conx_svg_control', function(comm, msg) {\n", " comm.on_msg(function(msg) {\n", " var data = msg[\"content\"][\"data\"];\n", " var images = document.getElementsByClassName(data[\"class\"]);\n", " for (var i = 0; i < images.length; i++) {\n", " if (data[\"href\"]) {\n", " images[i].setAttributeNS(null, \"href\", data[\"href\"]);\n", " }\n", " if (data[\"src\"]) {\n", " images[i].setAttributeNS(null, \"src\", data[\"src\"]);\n", " }\n", " }\n", " });\n", " });\n", "});\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "net.dashboard()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================================================================\n", " | Training | Training \n", "Epochs | Error | Accuracy \n", "------ | --------- | --------- \n", "# 1231 | 0.00875 | 1.00000 \n" ] } ], "source": [ "net.train(2000, accuracy=1.0, report_rate=50, plot=True)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[0.9001790285110474]\n", "[0.09280513972043991]\n", "[0.09218630194664001]\n", "[0.9115041494369507]\n" ] } ], "source": [ "for i in range(4):\n", " print(net.propagate(net.dataset.inputs[i]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.3" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "0c01554263f740678e052dddc7baa232": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "SelectModel", "state": { "_options_labels": [ "Test", "Train" ], "description": "Dataset:", "index": 1, "layout": "IPY_MODEL_b6d05976b5cb40ff8a4ddee3c5a861d9", "rows": 1, "style": "IPY_MODEL_51461b41bbd4492583f7fbd5d631835d" } }, "136345188d7d4eeb97ad63b4e39206c0": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "137cc55f71044b329686552e4d5ed5fe": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_9bfc7d1321df402ebac286b2c8b7a47d", "IPY_MODEL_f3801cae672644048cd4eb49c89f6fb5", "IPY_MODEL_dd4b1f529c7941569816da9769084b90", "IPY_MODEL_5ef72263c5e247cbbb9916bffccf7485", "IPY_MODEL_c491fff0bf9f47339ab116e4a2b728c9", "IPY_MODEL_4cb4b63e98944567b0959241151670e8", "IPY_MODEL_44d99e7e5001431abc7161a689dd6ea5" ], "layout": "IPY_MODEL_f6b3e8fc467742ac88c9cf3bf03cfa03" } }, "15dbc9bb00744ca8a4613fd572a49fc0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "15efb7a6a85b429c857fdc8e18c154c7": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_e4910a4128764aad9d412609da7c9a53" } }, "16832b10a05e46b19183f1726ed80faf": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "justify_content": "center", "overflow_x": "auto", "overflow_y": "auto", "width": "95%" } }, "17b44abf16704be4971f53e8160fce47": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "18294f98de474bd794eb2b003add21f8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "FloatTextModel", "state": { "description": "Leftmost color maps to:", "layout": "IPY_MODEL_17b44abf16704be4971f53e8160fce47", "step": null, "style": "IPY_MODEL_733f45e0a1c44fe1aa0aca4ee87c5217", "value": -1 } }, "21191f7705374908a284ccf55829951c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "24381fd59a954b2980c8347250859849": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "26908fd67f194c21a968e035de73aa1a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "SelectModel", "state": { "_options_labels": [ "input", "hidden", "output" ], "description": "Layer:", "index": 2, "layout": "IPY_MODEL_da640a5ac3bc4a59ab8a82bc8fcbf746", "rows": 1, "style": "IPY_MODEL_5348b0f185bd4fa5a642e5121eb0feed" } }, "2982cc6bc30940ff96f2f9131a4a6241": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "29eb7d46cc034ca5abe9c2d759997fb5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "FloatSliderModel", "state": { "continuous_update": false, "description": "Zoom", "layout": "IPY_MODEL_55ec8f78c85a4eb8af0a7bbd80cf4ce3", "max": 3, "min": 0.5, "step": 0.1, "style": "IPY_MODEL_bea9ec4c51724a9797030debbd44b595", "value": 1 } }, "2aa5894453424c4aacf351dd8c8ab922": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "3156b5f6d28642bd9633e8e5518c9097": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "VBoxModel", "state": { "children": [ "IPY_MODEL_0c01554263f740678e052dddc7baa232", "IPY_MODEL_29eb7d46cc034ca5abe9c2d759997fb5", "IPY_MODEL_dd45f7f9734f48fba70aaf8ae65dbb97", "IPY_MODEL_421ac3c41d5b46e6af897887dae323e3", "IPY_MODEL_b9be5483405141b88cf18e7d4f4963de", "IPY_MODEL_6c4dcc259efa4621aac46f4703595e4d", "IPY_MODEL_c712050936334e1d859ad0bdbba33a50", "IPY_MODEL_5a5d74e4200043f6ab928822b4346aa4" ], "layout": "IPY_MODEL_34cf92591c7545d3b47483fc9b50c798" } }, "326c868bba2744109476ec1a641314b3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "VBoxModel", "state": { "children": [ "IPY_MODEL_26908fd67f194c21a968e035de73aa1a", "IPY_MODEL_7db6e0d0198d45f98e8c5a6f08d0791b", "IPY_MODEL_8193e107e49f49dda781c456011d9a78", "IPY_MODEL_b0b819e6de95419a9eeb8a0002353ee1", "IPY_MODEL_18294f98de474bd794eb2b003add21f8", "IPY_MODEL_a836973f20574c71b33aa3cef64e7f1e", "IPY_MODEL_71588c1ad11e42df844dff42b5ab041d" ], "layout": "IPY_MODEL_4b5e4ed95f04466e8685437a1f5593e7" } }, "328d40ca9797496b91ee0685f8f59d05": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "32eb1f056b8a4311a1448f7fd4b7459e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "34cf92591c7545d3b47483fc9b50c798": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "3501c6717de1410aba4274dec484dde0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "364a4cc16b974d61b20102f7cbd4e9fe": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "379c8a4fc2c04ec1aea72f9a38509632": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "3b7e0bdd891743bda0dd4a9d15dd0a42": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "402fa77b803048b2990b273187598d95": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "SliderStyleModel", "state": { "description_width": "" } }, "421ac3c41d5b46e6af897887dae323e3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "IntTextModel", "state": { "description": "Vertical space between layers:", "layout": "IPY_MODEL_9fca8922d6a84010a73ddb46f2713c40", "step": 1, "style": "IPY_MODEL_379c8a4fc2c04ec1aea72f9a38509632", "value": 30 } }, "4479c1d8a9d74da1800e20711176fe1a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "44d99e7e5001431abc7161a689dd6ea5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "icon": "refresh", "layout": "IPY_MODEL_861d8540f11944d8995a9f5c1385c829", "style": "IPY_MODEL_eba95634dd3241f2911fc17342ddf924" } }, "486e1a6b578b44b397b02f1dbafc907b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "4b5e4ed95f04466e8685437a1f5593e7": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "4cb4b63e98944567b0959241151670e8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "Play", "icon": "play", "layout": "IPY_MODEL_328d40ca9797496b91ee0685f8f59d05", "style": "IPY_MODEL_79f332bd05a2497eb63b8f6cc6acf8a3" } }, "4e5807bdbf3d4dc2b611e26fa56b6101": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100px" } }, "51461b41bbd4492583f7fbd5d631835d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "5348b0f185bd4fa5a642e5121eb0feed": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "55ec8f78c85a4eb8af0a7bbd80cf4ce3": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "5a5d74e4200043f6ab928822b4346aa4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "FloatTextModel", "state": { "description": "Feature scale:", "layout": "IPY_MODEL_6ee890b9a11c4ce0868fc8da9b510720", "step": null, "style": "IPY_MODEL_24381fd59a954b2980c8347250859849", "value": 2 } }, "5ef72263c5e247cbbb9916bffccf7485": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "icon": "forward", "layout": "IPY_MODEL_f5e9b479caa3491496610a1bca70f6f6", "style": "IPY_MODEL_32eb1f056b8a4311a1448f7fd4b7459e" } }, "63880f7d52ea4c7da360d2269be5cbd2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "66e29c1eb7fd494babefa05037841259": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "CheckboxModel", "state": { "description": "Errors", "disabled": false, "layout": "IPY_MODEL_9fca8922d6a84010a73ddb46f2713c40", "style": "IPY_MODEL_3501c6717de1410aba4274dec484dde0", "value": false } }, "6b1a08b14f2647c3aace0739e77581de": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "6c4dcc259efa4621aac46f4703595e4d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "SelectModel", "state": { "_options_labels": [ "" ], "description": "Features:", "index": 0, "layout": "IPY_MODEL_2982cc6bc30940ff96f2f9131a4a6241", "rows": 1, "style": "IPY_MODEL_c0a2f4ee45914dcaa1a8bdacac5046ed" } }, "6ee890b9a11c4ce0868fc8da9b510720": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "6f384b6b080b4a72bfaae3920f9b7163": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_88d0c8c574214d258d52e6cf10c90587", "IPY_MODEL_8c242c24558644d68a3fa12cc2d805ba" ], "layout": "IPY_MODEL_a05f399be93e4461a73ff1e852749db5" } }, "71588c1ad11e42df844dff42b5ab041d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "IntTextModel", "state": { "description": "Feature to show:", "layout": "IPY_MODEL_136345188d7d4eeb97ad63b4e39206c0", "step": 1, "style": "IPY_MODEL_364a4cc16b974d61b20102f7cbd4e9fe" } }, "733f45e0a1c44fe1aa0aca4ee87c5217": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "788f81e5b21a4638b040e17ac78b8ce6": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "79f332bd05a2497eb63b8f6cc6acf8a3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "7db6e0d0198d45f98e8c5a6f08d0791b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "CheckboxModel", "state": { "description": "Visible", "disabled": false, "layout": "IPY_MODEL_9fca8922d6a84010a73ddb46f2713c40", "style": "IPY_MODEL_df5e3f91eea7415a888271f8fc68f9a5", "value": true } }, "8193e107e49f49dda781c456011d9a78": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "SelectModel", "state": { "_options_labels": [ "", "Accent", "Accent_r", "Blues", "Blues_r", "BrBG", "BrBG_r", "BuGn", "BuGn_r", "BuPu", "BuPu_r", "CMRmap", "CMRmap_r", "Dark2", "Dark2_r", "GnBu", "GnBu_r", "Greens", "Greens_r", "Greys", "Greys_r", "OrRd", "OrRd_r", "Oranges", "Oranges_r", "PRGn", "PRGn_r", "Paired", "Paired_r", "Pastel1", "Pastel1_r", "Pastel2", "Pastel2_r", "PiYG", "PiYG_r", "PuBu", "PuBuGn", "PuBuGn_r", "PuBu_r", "PuOr", "PuOr_r", "PuRd", "PuRd_r", "Purples", "Purples_r", "RdBu", "RdBu_r", "RdGy", "RdGy_r", "RdPu", "RdPu_r", "RdYlBu", "RdYlBu_r", "RdYlGn", "RdYlGn_r", "Reds", "Reds_r", "Set1", "Set1_r", "Set2", "Set2_r", "Set3", "Set3_r", "Spectral", "Spectral_r", "Vega10", "Vega10_r", "Vega20", "Vega20_r", "Vega20b", "Vega20b_r", "Vega20c", "Vega20c_r", "Wistia", "Wistia_r", "YlGn", "YlGnBu", "YlGnBu_r", "YlGn_r", "YlOrBr", "YlOrBr_r", "YlOrRd", "YlOrRd_r", "afmhot", "afmhot_r", "autumn", "autumn_r", "binary", "binary_r", "bone", "bone_r", "brg", "brg_r", "bwr", "bwr_r", "cool", "cool_r", "coolwarm", "coolwarm_r", "copper", "copper_r", "cubehelix", "cubehelix_r", "flag", "flag_r", "gist_earth", "gist_earth_r", "gist_gray", "gist_gray_r", "gist_heat", "gist_heat_r", "gist_ncar", "gist_ncar_r", "gist_rainbow", "gist_rainbow_r", "gist_stern", "gist_stern_r", "gist_yarg", "gist_yarg_r", "gnuplot", "gnuplot2", "gnuplot2_r", "gnuplot_r", "gray", "gray_r", "hot", "hot_r", "hsv", "hsv_r", "inferno", "inferno_r", "jet", "jet_r", "magma", "magma_r", "nipy_spectral", "nipy_spectral_r", "ocean", "ocean_r", "pink", "pink_r", "plasma", "plasma_r", "prism", "prism_r", "rainbow", "rainbow_r", "seismic", "seismic_r", "spectral", "spectral_r", "spring", "spring_r", "summer", "summer_r", "tab10", "tab10_r", "tab20", "tab20_r", "tab20b", "tab20b_r", "tab20c", "tab20c_r", "terrain", "terrain_r", "viridis", "viridis_r", "winter", "winter_r" ], "description": "Colormap:", "index": 0, "layout": "IPY_MODEL_9fca8922d6a84010a73ddb46f2713c40", "rows": 1, "style": "IPY_MODEL_a19b7c9088874ddaaf2efd2bce456ef7" } }, "838f5f2263084d2eafad4d9a12fc3e7f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "861d8540f11944d8995a9f5c1385c829": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "25%" } }, "86f142406e04427da6205fa66bac9620": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "88d0c8c574214d258d52e6cf10c90587": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "IntSliderModel", "state": { "continuous_update": false, "description": "Dataset index", "layout": "IPY_MODEL_b14873fb0b8347d2a1083d59fba8ad54", "max": 3, "style": "IPY_MODEL_402fa77b803048b2990b273187598d95", "value": 3 } }, "89b2034ca3124ff6848b20fb84a1a342": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "8bdd74f89a3043e792eabd6a6226a6ab": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "8c242c24558644d68a3fa12cc2d805ba": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "LabelModel", "state": { "layout": "IPY_MODEL_4e5807bdbf3d4dc2b611e26fa56b6101", "style": "IPY_MODEL_486e1a6b578b44b397b02f1dbafc907b", "value": "of 4" } }, "9b5de2cdaeba4cc2be73572dc68dd1e9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "VBoxModel", "state": { "children": [ "IPY_MODEL_b985873afa7a4297b6a3f47c5d6cdb89", "IPY_MODEL_d5b406961ccc42458002f37052e3d0a9", "IPY_MODEL_dea0a485bad246ce9e6f5273e581c7cf", "IPY_MODEL_15efb7a6a85b429c857fdc8e18c154c7" ], "layout": "IPY_MODEL_21191f7705374908a284ccf55829951c" } }, "9bfc7d1321df402ebac286b2c8b7a47d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "icon": "fast-backward", "layout": "IPY_MODEL_cc692e9fd5a3487ba19794423c815e29", "style": "IPY_MODEL_e7e084ac53694252b14094ad1bc1affd" } }, "9fca8922d6a84010a73ddb46f2713c40": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "a05f399be93e4461a73ff1e852749db5": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "height": "40px" } }, "a19b7c9088874ddaaf2efd2bce456ef7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "a836973f20574c71b33aa3cef64e7f1e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "FloatTextModel", "state": { "description": "Rightmost color maps to:", "layout": "IPY_MODEL_d32a5abd74134a4686d75e191a1533cb", "step": null, "style": "IPY_MODEL_ac548405c8af4ee7a8ab8c38abae38c9", "value": 1 } }, "aa04171bbaa9441db93e9a7e35d43065": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "CheckboxModel", "state": { "description": "Show Targets", "disabled": false, "layout": "IPY_MODEL_9fca8922d6a84010a73ddb46f2713c40", "style": "IPY_MODEL_838f5f2263084d2eafad4d9a12fc3e7f", "value": false } }, "ac548405c8af4ee7a8ab8c38abae38c9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "b0b819e6de95419a9eeb8a0002353ee1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "HTMLModel", "state": { "layout": "IPY_MODEL_cc030e35783e49339e05ba715ee14e62", "style": "IPY_MODEL_de9d6e453fa14e79b965a4501ff69845", "value": "" } }, "b14873fb0b8347d2a1083d59fba8ad54": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "b6d05976b5cb40ff8a4ddee3c5a861d9": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "b80cb0ae61994a978597829f7b6aa2c0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "b985873afa7a4297b6a3f47c5d6cdb89": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "AccordionModel", "state": { "_titles": { "0": "XOR" }, "children": [ "IPY_MODEL_ba1ed22eb0b542c0a6826001b434a399" ], "layout": "IPY_MODEL_2aa5894453424c4aacf351dd8c8ab922", "selected_index": null } }, "b9be5483405141b88cf18e7d4f4963de": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_aa04171bbaa9441db93e9a7e35d43065", "IPY_MODEL_66e29c1eb7fd494babefa05037841259" ], "layout": "IPY_MODEL_6b1a08b14f2647c3aace0739e77581de" } }, "ba1ed22eb0b542c0a6826001b434a399": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "HBoxModel", "state": { "children": [ "IPY_MODEL_3156b5f6d28642bd9633e8e5518c9097", "IPY_MODEL_326c868bba2744109476ec1a641314b3" ], "layout": "IPY_MODEL_4479c1d8a9d74da1800e20711176fe1a" } }, "be9a58a938b645908d3b2fdf7158906c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "bea9ec4c51724a9797030debbd44b595": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "SliderStyleModel", "state": { "description_width": "" } }, "bf5310d62e034c2582830a2037a8b002": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "initial" } }, "c0a2f4ee45914dcaa1a8bdacac5046ed": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "c22302df51a94a2280910415876239df": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "c491fff0bf9f47339ab116e4a2b728c9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "icon": "fast-forward", "layout": "IPY_MODEL_63880f7d52ea4c7da360d2269be5cbd2", "style": "IPY_MODEL_b80cb0ae61994a978597829f7b6aa2c0" } }, "c712050936334e1d859ad0bdbba33a50": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "IntTextModel", "state": { "description": "Feature columns:", "layout": "IPY_MODEL_be9a58a938b645908d3b2fdf7158906c", "step": 1, "style": "IPY_MODEL_788f81e5b21a4638b040e17ac78b8ce6", "value": 3 } }, "cc030e35783e49339e05ba715ee14e62": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "cc692e9fd5a3487ba19794423c815e29": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "d32a5abd74134a4686d75e191a1533cb": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "d5b406961ccc42458002f37052e3d0a9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "VBoxModel", "state": { "children": [ "IPY_MODEL_6f384b6b080b4a72bfaae3920f9b7163", "IPY_MODEL_137cc55f71044b329686552e4d5ed5fe" ], "layout": "IPY_MODEL_c22302df51a94a2280910415876239df" } }, "da640a5ac3bc4a59ab8a82bc8fcbf746": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "dd45f7f9734f48fba70aaf8ae65dbb97": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "IntTextModel", "state": { "description": "Horizontal space between banks:", "layout": "IPY_MODEL_9fca8922d6a84010a73ddb46f2713c40", "step": 1, "style": "IPY_MODEL_bf5310d62e034c2582830a2037a8b002", "value": 150 } }, "dd4b1f529c7941569816da9769084b90": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "IntTextModel", "state": { "layout": "IPY_MODEL_86f142406e04427da6205fa66bac9620", "step": 1, "style": "IPY_MODEL_89b2034ca3124ff6848b20fb84a1a342", "value": 3 } }, "de9d6e453fa14e79b965a4501ff69845": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "dea0a485bad246ce9e6f5273e581c7cf": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "HTMLModel", "state": { "layout": "IPY_MODEL_16832b10a05e46b19183f1726ed80faf", "style": "IPY_MODEL_3b7e0bdd891743bda0dd4a9d15dd0a42", "value": "

\n \n \n \n \n XORLayer: output (output)\n shape = (1,)\n Keras class = Dense\n activation = sigmoidoutputWeights from hidden to output\n output/kernel:0 has shape (5, 1)\n output/bias:0 has shape (1,)Layer: hidden (hidden)\n shape = (5,)\n Keras class = Dense\n activation = sigmoidhiddenWeights from input to hidden\n hidden/kernel:0 has shape (2, 5)\n hidden/bias:0 has shape (5,)Layer: input (input)\n shape = (2,)\n Keras class = Inputinput

" } }, "df5e3f91eea7415a888271f8fc68f9a5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "e4910a4128764aad9d412609da7c9a53": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "e7e084ac53694252b14094ad1bc1affd": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "eba95634dd3241f2911fc17342ddf924": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "f3801cae672644048cd4eb49c89f6fb5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "icon": "backward", "layout": "IPY_MODEL_8bdd74f89a3043e792eabd6a6226a6ab", "style": "IPY_MODEL_15dbc9bb00744ca8a4613fd572a49fc0" } }, "f5e9b479caa3491496610a1bca70f6f6": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "width": "100%" } }, "f6b3e8fc467742ac88c9cf3bf03cfa03": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "height": "50px", "width": "100%" } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 2 }