From 2f7063b70d493c29d72babdcbe3f55e182a2332d Mon Sep 17 00:00:00 2001 From: Victor Mylle Date: Mon, 17 Apr 2023 15:52:19 +0000 Subject: [PATCH] Some fixes --- export_model.py | 66 ++++++++++++++++++++++++++ hyperparam_opt.py | 45 ++++++++++++++---- notebooks/visualize_embeddings.ipynb | 69 ++++++++++++---------------- requirements.txt | 4 +- train.py | 25 +++++++--- train.sh | 10 ++-- 6 files changed, 158 insertions(+), 61 deletions(-) create mode 100644 export_model.py diff --git a/export_model.py b/export_model.py new file mode 100644 index 0000000..126a6d8 --- /dev/null +++ b/export_model.py @@ -0,0 +1,66 @@ +import numpy as np +import onnx +import torch +import torchvision + +from models.spoter_embedding_model import SPOTER_EMBEDDINGS + +# set parameters of the model +model_name = 'embedding_model' +output=32 + +# load PyTorch model from .pth file + +device = torch.device("cpu") +if torch.cuda.is_available(): + device = torch.device("cuda") + +CHECKPOINT_PATH = "out-checkpoints/augment_rotate_75_x8/checkpoint_embed_1105.pth" +checkpoint = torch.load(CHECKPOINT_PATH, map_location=device) + +model = SPOTER_EMBEDDINGS( + features=checkpoint["config_args"].vector_length, + hidden_dim=checkpoint["config_args"].hidden_dim, + norm_emb=checkpoint["config_args"].normalize_embeddings, +).to(device) +model.load_state_dict(checkpoint["state_dict"]) +# set model to evaluation mode +model.eval() + +model_export = "onnx" +if model_export == "coreml": + dummy_input = torch.randn(1, 10, 54, 2) + traced_model = torch.jit.trace(model, dummy_input) + out = traced_model(dummy_input) + import coremltools as ct + + # Convert to Core ML + coreml_model = ct.convert( + traced_model, + inputs=[ct.TensorType(name="input", shape=dummy_input.shape)], + ) + + # Save Core ML model + coreml_model.save("models/" + model_name + ".mlmodel") +else: + # create dummy input tensor + dummy_input = torch.randn(1, 10, 54, 2) + + # export model to ONNX format + output_file = 'models/' + model_name + '.onnx' + torch.onnx.export(model, dummy_input, output_file, input_names=['input'], output_names=['output']) + + torch.onnx.export(model, # model being run + dummy_input, # model input (or a tuple for multiple inputs) + 'output-models/' + model_name + '.onnx', # where to save the model (can be a file or file-like object) + export_params=True, # store the trained parameter weights inside the model file + opset_version=9, # the ONNX version to export the model to + do_constant_folding=True, # whether to execute constant folding for optimization + input_names = ['X'], # the model's input names + output_names = ['Y'] # the model's output names + ) + + + # load exported ONNX model for verification + onnx_model = onnx.load(output_file) + onnx.checker.check_model(onnx_model) \ No newline at end of file diff --git a/hyperparam_opt.py b/hyperparam_opt.py index d46098d..a7caabe 100644 --- a/hyperparam_opt.py +++ b/hyperparam_opt.py @@ -1,7 +1,7 @@ from clearml.automation import UniformParameterRange, UniformIntegerParameterRange, DiscreteParameterRange from clearml.automation import HyperParameterOptimizer from clearml.automation.optuna import OptimizerOptuna - +from optuna.pruners import HyperbandPruner, MedianPruner from clearml import Task task = Task.init( @@ -17,19 +17,19 @@ optimizer = HyperParameterOptimizer( base_task_id="4504e0b3ec6745249d3d4c94d3d40652", # setting the hyperparameters to optimize hyper_parameters=[ - # epochs - UniformIntegerParameterRange('Args/epochs', 200, 800), + # epochs: + DiscreteParameterRange('Args/epochs', [200]), # learning rate - UniformParameterRange('Args/lr', 0.000001, 0.1), + UniformParameterRange('Args/lr', 0.000001, 0.01), # optimizer DiscreteParameterRange('Args/optimizer', ['ADAM', 'SGD']), # vector length UniformIntegerParameterRange('Args/vector_length', 10, 100), ], # setting the objective metric we want to maximize/minimize - objective_metric_title='silhouette_coefficient', - objective_metric_series='val', - objective_metric_sign='max', + objective_metric_title='train_loss', + objective_metric_series='loss', + objective_metric_sign='min', # setting optimizer optimizer_class=OptimizerOptuna, @@ -40,7 +40,34 @@ optimizer = HyperParameterOptimizer( compute_time_limit=480, total_max_jobs=20, min_iteration_per_job=0, - max_iteration_per_job=150000, + max_iteration_per_job=150000, + pool_period_min=0.1, + + save_top_k_tasks_only=3, + optuna_pruner=MedianPruner(), + ) -task.execute_remotely(queue_name='default', exit_process=True) +def job_complete_callback( + job_id, # type: str + objective_value, # type: float + objective_iteration, # type: int + job_parameters, # type: dict + top_performance_job_id # type: str +): + print('Job completed!', job_id, objective_value, objective_iteration, job_parameters) + if job_id == top_performance_job_id: + print('WOOT WOOT we broke the record! Objective reached {}'.format(objective_value)) + +task.execute_remotely(queue_name='hypertuning', exit_process=True) + +optimizer.set_report_period(0.3) + +optimizer.start(job_complete_callback=job_complete_callback) + +optimizer.wait() + +top_exp = optimizer.get_top_experiments(top_k=3) +print([t.id for t in top_exp]) + +optimizer.stop() \ No newline at end of file diff --git a/notebooks/visualize_embeddings.ipynb b/notebooks/visualize_embeddings.ipynb index 84ebdff..b0d979c 100644 --- a/notebooks/visualize_embeddings.ipynb +++ b/notebooks/visualize_embeddings.ipynb @@ -2,19 +2,10 @@ "cells": [ { "cell_type": "code", - "execution_count": 30, + "execution_count": 1, "id": "8ef5cd92", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The autoreload extension is already loaded. To reload it, use:\n", - " %reload_ext autoreload\n" - ] - } - ], + "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" @@ -22,7 +13,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 2, "id": "78c4643a", "metadata": {}, "outputs": [], @@ -37,7 +28,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 3, "id": "ffba4333", "metadata": {}, "outputs": [], @@ -47,7 +38,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 4, "id": "5bc81f71", "metadata": {}, "outputs": [], @@ -57,7 +48,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 5, "id": "3de8bcf2", "metadata": { "lines_to_next_cell": 0 @@ -73,7 +64,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 6, "id": "91a045ba", "metadata": {}, "outputs": [], @@ -93,17 +84,17 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 7, "id": "bc50c296", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 36, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -124,7 +115,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 8, "id": "82766a17", "metadata": {}, "outputs": [], @@ -138,7 +129,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 41, "id": "ead15a36", "metadata": {}, "outputs": [ @@ -148,7 +139,7 @@ "" ] }, - "execution_count": 38, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } @@ -160,7 +151,7 @@ "# checkpoint = torch.load(model.get_weights())\n", "\n", "\n", - "CHECKPOINT_PATH = \"../out-checkpoints/augment_rotate_75_x8/checkpoint_embed_1105.pth\"\n", + "CHECKPOINT_PATH = \"../out-checkpoints/augment_rotate_75_x8/checkpoint_embed_197.pth\"\n", "checkpoint = torch.load(CHECKPOINT_PATH, map_location=device)\n", "\n", "\n", @@ -175,7 +166,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 42, "id": "20f8036d", "metadata": {}, "outputs": [], @@ -190,13 +181,13 @@ " split_dataset_path = \"WLASL100_{}.csv\"\n", "elif SL_DATASET == 'basic-signs':\n", " dataset_name = \"basic-signs\"\n", - " split_dataset_path = \"basic-signs_{}.csv\"\n", + " split_dataset_path = \"{}.csv\"\n", " " ] }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 43, "id": "758716b6", "metadata": {}, "outputs": [], @@ -216,7 +207,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 44, "id": "f1527959", "metadata": {}, "outputs": [ @@ -266,7 +257,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 45, "id": "3c3af5bf", "metadata": { "lines_to_next_cell": 0 @@ -275,10 +266,10 @@ { "data": { "text/plain": [ - "164" + "143" ] }, - "execution_count": 43, + "execution_count": 45, "metadata": {}, "output_type": "execute_result" } @@ -303,7 +294,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 46, "id": "dccbe1b9", "metadata": {}, "outputs": [], @@ -326,7 +317,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 47, "id": "904298f0", "metadata": {}, "outputs": [], @@ -340,7 +331,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 48, "id": "42832f7c", "metadata": { "scrolled": false @@ -351,7 +342,7 @@ "text/html": [ "
\n", " \n", - " Loading BokehJS ...\n", + " Loading BokehJS ...\n", "
\n" ] }, @@ -360,7 +351,7 @@ }, { "data": { - "application/javascript": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n // Clean up Bokeh references\n if (id != null && id in Bokeh.index) {\n Bokeh.index[id].model.document.clear();\n delete Bokeh.index[id];\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim();\n if (id in Bokeh.index) {\n Bokeh.index[id].model.document.clear();\n delete Bokeh.index[id];\n }\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded() {\n const el = document.getElementById(\"1368\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.3.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\nif (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(\"1368\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));", + "application/javascript": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n // Clean up Bokeh references\n if (id != null && id in Bokeh.index) {\n Bokeh.index[id].model.document.clear();\n delete Bokeh.index[id];\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim();\n if (id in Bokeh.index) {\n Bokeh.index[id].model.document.clear();\n delete Bokeh.index[id];\n }\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded() {\n const el = document.getElementById(\"1506\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.3.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\nif (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(\"1506\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));", "application/vnd.bokehjs_load.v0+json": "" }, "metadata": {}, @@ -403,7 +394,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 49, "id": "ead4daf7", "metadata": { "scrolled": false @@ -413,7 +404,7 @@ "data": { "text/html": [ "\n", - "
\n" + "
\n" ] }, "metadata": {}, @@ -421,12 +412,12 @@ }, { "data": { - "application/javascript": "(function(root) {\n function embed_document(root) {\n const docs_json = {\"8ca9adeb-5053-419f-ac22-431834c16cd9\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1380\"}],\"center\":[{\"id\":\"1383\"},{\"id\":\"1387\"},{\"id\":\"1421\"}],\"height\":800,\"left\":[{\"id\":\"1384\"}],\"renderers\":[{\"id\":\"1409\"}],\"title\":{\"id\":\"1370\"},\"toolbar\":{\"id\":\"1396\"},\"width\":1000,\"x_range\":{\"id\":\"1372\"},\"x_scale\":{\"id\":\"1376\"},\"y_range\":{\"id\":\"1374\"},\"y_scale\":{\"id\":\"1378\"}},\"id\":\"1369\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1367\"}},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1367\"}},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1367\"}},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1407\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Check label by hovering mouse over the dots\"},\"id\":\"1370\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1388\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1418\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1416\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1367\"}},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1367\"}},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1367\"}},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1408\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"items\":[{\"id\":\"1422\"}]},\"id\":\"1421\",\"type\":\"Legend\"},{\"attributes\":{\"tools\":[{\"id\":\"1388\"},{\"id\":\"1389\"},{\"id\":\"1390\"},{\"id\":\"1391\"},{\"id\":\"1392\"},{\"id\":\"1393\"},{\"id\":\"1395\"}]},\"id\":\"1396\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1372\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1419\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1376\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1385\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"label\":[0,1,2,3,4,1,2,3,2,6,5,0,7,7,8,2,9,2,4,2,8,4,1,10,3,11,10,12,4,9,13,0,10,11,5,8,8,13,6,9,2,3,13,14,3,14,9,6,8,3,7,1,7,11,0,5,5,5,6,4,11,2,10,11,4,7,3,10,9,6,9,12,7,11,12,2,9,1,12,10,11,13,9,13,13,14,6,1,9,8,1,10,2,5,9,0,1,8,6,4,0,6,5,11,4,7,14,12,14,6,0,10,9,11,0,8,9,7,4,5,8,6,14,10,3,10,9,9,14,8,9,0,5,2,12,11,6,2,8,10,4,8,1,13,1,4,4,11,12,14,0,1,2,12,14,13,6,7,3,7,5,13,0,1],\"label_desc\":[\"TOT-ZIENS\",\"GOED\",\"GOEDENACHT\",\"NEE\",\"SLECHT\",\"GOED\",\"GOEDENACHT\",\"NEE\",\"GOEDENACHT\",\"JA\",\"GOEDEMORGEN\",\"TOT-ZIENS\",\"SORRY\",\"SORRY\",\"SMAKELIJK\",\"GOEDENACHT\",\"RECHTS\",\"GOEDENACHT\",\"SLECHT\",\"GOEDENACHT\",\"SMAKELIJK\",\"SLECHT\",\"GOED\",\"GOEDENAVOND\",\"NEE\",\"SALUUT\",\"GOEDENAVOND\",\"BEDANKEN\",\"SLECHT\",\"RECHTS\",\"LINKS\",\"TOT-ZIENS\",\"GOEDENAVOND\",\"SALUUT\",\"GOEDEMORGEN\",\"SMAKELIJK\",\"SMAKELIJK\",\"LINKS\",\"JA\",\"RECHTS\",\"GOEDENACHT\",\"NEE\",\"LINKS\",\"GOEDEMIDDAG\",\"NEE\",\"GOEDEMIDDAG\",\"RECHTS\",\"JA\",\"SMAKELIJK\",\"NEE\",\"SORRY\",\"GOED\",\"SORRY\",\"SALUUT\",\"TOT-ZIENS\",\"GOEDEMORGEN\",\"GOEDEMORGEN\",\"GOEDEMORGEN\",\"JA\",\"SLECHT\",\"SALUUT\",\"GOEDENACHT\",\"GOEDENAVOND\",\"SALUUT\",\"SLECHT\",\"SORRY\",\"NEE\",\"GOEDENAVOND\",\"RECHTS\",\"JA\",\"RECHTS\",\"BEDANKEN\",\"SORRY\",\"SALUUT\",\"BEDANKEN\",\"GOEDENACHT\",\"RECHTS\",\"GOED\",\"BEDANKEN\",\"GOEDENAVOND\",\"SALUUT\",\"LINKS\",\"RECHTS\",\"LINKS\",\"LINKS\",\"GOEDEMIDDAG\",\"JA\",\"GOED\",\"RECHTS\",\"SMAKELIJK\",\"GOED\",\"GOEDENAVOND\",\"GOEDENACHT\",\"GOEDEMORGEN\",\"RECHTS\",\"TOT-ZIENS\",\"GOED\",\"SMAKELIJK\",\"JA\",\"SLECHT\",\"TOT-ZIENS\",\"JA\",\"GOEDEMORGEN\",\"SALUUT\",\"SLECHT\",\"SORRY\",\"GOEDEMIDDAG\",\"BEDANKEN\",\"GOEDEMIDDAG\",\"JA\",\"TOT-ZIENS\",\"GOEDENAVOND\",\"RECHTS\",\"SALUUT\",\"TOT-ZIENS\",\"SMAKELIJK\",\"RECHTS\",\"SORRY\",\"SLECHT\",\"GOEDEMORGEN\",\"SMAKELIJK\",\"JA\",\"GOEDEMIDDAG\",\"GOEDENAVOND\",\"NEE\",\"GOEDENAVOND\",\"RECHTS\",\"RECHTS\",\"GOEDEMIDDAG\",\"SMAKELIJK\",\"RECHTS\",\"TOT-ZIENS\",\"GOEDEMORGEN\",\"GOEDENACHT\",\"BEDANKEN\",\"SALUUT\",\"JA\",\"GOEDENACHT\",\"SMAKELIJK\",\"GOEDENAVOND\",\"SLECHT\",\"SMAKELIJK\",\"GOED\",\"LINKS\",\"GOED\",\"SLECHT\",\"SLECHT\",\"SALUUT\",\"BEDANKEN\",\"GOEDEMIDDAG\",\"TOT-ZIENS\",\"GOED\",\"GOEDENACHT\",\"BEDANKEN\",\"GOEDEMIDDAG\",\"LINKS\",\"JA\",\"SORRY\",\"NEE\",\"SORRY\",\"GOEDEMORGEN\",\"LINKS\",\"TOT-ZIENS\",\"GOED\"],\"labels\":[0,1,2,3,4,1,2,3,2,6,5,0,7,7,8,2,9,2,4,2,8,4,1,10,3,11,10,12,4,9,13,0,10,11,5,8,8,13,6,9,2,3,13,14,3,14,9,6,8,3,7,1,7,11,0,5,5,5,6,4,11,2,10,11,4,7,3,10,9,6,9,12,7,11,12,2,9,1,12,10,11,13,9,13,13,14,6,1,9,8,1,10,2,5,9,0,1,8,6,4,0,6,5,11,4,7,14,12,14,6,0,10,9,11,0,8,9,7,4,5,8,6,14,10,3,10,9,9,14,8,9,0,5,2,12,11,6,2,8,10,4,8,1,13,1,4,4,11,12,14,0,1,2,12,14,13,6,7,3,7,5,13,0,1],\"split\":[\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\"],\"x\":{\"__ndarray__\":\"TI2JP4Cspr8K+Yc/DrgbQPNtnsBmVIE/HdmIP6zwXUCp/8Q/ZL+cQGWpK8ATig8/bsaWv/Yi178IG4w8UPeEP/VnikDEzfg/Oe+4wMmzlD/JyR0+owQIwHLlnj+ShTnApg/tP6BbpMB0jIE+A7PpPhqgpcD+b0NA6mXFQCq4AD9ctvq/VJtawCDEfMBcXba+6n7TP37txED1t4BAFXZZQKppsj9OdYo/xL3PQMesY8D41ghA2do8wAbklECdtmpAOAWTPrVQ7T+Bzqm/4LXKPzR0Vr+Nz5PAr5qHv/QB7D5trULAnx19wPMaj0BXQdXAncO2wGOfbD6cGtW/LRJfwC5LwMAs6QTAmNG7P48wQ8BZ05NA/mtbQOea5T82Xre/IRd+v6OcksB5976+4/KZvfzJm0BsePU/vUhYv3FwpL92k5/AiyvXQExpnUBqf8pAV4bfQJL2H79bqZNAC3BBQJFmlEDvAYo//og4QI7OO7/zYgNAGYeSP1tJC0Dzn44/2xdsQGoDrL+sdCVAtZ7UwE1BEj4Px49AOM1ywCPSqcBLlpzATgfWv/yqWsCxdfy+dfMrwICP+z+JT5O/XdDnv4mMckAiJKTA7Yrgvpw1g79k8ZBAmXUXwH62z8ANE3HAbzwIwAuLl0BYPLC/uzoJwIJeMz9AbBq/qa3VP0CLsEDBUzs+pdgawBTfYEB6Xho+3eg5wFED3j9CU7y/f7KbwO0hEUAf0o++VmqOv0yByz6sqr/AnMIZQJLPckDTueNAmCAzQG9Tv8DIo87AJgApwBU/9L/xqd++LBiYv6zxZEBoSxK9TzE1v4cHg8A9pNdAuXjqP4lBtr/6twY/MksGwHoTQb+cGeNA0OcEPjc2LUA=\",\"dtype\":\"float32\",\"order\":\"little\",\"shape\":[164]},\"y\":{\"__ndarray__\":\"l+8ZwXSNLcFDlKxAqCfFwMyh4D8sjgPBKTN5QJNKmcCFaWpA3s2YwFh0AkGiwBbBFP0gQa9WG0ExngbBkw+qQKRG6L8w7bNA7aFVP3dktUC0YhrAyCYMwQV/BMF+awJAbG+owD8fm0DPpV7AnEWkvedbG0Bz0l+/B74zv3ebIMHqRFI+Tz2XQB9RBz5QuPjAD7kwwfo6Lr/T1gDBEURbv0ZuokBawU3AWod5v1zzf0BQPsTAbKBmQHM0ib/Cvs7AZJIQwdE10MDvBRZBy4fZwLCfHkErbp1Ad58gwTUPPb+RtehAEpuHvB/c98A6RGk/nrywQD3DlkAHjzXANi6kQGAKBkBTphJB6oKgwNlMtD6fUh++7+AFwVAHG7/XqNK/nMMYQYVasUClZBrA40MyQFcMt70OlRDBh8ZVwMaUYb/IM4hAprmGv8T647+NtZO/QVSRv7a/tj/Rr7fAcD0hwcwJAj+VjjLBgYsfwYwaX8BP55NA281MQPWeLb9B1B3BxxUwwQM3Vj+oVvfAq6+aP5bnGMGYSpHAzwJ9PxG/skDdOMI/jM8hQV80XUAUaDzAaMZQQICiDcHluBbBkpZdvxwHub57WapAB2gSwceyAsE4v3g/dtwSQRRypT/iUR1A9bYCQaNvz8DRqgFAawC4vgbB4sA5XoHAGEn1v7MWEcCjoLc+LzW+v8/ZLcAbhR/BNFf8QNdjkEB8o9i+rpaKQH3HHcEWNAxBfTHVwIbImsCjDaQ/ovMywXcFL8EPojDAOY8pwR1QOD9PaQJAQ559QLY/F8DigKY/tPgTwZ9sL8FaNG5ARz6Hv5u6pUB/2cW/hHX+wGnJIkEsQczA9CUbQfa+ID4LajDAlJEiwSVlCcE=\",\"dtype\":\"float32\",\"order\":\"little\",\"shape\":[164]}},\"selected\":{\"id\":\"1419\"},\"selection_policy\":{\"id\":\"1418\"}},\"id\":\"1404\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1404\"},\"glyph\":{\"id\":\"1406\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1408\"},\"nonselection_glyph\":{\"id\":\"1407\"},\"view\":{\"id\":\"1410\"}},\"id\":\"1409\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1374\",\"type\":\"DataRange1d\"},{\"attributes\":{\"callback\":null,\"tooltips\":\"\\n
\\n \\n
\\n @label_desc - @split\\n [#@video_id]\\n
\\n
\\n \\n\"},\"id\":\"1395\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1414\",\"type\":\"AllLabels\"},{\"attributes\":{\"label\":{\"field\":\"label_desc\"},\"renderers\":[{\"id\":\"1409\"}]},\"id\":\"1422\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"1389\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"1394\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1393\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1381\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1416\"},\"group\":null,\"major_label_policy\":{\"id\":\"1417\"},\"ticker\":{\"id\":\"1381\"}},\"id\":\"1380\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1380\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1383\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1367\"}},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1367\"}},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1367\"}},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1406\",\"type\":\"Scatter\"},{\"attributes\":{\"axis\":{\"id\":\"1384\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1387\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1392\",\"type\":\"ResetTool\"},{\"attributes\":{\"high\":15,\"low\":0,\"palette\":[\"#30123b\",\"#311542\",\"#32184a\",\"#341b51\",\"#351e58\",\"#36215f\",\"#372365\",\"#38266c\",\"#392972\",\"#3a2c79\",\"#3b2f7f\",\"#3c3285\",\"#3c358b\",\"#3d3791\",\"#3e3a96\",\"#3f3d9c\",\"#4040a1\",\"#4043a6\",\"#4145ab\",\"#4148b0\",\"#424bb5\",\"#434eba\",\"#4350be\",\"#4353c2\",\"#4456c7\",\"#4458cb\",\"#455bce\",\"#455ed2\",\"#4560d6\",\"#4563d9\",\"#4666dd\",\"#4668e0\",\"#466be3\",\"#466de6\",\"#4670e8\",\"#4673eb\",\"#4675ed\",\"#4678f0\",\"#467af2\",\"#467df4\",\"#467ff6\",\"#4682f8\",\"#4584f9\",\"#4587fb\",\"#4589fc\",\"#448cfd\",\"#438efd\",\"#4291fe\",\"#4193fe\",\"#4096fe\",\"#3f98fe\",\"#3e9bfe\",\"#3c9dfd\",\"#3ba0fc\",\"#39a2fc\",\"#38a5fb\",\"#36a8f9\",\"#34aaf8\",\"#33acf6\",\"#31aff5\",\"#2fb1f3\",\"#2db4f1\",\"#2bb6ef\",\"#2ab9ed\",\"#28bbeb\",\"#26bde9\",\"#25c0e6\",\"#23c2e4\",\"#21c4e1\",\"#20c6df\",\"#1ec9dc\",\"#1dcbda\",\"#1ccdd7\",\"#1bcfd4\",\"#1ad1d2\",\"#19d3cf\",\"#18d5cc\",\"#18d7ca\",\"#17d9c7\",\"#17dac4\",\"#17dcc2\",\"#17debf\",\"#18e0bd\",\"#18e1ba\",\"#19e3b8\",\"#1ae4b6\",\"#1be5b4\",\"#1de7b1\",\"#1ee8af\",\"#20e9ac\",\"#22eba9\",\"#24eca6\",\"#27eda3\",\"#29eea0\",\"#2cef9d\",\"#2ff09a\",\"#32f197\",\"#35f394\",\"#38f491\",\"#3bf48d\",\"#3ff58a\",\"#42f687\",\"#46f783\",\"#4af880\",\"#4df97c\",\"#51f979\",\"#55fa76\",\"#59fb72\",\"#5dfb6f\",\"#61fc6c\",\"#65fc68\",\"#69fd65\",\"#6dfd62\",\"#71fd5f\",\"#74fe5c\",\"#78fe59\",\"#7cfe56\",\"#80fe53\",\"#84fe50\",\"#87fe4d\",\"#8bfe4b\",\"#8efe48\",\"#92fe46\",\"#95fe44\",\"#98fe42\",\"#9bfd40\",\"#9efd3e\",\"#a1fc3d\",\"#a4fc3b\",\"#a6fb3a\",\"#a9fb39\",\"#acfa37\",\"#aef937\",\"#b1f836\",\"#b3f835\",\"#b6f735\",\"#b9f534\",\"#bbf434\",\"#bef334\",\"#c0f233\",\"#c3f133\",\"#c5ef33\",\"#c8ee33\",\"#caed33\",\"#cdeb34\",\"#cfea34\",\"#d1e834\",\"#d4e735\",\"#d6e535\",\"#d8e335\",\"#dae236\",\"#dde036\",\"#dfde36\",\"#e1dc37\",\"#e3da37\",\"#e5d838\",\"#e7d738\",\"#e8d538\",\"#ead339\",\"#ecd139\",\"#edcf39\",\"#efcd39\",\"#f0cb3a\",\"#f2c83a\",\"#f3c63a\",\"#f4c43a\",\"#f6c23a\",\"#f7c039\",\"#f8be39\",\"#f9bc39\",\"#f9ba38\",\"#fab737\",\"#fbb537\",\"#fbb336\",\"#fcb035\",\"#fcae34\",\"#fdab33\",\"#fda932\",\"#fda631\",\"#fda330\",\"#fea12f\",\"#fe9e2e\",\"#fe9b2d\",\"#fe982c\",\"#fd952b\",\"#fd9229\",\"#fd8f28\",\"#fd8c27\",\"#fc8926\",\"#fc8624\",\"#fb8323\",\"#fb8022\",\"#fa7d20\",\"#fa7a1f\",\"#f9771e\",\"#f8741c\",\"#f7711b\",\"#f76e1a\",\"#f66b18\",\"#f56817\",\"#f46516\",\"#f36315\",\"#f26014\",\"#f15d13\",\"#ef5a11\",\"#ee5810\",\"#ed550f\",\"#ec520e\",\"#ea500d\",\"#e94d0d\",\"#e84b0c\",\"#e6490b\",\"#e5460a\",\"#e3440a\",\"#e24209\",\"#e04008\",\"#de3e08\",\"#dd3c07\",\"#db3a07\",\"#d93806\",\"#d73606\",\"#d63405\",\"#d43205\",\"#d23005\",\"#d02f04\",\"#ce2d04\",\"#cb2b03\",\"#c92903\",\"#c72803\",\"#c52602\",\"#c32402\",\"#c02302\",\"#be2102\",\"#bb1f01\",\"#b91e01\",\"#b61c01\",\"#b41b01\",\"#b11901\",\"#ae1801\",\"#ac1601\",\"#a91501\",\"#a61401\",\"#a31201\",\"#a01101\",\"#9d1001\",\"#9a0e01\",\"#970d01\",\"#940c01\",\"#910b01\",\"#8e0a01\",\"#8b0901\",\"#870801\",\"#840701\",\"#810602\",\"#7d0502\",\"#7a0402\"]},\"id\":\"1367\",\"type\":\"LinearColorMapper\"},{\"attributes\":{},\"id\":\"1391\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1378\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1404\"}},\"id\":\"1410\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1413\"},\"group\":null,\"major_label_policy\":{\"id\":\"1414\"},\"ticker\":{\"id\":\"1385\"}},\"id\":\"1384\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1413\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1417\",\"type\":\"AllLabels\"},{\"attributes\":{\"overlay\":{\"id\":\"1394\"}},\"id\":\"1390\",\"type\":\"BoxZoomTool\"}],\"root_ids\":[\"1369\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.3\"}};\n const render_items = [{\"docid\":\"8ca9adeb-5053-419f-ac22-431834c16cd9\",\"root_ids\":[\"1369\"],\"roots\":{\"1369\":\"1a2f2ca2-cdb2-4df2-ba23-85018cca17d9\"}}];\n root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", + "application/javascript": "(function(root) {\n function embed_document(root) {\n const docs_json = {\"49e50715-c814-427d-91f3-7faabca8d9a1\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1518\"}],\"center\":[{\"id\":\"1521\"},{\"id\":\"1525\"},{\"id\":\"1559\"}],\"height\":800,\"left\":[{\"id\":\"1522\"}],\"renderers\":[{\"id\":\"1547\"}],\"title\":{\"id\":\"1508\"},\"toolbar\":{\"id\":\"1534\"},\"width\":1000,\"x_range\":{\"id\":\"1510\"},\"x_scale\":{\"id\":\"1514\"},\"y_range\":{\"id\":\"1512\"},\"y_scale\":{\"id\":\"1516\"}},\"id\":\"1507\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1529\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1551\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1552\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1555\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1554\"},\"group\":null,\"major_label_policy\":{\"id\":\"1555\"},\"ticker\":{\"id\":\"1519\"}},\"id\":\"1518\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1554\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"1532\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1523\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1526\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1510\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1527\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1519\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1556\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"high\":15,\"low\":0,\"palette\":[\"#30123b\",\"#311542\",\"#32184a\",\"#341b51\",\"#351e58\",\"#36215f\",\"#372365\",\"#38266c\",\"#392972\",\"#3a2c79\",\"#3b2f7f\",\"#3c3285\",\"#3c358b\",\"#3d3791\",\"#3e3a96\",\"#3f3d9c\",\"#4040a1\",\"#4043a6\",\"#4145ab\",\"#4148b0\",\"#424bb5\",\"#434eba\",\"#4350be\",\"#4353c2\",\"#4456c7\",\"#4458cb\",\"#455bce\",\"#455ed2\",\"#4560d6\",\"#4563d9\",\"#4666dd\",\"#4668e0\",\"#466be3\",\"#466de6\",\"#4670e8\",\"#4673eb\",\"#4675ed\",\"#4678f0\",\"#467af2\",\"#467df4\",\"#467ff6\",\"#4682f8\",\"#4584f9\",\"#4587fb\",\"#4589fc\",\"#448cfd\",\"#438efd\",\"#4291fe\",\"#4193fe\",\"#4096fe\",\"#3f98fe\",\"#3e9bfe\",\"#3c9dfd\",\"#3ba0fc\",\"#39a2fc\",\"#38a5fb\",\"#36a8f9\",\"#34aaf8\",\"#33acf6\",\"#31aff5\",\"#2fb1f3\",\"#2db4f1\",\"#2bb6ef\",\"#2ab9ed\",\"#28bbeb\",\"#26bde9\",\"#25c0e6\",\"#23c2e4\",\"#21c4e1\",\"#20c6df\",\"#1ec9dc\",\"#1dcbda\",\"#1ccdd7\",\"#1bcfd4\",\"#1ad1d2\",\"#19d3cf\",\"#18d5cc\",\"#18d7ca\",\"#17d9c7\",\"#17dac4\",\"#17dcc2\",\"#17debf\",\"#18e0bd\",\"#18e1ba\",\"#19e3b8\",\"#1ae4b6\",\"#1be5b4\",\"#1de7b1\",\"#1ee8af\",\"#20e9ac\",\"#22eba9\",\"#24eca6\",\"#27eda3\",\"#29eea0\",\"#2cef9d\",\"#2ff09a\",\"#32f197\",\"#35f394\",\"#38f491\",\"#3bf48d\",\"#3ff58a\",\"#42f687\",\"#46f783\",\"#4af880\",\"#4df97c\",\"#51f979\",\"#55fa76\",\"#59fb72\",\"#5dfb6f\",\"#61fc6c\",\"#65fc68\",\"#69fd65\",\"#6dfd62\",\"#71fd5f\",\"#74fe5c\",\"#78fe59\",\"#7cfe56\",\"#80fe53\",\"#84fe50\",\"#87fe4d\",\"#8bfe4b\",\"#8efe48\",\"#92fe46\",\"#95fe44\",\"#98fe42\",\"#9bfd40\",\"#9efd3e\",\"#a1fc3d\",\"#a4fc3b\",\"#a6fb3a\",\"#a9fb39\",\"#acfa37\",\"#aef937\",\"#b1f836\",\"#b3f835\",\"#b6f735\",\"#b9f534\",\"#bbf434\",\"#bef334\",\"#c0f233\",\"#c3f133\",\"#c5ef33\",\"#c8ee33\",\"#caed33\",\"#cdeb34\",\"#cfea34\",\"#d1e834\",\"#d4e735\",\"#d6e535\",\"#d8e335\",\"#dae236\",\"#dde036\",\"#dfde36\",\"#e1dc37\",\"#e3da37\",\"#e5d838\",\"#e7d738\",\"#e8d538\",\"#ead339\",\"#ecd139\",\"#edcf39\",\"#efcd39\",\"#f0cb3a\",\"#f2c83a\",\"#f3c63a\",\"#f4c43a\",\"#f6c23a\",\"#f7c039\",\"#f8be39\",\"#f9bc39\",\"#f9ba38\",\"#fab737\",\"#fbb537\",\"#fbb336\",\"#fcb035\",\"#fcae34\",\"#fdab33\",\"#fda932\",\"#fda631\",\"#fda330\",\"#fea12f\",\"#fe9e2e\",\"#fe9b2d\",\"#fe982c\",\"#fd952b\",\"#fd9229\",\"#fd8f28\",\"#fd8c27\",\"#fc8926\",\"#fc8624\",\"#fb8323\",\"#fb8022\",\"#fa7d20\",\"#fa7a1f\",\"#f9771e\",\"#f8741c\",\"#f7711b\",\"#f76e1a\",\"#f66b18\",\"#f56817\",\"#f46516\",\"#f36315\",\"#f26014\",\"#f15d13\",\"#ef5a11\",\"#ee5810\",\"#ed550f\",\"#ec520e\",\"#ea500d\",\"#e94d0d\",\"#e84b0c\",\"#e6490b\",\"#e5460a\",\"#e3440a\",\"#e24209\",\"#e04008\",\"#de3e08\",\"#dd3c07\",\"#db3a07\",\"#d93806\",\"#d73606\",\"#d63405\",\"#d43205\",\"#d23005\",\"#d02f04\",\"#ce2d04\",\"#cb2b03\",\"#c92903\",\"#c72803\",\"#c52602\",\"#c32402\",\"#c02302\",\"#be2102\",\"#bb1f01\",\"#b91e01\",\"#b61c01\",\"#b41b01\",\"#b11901\",\"#ae1801\",\"#ac1601\",\"#a91501\",\"#a61401\",\"#a31201\",\"#a01101\",\"#9d1001\",\"#9a0e01\",\"#970d01\",\"#940c01\",\"#910b01\",\"#8e0a01\",\"#8b0901\",\"#870801\",\"#840701\",\"#810602\",\"#7d0502\",\"#7a0402\"]},\"id\":\"1505\",\"type\":\"LinearColorMapper\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1542\"},\"glyph\":{\"id\":\"1544\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1546\"},\"nonselection_glyph\":{\"id\":\"1545\"},\"view\":{\"id\":\"1548\"}},\"id\":\"1547\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1505\"}},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1505\"}},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1505\"}},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1546\",\"type\":\"Scatter\"},{\"attributes\":{\"source\":{\"id\":\"1542\"}},\"id\":\"1548\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Check label by hovering mouse over the dots\"},\"id\":\"1508\",\"type\":\"Title\"},{\"attributes\":{\"data\":{\"label\":[3,0,9,1,2,12,8,4,11,4,5,6,1,8,4,1,8,6,2,0,0,0,11,10,4,6,8,4,2,13,6,7,4,6,13,6,11,0,12,9,9,2,7,13,3,4,14,2,2,5,2,14,7,9,14,1,10,4,3,4,10,0,14,7,6,9,3,12,1,9,9,11,1,1,8,7,11,3,1,9,14,5,6,8,12,11,11,5,9,1,0,8,5,14,10,10,11,8,5,12,0,3,1,10,5,11,5,12,9,9,3,6,8,2,14,10,5,9,3,6,0,13,7,7,10,0,10,7,11,13,2,12,13,9,13,7,2,8,4,10,14,2,13],\"label_desc\":[\"NEE\",\"TOT-ZIENS\",\"RECHTS\",\"GOED\",\"GOEDENACHT\",\"BEDANKEN\",\"SMAKELIJK\",\"SLECHT\",\"SALUUT\",\"SLECHT\",\"GOEDEMORGEN\",\"JA\",\"GOED\",\"SMAKELIJK\",\"SLECHT\",\"GOED\",\"SMAKELIJK\",\"JA\",\"GOEDENACHT\",\"TOT-ZIENS\",\"TOT-ZIENS\",\"TOT-ZIENS\",\"SALUUT\",\"GOEDENAVOND\",\"SLECHT\",\"JA\",\"SMAKELIJK\",\"SLECHT\",\"GOEDENACHT\",\"LINKS\",\"JA\",\"SORRY\",\"SLECHT\",\"JA\",\"LINKS\",\"JA\",\"SALUUT\",\"TOT-ZIENS\",\"BEDANKEN\",\"RECHTS\",\"RECHTS\",\"GOEDENACHT\",\"SORRY\",\"LINKS\",\"NEE\",\"SLECHT\",\"GOEDEMIDDAG\",\"GOEDENACHT\",\"GOEDENACHT\",\"GOEDEMORGEN\",\"GOEDENACHT\",\"GOEDEMIDDAG\",\"SORRY\",\"RECHTS\",\"GOEDEMIDDAG\",\"GOED\",\"GOEDENAVOND\",\"SLECHT\",\"NEE\",\"SLECHT\",\"GOEDENAVOND\",\"TOT-ZIENS\",\"GOEDEMIDDAG\",\"SORRY\",\"JA\",\"RECHTS\",\"NEE\",\"BEDANKEN\",\"GOED\",\"RECHTS\",\"RECHTS\",\"SALUUT\",\"GOED\",\"GOED\",\"SMAKELIJK\",\"SORRY\",\"SALUUT\",\"NEE\",\"GOED\",\"RECHTS\",\"GOEDEMIDDAG\",\"GOEDEMORGEN\",\"JA\",\"SMAKELIJK\",\"BEDANKEN\",\"SALUUT\",\"SALUUT\",\"GOEDEMORGEN\",\"RECHTS\",\"GOED\",\"TOT-ZIENS\",\"SMAKELIJK\",\"GOEDEMORGEN\",\"GOEDEMIDDAG\",\"GOEDENAVOND\",\"GOEDENAVOND\",\"SALUUT\",\"SMAKELIJK\",\"GOEDEMORGEN\",\"BEDANKEN\",\"TOT-ZIENS\",\"NEE\",\"GOED\",\"GOEDENAVOND\",\"GOEDEMORGEN\",\"SALUUT\",\"GOEDEMORGEN\",\"BEDANKEN\",\"RECHTS\",\"RECHTS\",\"NEE\",\"JA\",\"SMAKELIJK\",\"GOEDENACHT\",\"GOEDEMIDDAG\",\"GOEDENAVOND\",\"GOEDEMORGEN\",\"RECHTS\",\"NEE\",\"JA\",\"TOT-ZIENS\",\"LINKS\",\"SORRY\",\"SORRY\",\"GOEDENAVOND\",\"TOT-ZIENS\",\"GOEDENAVOND\",\"SORRY\",\"SALUUT\",\"LINKS\",\"GOEDENACHT\",\"BEDANKEN\",\"LINKS\",\"RECHTS\",\"LINKS\",\"SORRY\",\"GOEDENACHT\",\"SMAKELIJK\",\"SLECHT\",\"GOEDENAVOND\",\"GOEDEMIDDAG\",\"GOEDENACHT\",\"LINKS\"],\"labels\":[3,0,9,1,2,12,8,4,11,4,5,6,1,8,4,1,8,6,2,0,0,0,11,10,4,6,8,4,2,13,6,7,4,6,13,6,11,0,12,9,9,2,7,13,3,4,14,2,2,5,2,14,7,9,14,1,10,4,3,4,10,0,14,7,6,9,3,12,1,9,9,11,1,1,8,7,11,3,1,9,14,5,6,8,12,11,11,5,9,1,0,8,5,14,10,10,11,8,5,12,0,3,1,10,5,11,5,12,9,9,3,6,8,2,14,10,5,9,3,6,0,13,7,7,10,0,10,7,11,13,2,12,13,9,13,7,2,8,4,10,14,2,13],\"split\":[\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\",\"train\"],\"x\":{\"__ndarray__\":\"ARi7wMqEXkDRJx/Bu6GvQNdTvr+4Pyu+y7TdPu/JAcG7Lw7BtZ/mwMGKlcA2FoM/tMCXQACITjhk3efA6K2gQBJRZz882QdA8YqJv5gnnUAMb4lA58mQQFZZJcGhd0Y/fNz1wN7Wvb+n5Vw/wjcQwVyr4r+4MU++QQxswOAWBUEwRBbBxD80QP2k7r1nampAqpPbwFC2gkB6w3o9Iu8EwLf1A8GNWgHAdBYLQT5/SL19Scy/MXWvwKHt8sCnZb2/CfYGwB9oGcAAcGu/NW7IwMUKCkEHNtnAOWIfwOtNtUCP5no/d5b5wANVysAa1vPADqK3v5EEaUCSqJbA7o4RQd/2Pr+0SRHBtwyxwNHijr/eWZpALA11wLfGGMFN6/3AFrWcQN7+vkBqtUjASRgSQQOSJ8H9eaBAmVyeQHQq5MCNhkHARcYjweTFakB652XAYe9xwDOK/8B7Qv7Ac5YFQFmYAsEg5MFAe4RtQPyZuMCEIyfA/KugwJjtHD/htLU+AoMhwcJ3+D8Mq+zA33mEwGhynED117vAZDtQQI3/BT+xvpnA2Z3/wO3coMAOfby/KXYHwcjJ6sC05o9A8aBDQIElpj/ZwhzAPDjPwNyB9b/6cDLAVTeAwJ2A8cBPfum+V/eEQEcPAD+oyyJB0ykQQaCfoMDJz39AoxEtwDovC0EgXtfAAVWHPa+v+r9BQgjAGU12vMQ8CsEIN8E+W0YGQfaj2b+UVTFA4S37wFa7U7+lIr7AkUvAv75/qL4=\",\"dtype\":\"float32\",\"order\":\"little\",\"shape\":[143]},\"y\":{\"__ndarray__\":\"PXMbwDmNZEBa2QFASR2Tv0LmOL8awdQ/DpRuQPEFiMBeHSRAEEyHwJnpnz+WH47Arl8bvlanJUDzXYjAvQaMv3zVPkARozfADUmMwOENS0Cg+C9ApddUQEVaEEDL/fq9MkGewCuMo8BUBeY/mUlYwHOBxcAfgbHAiFn0vwJYfj83/FfA3UEbwB91rsALH3q/k5weQDYepUBdD0I/8fakQFHASkC4wQDAG3ICvyxpv8DV3EvAQeKcwIAAlUCtWY/AyOW6wEqbvj+OT2nAh2eGQPV2R74JPrc/P4GLQDd4BsAguoG/RPypwCqCocBd04/ACbljP82/kUArvkRAhD79PUCVoMC+goY/8A/4v0ie9j+S8Ly/wKRwQGgJlj9SdDVAvVANwN8y+7/0DKlAWWlPv8uW1T+v8lbAftUXwLd/ur3NwnlAHe5OQGs2lL8ToDpAShobQJUxhD/7uOA/66MLwCjwPD+PheC/eIMxQIPlU0DqgIu/DL5lQIKO8D6UvQhA0zCwP4f0T0DmeJtA7s2NQCFoSkCStYHAzALkPS9/1T0ZtZxA92wDQPOCm0AwxxJAQsZuPr6zUT+wdbc/D7fdv6lgUEBF7gzA/5mFQJyxSr4/CJw/0AZfQMQRH8BYG9LAvfaDQMMEx8Acb1U/hK0avzBICEApmhlAuWyXPqzxgz/A9jNAqCPWwG9HrMANYak+K0mowCFyyj9R5czAZfjvPUVycr9WR3rAuIc1wI8BUD+xnts/9WZ7wJhOxcA=\",\"dtype\":\"float32\",\"order\":\"little\",\"shape\":[143]}},\"selected\":{\"id\":\"1557\"},\"selection_policy\":{\"id\":\"1556\"}},\"id\":\"1542\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1514\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"items\":[{\"id\":\"1560\"}]},\"id\":\"1559\",\"type\":\"Legend\"},{\"attributes\":{},\"id\":\"1531\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1512\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"1522\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1525\",\"type\":\"Grid\"},{\"attributes\":{\"label\":{\"field\":\"label_desc\"},\"renderers\":[{\"id\":\"1547\"}]},\"id\":\"1560\",\"type\":\"LegendItem\"},{\"attributes\":{\"callback\":null,\"tooltips\":\"\\n
\\n \\n
\\n @label_desc - @split\\n [#@video_id]\\n
\\n
\\n \\n\"},\"id\":\"1533\",\"type\":\"HoverTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1505\"}},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1505\"}},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1505\"}},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1545\",\"type\":\"Scatter\"},{\"attributes\":{\"axis\":{\"id\":\"1518\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1521\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1557\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1530\",\"type\":\"ResetTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1532\"}},\"id\":\"1528\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1505\"}},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1505\"}},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"field\":\"labels\",\"transform\":{\"id\":\"1505\"}},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1544\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"1516\",\"type\":\"LinearScale\"},{\"attributes\":{\"tools\":[{\"id\":\"1526\"},{\"id\":\"1527\"},{\"id\":\"1528\"},{\"id\":\"1529\"},{\"id\":\"1530\"},{\"id\":\"1531\"},{\"id\":\"1533\"}]},\"id\":\"1534\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1551\"},\"group\":null,\"major_label_policy\":{\"id\":\"1552\"},\"ticker\":{\"id\":\"1523\"}},\"id\":\"1522\",\"type\":\"LinearAxis\"}],\"root_ids\":[\"1507\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.3\"}};\n const render_items = [{\"docid\":\"49e50715-c814-427d-91f3-7faabca8d9a1\",\"root_ids\":[\"1507\"],\"roots\":{\"1507\":\"c95f81fb-7cf0-4c10-b8a3-a9e77c772aef\"}}];\n root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": { "application/vnd.bokehjs_exec.v0+json": { - "id": "1369" + "id": "1507" } }, "output_type": "display_data" diff --git a/requirements.txt b/requirements.txt index 2e09c25..d83a933 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ opencv-python==4.6.0.66 plotly==5.11.0 scikit-learn==1.0.2 clearml==1.10.3 -torch==2.0.0+cu118 -torchvision==0.15.1+cu118 +torch==2.0.0 +torchvision==0.15.1 tqdm==4.54.1 optuna==3.1.1 \ No newline at end of file diff --git a/train.py b/train.py index 1d27a79..c7038b1 100644 --- a/train.py +++ b/train.py @@ -75,12 +75,25 @@ def train(args, tracker: Tracker): # Construct the model if not args.classification_model: - slrt_model = SPOTER_EMBEDDINGS( - features=args.vector_length, - hidden_dim=args.hidden_dim, - norm_emb=args.normalize_embeddings, - dropout=args.dropout - ) + # if finetune, load the weights from the classification model + if args.finetune: + checkpoint = torch.load(args.checkpoint, map_location=device) + + slrt_model = SPOTER_EMBEDDINGS( + features=checkpoint["config_args"].vector_length, + hidden_dim=checkpoint["config_args"].hidden_dim, + norm_emb=checkpoint["config_args"].normalize_embeddings, + dropout=checkpoint["config_args"].dropout, + ) + else: + slrt_model = SPOTER_EMBEDDINGS( + features=args.vector_length, + hidden_dim=args.hidden_dim, + norm_emb=args.normalize_embeddings, + dropout=args.dropout, + ) + + model_type = 'embed' if args.hard_triplet_mining == "None": cel_criterion = nn.TripletMarginLoss(margin=args.triplet_loss_margin, p=2) diff --git a/train.sh b/train.sh index b6eb7ef..08ecc1f 100755 --- a/train.sh +++ b/train.sh @@ -1,10 +1,10 @@ #!/bin/sh -python -m train \ +python3 -m train \ --save_checkpoints_every 10 \ --experiment_name "wlasl" \ - --epochs 300 \ - --optimizer "ADAM" \ - --lr 0.0001 \ + --epochs 600 \ + --optimizer "SGD" \ + --lr 0.001 \ --batch_size 16 \ --dataset_name "WLASL" \ --training_set_path "WLASL100_train.csv" \ @@ -12,7 +12,7 @@ python -m train \ --vector_length 32 \ --epoch_iters -1 \ --scheduler_factor 0.2 \ - --hard_triplet_mining "None" \ + --hard_triplet_mining "in_batch" \ --filter_easy_triplets \ --triplet_loss_margin 2 \ --dropout 0.2 \