{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.14","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":3004,"databundleVersionId":861823,"sourceType":"competition"}],"dockerImageVersionId":30775,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nfrom sklearn.model_selection import train_test_split\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, Input, Flatten\nfrom tensorflow.keras.datasets import mnist\nfrom tensorflow.keras.optimizers import SGD, Adam, RMSprop, Adagrad, Adadelta","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-11-18T13:47:42.233107Z","iopub.execute_input":"2024-11-18T13:47:42.233524Z","iopub.status.idle":"2024-11-18T13:47:55.645977Z","shell.execute_reply.started":"2024-11-18T13:47:42.233466Z","shell.execute_reply":"2024-11-18T13:47:55.644956Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Початкові налаштування","metadata":{}},{"cell_type":"code","source":"tf.keras.backend.set_floatx('float64')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:47:55.647817Z","iopub.execute_input":"2024-11-18T13:47:55.648415Z","iopub.status.idle":"2024-11-18T13:47:55.653157Z","shell.execute_reply.started":"2024-11-18T13:47:55.648337Z","shell.execute_reply":"2024-11-18T13:47:55.652136Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Завантажимо датасет в DataFrame","metadata":{}},{"cell_type":"code","source":"df = pd.read_csv(\"/kaggle/input/digit-recognizer/train.csv\")","metadata":{"execution":{"iopub.status.busy":"2024-11-18T13:47:55.654484Z","iopub.execute_input":"2024-11-18T13:47:55.654839Z","iopub.status.idle":"2024-11-18T13:47:59.299638Z","shell.execute_reply.started":"2024-11-18T13:47:55.654798Z","shell.execute_reply":"2024-11-18T13:47:59.298653Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"X_df = df.drop(\"label\", axis = 1)\nY_df = df[\"label\"]","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:47:59.301806Z","iopub.execute_input":"2024-11-18T13:47:59.302138Z","iopub.status.idle":"2024-11-18T13:47:59.395112Z","shell.execute_reply.started":"2024-11-18T13:47:59.302104Z","shell.execute_reply":"2024-11-18T13:47:59.394323Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Нормалізуємо дані","metadata":{}},{"cell_type":"code","source":"X_df = X_df / 255.0\nY_df = tf.keras.utils.to_categorical(Y_df,10)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:47:59.396130Z","iopub.execute_input":"2024-11-18T13:47:59.396487Z","iopub.status.idle":"2024-11-18T13:47:59.454350Z","shell.execute_reply.started":"2024-11-18T13:47:59.396451Z","shell.execute_reply":"2024-11-18T13:47:59.453552Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Змінимо форму Х","metadata":{}},{"cell_type":"code","source":"X_df = X_df.values.reshape(-1,28,28)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:47:59.455522Z","iopub.execute_input":"2024-11-18T13:47:59.455849Z","iopub.status.idle":"2024-11-18T13:47:59.462317Z","shell.execute_reply.started":"2024-11-18T13:47:59.455816Z","shell.execute_reply":"2024-11-18T13:47:59.461404Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"Y_df","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:47:59.463646Z","iopub.execute_input":"2024-11-18T13:47:59.464100Z","iopub.status.idle":"2024-11-18T13:47:59.473713Z","shell.execute_reply.started":"2024-11-18T13:47:59.464068Z","shell.execute_reply":"2024-11-18T13:47:59.472795Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"X_train,X_test,y_train,y_test = train_test_split(X_df,Y_df,test_size = 0.3, random_state = 42,stratify=Y_df)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:47:59.475006Z","iopub.execute_input":"2024-11-18T13:47:59.475318Z","iopub.status.idle":"2024-11-18T13:48:00.480132Z","shell.execute_reply.started":"2024-11-18T13:47:59.475278Z","shell.execute_reply":"2024-11-18T13:48:00.479300Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(X_train.shape)\nprint(X_test.shape)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:48:00.481355Z","iopub.execute_input":"2024-11-18T13:48:00.481731Z","iopub.status.idle":"2024-11-18T13:48:00.487476Z","shell.execute_reply.started":"2024-11-18T13:48:00.481690Z","shell.execute_reply":"2024-11-18T13:48:00.486527Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Сформуємо модель","metadata":{}},{"cell_type":"code","source":"def create_model():\n    model = Sequential([\n        Input(shape=(28, 28)),\n        Flatten(),\n        Dense(128, activation='relu'),\n        Dense(64, activation='relu'),\n        Dense(10, activation='softmax')\n    ])\n    return model\n","metadata":{"execution":{"iopub.status.busy":"2024-11-18T13:48:00.490706Z","iopub.execute_input":"2024-11-18T13:48:00.491263Z","iopub.status.idle":"2024-11-18T13:48:00.497800Z","shell.execute_reply.started":"2024-11-18T13:48:00.491231Z","shell.execute_reply":"2024-11-18T13:48:00.496914Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Створимо класс callback","metadata":{}},{"cell_type":"code","source":"class GradientLogger(tf.keras.callbacks.Callback):\n    def __init__(self):\n        self.gradients_log = []\n\n    def on_epoch_end(self, epoch, logs=None):\n        weights = [layer.get_weights() for layer in self.model.layers if hasattr(layer, 'kernel')]\n        self.gradients_log.append(weights)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:48:00.498709Z","iopub.execute_input":"2024-11-18T13:48:00.499012Z","iopub.status.idle":"2024-11-18T13:48:00.507610Z","shell.execute_reply.started":"2024-11-18T13:48:00.498981Z","shell.execute_reply":"2024-11-18T13:48:00.506860Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Створимо функцію для тренування усіх моделей на одному оптимізаторі","metadata":{}},{"cell_type":"code","source":"def train_model(optimizer, batch_size):\n    print(f\"Training with {optimizer.name}, lr={optimizer.learning_rate.numpy()}, batch size={batch_size}...\")\n            \n    model = create_model()\n    model.compile(optimizer=optimizer, loss='categorical_crossentropy', metrics=['accuracy'])\n            \n    grad_logger = GradientLogger()\n\n    history = model.fit(\n        X_train, y_train, \n        validation_data=(X_test, y_test),\n        batch_size=batch_size, \n        epochs=10, \n        verbose=0,\n        callbacks=[grad_logger]\n        )\n            \n    history_results[(optimizer.name, optimizer.learning_rate.numpy(), batch_size)] = (history, grad_logger.gradients_log)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:48:00.508700Z","iopub.execute_input":"2024-11-18T13:48:00.509463Z","iopub.status.idle":"2024-11-18T13:48:00.521253Z","shell.execute_reply.started":"2024-11-18T13:48:00.509395Z","shell.execute_reply":"2024-11-18T13:48:00.520333Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Задамо змінні","metadata":{}},{"cell_type":"code","source":"history_results = {}\nbatch_sizes = [16, 32, 64, 128]\n\nlearning_rates = [0.001, 0.01, 0.1]","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:48:00.522426Z","iopub.execute_input":"2024-11-18T13:48:00.522739Z","iopub.status.idle":"2024-11-18T13:48:00.530379Z","shell.execute_reply.started":"2024-11-18T13:48:00.522687Z","shell.execute_reply":"2024-11-18T13:48:00.529422Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:11:46.953253Z","iopub.execute_input":"2024-11-18T15:11:46.954103Z","iopub.status.idle":"2024-11-18T15:11:46.962622Z","shell.execute_reply.started":"2024-11-18T15:11:46.954061Z","shell.execute_reply":"2024-11-18T15:11:46.961608Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Почнемо використовувати оптимізатори","metadata":{}},{"cell_type":"markdown","source":"# SGD","metadata":{}},{"cell_type":"code","source":"for rate in learning_rates:\n    for batch in batch_sizes:\n        optimizer = SGD(learning_rate = rate)\n        train_model(optimizer,batch)","metadata":{"execution":{"iopub.status.busy":"2024-11-18T13:48:00.531512Z","iopub.execute_input":"2024-11-18T13:48:00.532624Z","iopub.status.idle":"2024-11-18T13:51:32.314985Z","shell.execute_reply.started":"2024-11-18T13:48:00.532592Z","shell.execute_reply":"2024-11-18T13:51:32.314108Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def plot_results(history_results, metric, title):\n    plt.figure(figsize=(18, 12))\n    for (opt_name, lr, batch_size), (history, _) in history_results.items():\n        plt.plot(history.history[f'val_{metric}'], label=f\"{opt_name}, lr={lr}, batch={batch_size}\")\n    plt.title(title)\n    plt.xlabel(\"Epoch\")\n    plt.ylabel(metric)\n    plt.legend(bbox_to_anchor=(1.05, 1), loc='upper left')\n    plt.tight_layout()\n    plt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:51:32.316322Z","iopub.execute_input":"2024-11-18T13:51:32.316663Z","iopub.status.idle":"2024-11-18T13:51:32.323036Z","shell.execute_reply.started":"2024-11-18T13:51:32.316629Z","shell.execute_reply":"2024-11-18T13:51:32.322140Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"plot_results(history_results, 'loss', \"SGD validation Loss per Epoch\")\nplot_results(history_results, 'accuracy', \"SGD validation Accuracy per Epoch\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T13:51:32.324196Z","iopub.execute_input":"2024-11-18T13:51:32.324565Z","iopub.status.idle":"2024-11-18T13:51:33.653971Z","shell.execute_reply.started":"2024-11-18T13:51:32.324519Z","shell.execute_reply":"2024-11-18T13:51:33.652944Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"gradients_log = history_results[(\"SGD\", 0.1, 64)][1]\nfor epoch, weights in enumerate(gradients_log):\n    print(f\"Epoch {epoch + 1}, First layer weights:\")\n    print(weights[0][0])","metadata":{"execution":{"iopub.status.busy":"2024-11-18T13:51:33.655227Z","iopub.execute_input":"2024-11-18T13:51:33.655546Z","iopub.status.idle":"2024-11-18T13:51:33.667746Z","shell.execute_reply.started":"2024-11-18T13:51:33.655513Z","shell.execute_reply":"2024-11-18T13:51:33.666740Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def build_weights_graph(layer_index, row_index, col_index, optimizer_name):\n    neuron_weights_by_lr = {}\n    \n    for rate in learning_rates:\n        key = (optimizer_name, rate, 16)\n        if key in history_results:\n            gradients_log = history_results[key][1]\n            \n            neuron_weights = [\n                weights[layer_index][0][row_index][col_index] \n                for weights in gradients_log\n            ]\n            neuron_weights_by_lr[rate] = neuron_weights\n    \n    plt.figure(figsize=(12, 8))\n    \n    for rate, weights in neuron_weights_by_lr.items():\n        epochs = range(1, len(weights) + 1)\n        plt.plot(epochs, weights, marker='o', label=f'Learning rate = {rate}')\n    \n    plt.title(f\"Change of Weight (L={layer_index}, R={row_index}, C={col_index})\", fontsize=14)\n    plt.xlabel(\"Epoch\", fontsize=12)\n    plt.ylabel(\"Weight Value\", fontsize=12)\n    plt.grid(True, linestyle='--', alpha=0.6)\n    plt.legend(fontsize=12)\n    plt.xticks(range(1, len(weights) + 1))\n    plt.show()\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:14:54.527894Z","iopub.execute_input":"2024-11-18T15:14:54.528270Z","iopub.status.idle":"2024-11-18T15:14:54.537342Z","shell.execute_reply.started":"2024-11-18T15:14:54.528234Z","shell.execute_reply":"2024-11-18T15:14:54.536158Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"build_weights_graph(layer_index=1, row_index=10, col_index=1)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T14:43:41.217840Z","iopub.execute_input":"2024-11-18T14:43:41.218697Z","iopub.status.idle":"2024-11-18T14:43:41.516831Z","shell.execute_reply.started":"2024-11-18T14:43:41.218657Z","shell.execute_reply":"2024-11-18T14:43:41.515744Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Momentum","metadata":{}},{"cell_type":"code","source":"history_results = {}\nfor rate in learning_rates:\n    for batch in batch_sizes:\n        optimizer = SGD(learning_rate = rate, momentum = 0.9)\n        train_model(optimizer,batch)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T14:49:31.949417Z","iopub.execute_input":"2024-11-18T14:49:31.950125Z","iopub.status.idle":"2024-11-18T14:53:07.128471Z","shell.execute_reply.started":"2024-11-18T14:49:31.950083Z","shell.execute_reply":"2024-11-18T14:53:07.127434Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"plot_results(history_results, 'loss', \"Momentum validation Loss per Epoch\")\nplot_results(history_results, 'accuracy', \"Momentum validation Accuracy per Epoch\")","metadata":{"execution":{"iopub.status.busy":"2024-11-18T14:53:07.130804Z","iopub.execute_input":"2024-11-18T14:53:07.131321Z","iopub.status.idle":"2024-11-18T14:53:08.102966Z","shell.execute_reply.started":"2024-11-18T14:53:07.131257Z","shell.execute_reply":"2024-11-18T14:53:08.102034Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"build_weights_graph(layer_index=2, row_index=6, col_index=5)","metadata":{"execution":{"iopub.status.busy":"2024-11-18T15:04:20.602280Z","iopub.execute_input":"2024-11-18T15:04:20.603149Z","iopub.status.idle":"2024-11-18T15:04:20.920171Z","shell.execute_reply.started":"2024-11-18T15:04:20.603107Z","shell.execute_reply":"2024-11-18T15:04:20.919206Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# RMSProp","metadata":{}},{"cell_type":"code","source":"history_results = {}\nfor rate in learning_rates:\n    for batch in batch_sizes:\n        optimizer = RMSprop(learning_rate = rate)\n        train_model(optimizer,batch)","metadata":{"execution":{"iopub.status.busy":"2024-11-18T15:04:36.696107Z","iopub.execute_input":"2024-11-18T15:04:36.696481Z","iopub.status.idle":"2024-11-18T15:08:13.453521Z","shell.execute_reply.started":"2024-11-18T15:04:36.696448Z","shell.execute_reply":"2024-11-18T15:08:13.452648Z"},"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"plot_results(history_results, 'loss', \"RMSPROP validation Loss per Epoch\")\nplot_results(history_results, 'accuracy', \"RMSPROP validation Accuracy per Epoch\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:08:13.455195Z","iopub.execute_input":"2024-11-18T15:08:13.455536Z","iopub.status.idle":"2024-11-18T15:08:14.731374Z","shell.execute_reply.started":"2024-11-18T15:08:13.455502Z","shell.execute_reply":"2024-11-18T15:08:14.730426Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:11:02.770157Z","iopub.execute_input":"2024-11-18T15:11:02.771012Z","iopub.status.idle":"2024-11-18T15:11:02.779654Z","shell.execute_reply.started":"2024-11-18T15:11:02.770969Z","shell.execute_reply":"2024-11-18T15:11:02.778729Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"build_weights_graph(layer_index=1, row_index=6, col_index=4,optimizer_name='rmsprop')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:19:52.674172Z","iopub.execute_input":"2024-11-18T15:19:52.674939Z","iopub.status.idle":"2024-11-18T15:19:52.976535Z","shell.execute_reply.started":"2024-11-18T15:19:52.674900Z","shell.execute_reply":"2024-11-18T15:19:52.975608Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Adam","metadata":{}},{"cell_type":"code","source":"history_results = {}\nfor rate in learning_rates:\n    for batch in batch_sizes:\n        optimizer = Adam(learning_rate = rate)\n        train_model(optimizer,batch)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:19:59.722350Z","iopub.execute_input":"2024-11-18T15:19:59.722744Z","iopub.status.idle":"2024-11-18T15:24:05.538444Z","shell.execute_reply.started":"2024-11-18T15:19:59.722708Z","shell.execute_reply":"2024-11-18T15:24:05.537532Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"plot_results(history_results, 'loss', \"Adam validation Loss per Epoch\")\nplot_results(history_results, 'accuracy', \"Adam validation Accuracy per Epoch\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:24:05.540429Z","iopub.execute_input":"2024-11-18T15:24:05.540744Z","iopub.status.idle":"2024-11-18T15:24:06.559978Z","shell.execute_reply.started":"2024-11-18T15:24:05.540712Z","shell.execute_reply":"2024-11-18T15:24:06.558884Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"build_weights_graph(layer_index=1, row_index=2, col_index=5,optimizer_name='adam')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:42:46.584058Z","iopub.execute_input":"2024-11-18T15:42:46.584471Z","iopub.status.idle":"2024-11-18T15:42:46.901797Z","shell.execute_reply.started":"2024-11-18T15:42:46.584433Z","shell.execute_reply":"2024-11-18T15:42:46.900826Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# AdaGrad","metadata":{}},{"cell_type":"code","source":"history_results = {}\nfor rate in learning_rates:\n    for batch in batch_sizes:\n        optimizer = Adagrad(learning_rate = rate)\n        train_model(optimizer,batch)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:43:04.794094Z","iopub.execute_input":"2024-11-18T15:43:04.794890Z","iopub.status.idle":"2024-11-18T15:46:41.525580Z","shell.execute_reply.started":"2024-11-18T15:43:04.794849Z","shell.execute_reply":"2024-11-18T15:46:41.524671Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"plot_results(history_results, 'loss', \"AdaGrad validation Loss per Epoch\")\nplot_results(history_results, 'accuracy', \"AdaGrad validation Accuracy per Epoch\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:46:41.527335Z","iopub.execute_input":"2024-11-18T15:46:41.527691Z","iopub.status.idle":"2024-11-18T15:46:42.772674Z","shell.execute_reply.started":"2024-11-18T15:46:41.527658Z","shell.execute_reply":"2024-11-18T15:46:42.771721Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"build_weights_graph(layer_index=1, row_index=2, col_index=5,optimizer_name='adagrad')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T15:46:42.773854Z","iopub.execute_input":"2024-11-18T15:46:42.774213Z","iopub.status.idle":"2024-11-18T15:46:43.142548Z","shell.execute_reply.started":"2024-11-18T15:46:42.774164Z","shell.execute_reply":"2024-11-18T15:46:43.141522Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# AdaDelta","metadata":{}},{"cell_type":"code","source":"history_results = {}\nfor rate in learning_rates:\n    for batch in batch_sizes:\n        optimizer = Adadelta(learning_rate = rate)\n        train_model(optimizer,batch)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T16:11:24.014759Z","iopub.execute_input":"2024-11-18T16:11:24.015460Z","iopub.status.idle":"2024-11-18T16:15:14.319445Z","shell.execute_reply.started":"2024-11-18T16:11:24.015401Z","shell.execute_reply":"2024-11-18T16:15:14.318423Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"plot_results(history_results, 'loss', \"AdaDelta validation Loss per Epoch\")\nplot_results(history_results, 'accuracy', \"AdaDelta validation Accuracy per Epoch\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T16:15:14.321654Z","iopub.execute_input":"2024-11-18T16:15:14.321945Z","iopub.status.idle":"2024-11-18T16:15:15.515508Z","shell.execute_reply.started":"2024-11-18T16:15:14.321914Z","shell.execute_reply":"2024-11-18T16:15:15.514529Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"build_weights_graph(layer_index=1, row_index=2, col_index=5,optimizer_name='adadelta')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-18T16:15:15.516673Z","iopub.execute_input":"2024-11-18T16:15:15.516978Z","iopub.status.idle":"2024-11-18T16:15:15.871529Z","shell.execute_reply.started":"2024-11-18T16:15:15.516945Z","shell.execute_reply":"2024-11-18T16:15:15.870525Z"}},"outputs":[],"execution_count":null}]}