{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "-WXqA_23DfeC" }, "source": [ "Modelo de clasificación de videos con redes recurrentes\n", "=======================================================" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
PRECAUCIÓN 😱: El tema presentado en esta sección está clasificado como avanzado. El entendimiento de este contenido es totalmente opcional.
" ] }, { "cell_type": "markdown", "metadata": { "id": "j3576kEYCwpp" }, "source": [ "## Introducción" ] }, { "cell_type": "markdown", "metadata": { "id": "o-aoxMmlCwpp" }, "source": [ "La clasificación de videos es la tarea por la cual un modelo de aprendizaje automático asigna una o varias etiquetas a todo un video dependiendo del contenido del mismo. Esta tarea nos permite reconocer acciones o estados que son transmitidos en un video. Para ejemplificar esta tarea, construiremos una red recurrente basada en LSTM donde los valores de entrada de la misma corresponderán a vectores que se aprendieron con una red de convolución." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "> **Importante:** Es posible que no pueda ejecutar este notebook en Google Colab. No tendrá suficiente memoria en las tarjetas de GPU que suelen disponibilizarce. Si dispone de un equipo con GPU compatible con CUDA, ejecutelo allí." ] }, { "cell_type": "markdown", "metadata": { "id": "TghjzJl0wKId" }, "source": [ "### Preparación del ambiente" ] }, { "cell_type": "markdown", "metadata": { "id": "Ez9d-jEjDfeV" }, "source": [ "Intalamos las librerias necesarias" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "id": "mrs7T2yDDfeW" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[31mERROR: responsibleai 0.10.0 has requirement dice-ml<0.8,>=0.7.1, but you'll have dice-ml 0.6.1 which is incompatible.\u001b[0m\n", "\u001b[31mERROR: raiwidgets 0.10.0 has requirement jinja2==2.11.3, but you'll have jinja2 2.11.2 which is incompatible.\u001b[0m\n", "\u001b[31mERROR: azureml-responsibleai 1.34.0 has requirement responsibleai==0.9.4, but you'll have responsibleai 0.10.0 which is incompatible.\u001b[0m\n", "\u001b[31mERROR: autokeras 1.0.16 has requirement tensorflow<=2.5.0,>=2.3.0, but you'll have tensorflow 2.1.0 which is incompatible.\u001b[0m\n", "\u001b[31mERROR: tensorflow-metadata 1.2.0 has requirement absl-py<0.13,>=0.9, but you'll have absl-py 0.13.0 which is incompatible.\u001b[0m\n" ] } ], "source": [ "!wget https://raw.githubusercontent.com/santiagxf/M72109/master/docs/vision/tasks/sequences/code/lstm_cnn_class.txt \\\n", " --quiet --no-clobber\n", "!pip install -r lstm_cnn_class.txt --quiet" ] }, { "cell_type": "markdown", "metadata": { "id": "ZJ1mR6CBCwpt" }, "source": [ "Para ejemplificar esta técnica utilizaremos un conjunto de datos muy popular llamado UCF-101. UCF-101 es un conjunto de datos con videos reales extraidos de YouTube clasificados en 101 categorías dendiendo de la acción que muestran. Este conjunto de datos tiene originalmente 13320 videos de las 101 categorias disponibles. Estos videos, adicionalmente estan agrupados en subgrupos donde los videos muestran propiedades similares como por ejemplo fondos similares, angulo de la cámara, etc.\n", "\n", "Puede obtener más información sobre este conjunto de datos y sus derechos de autor en: [UCF101 - Action Recognition Data Set](https://www.crcv.ucf.edu/data/UCF101.php)" ] }, { "cell_type": "markdown", "metadata": { "id": "yIxm9UX6HkYj" }, "source": [ "Para simplificar el uso de este conjunto de datos, utilizaremos una versión reducida del mismo con solo 3 categorias:\n", "\n", "- Tocando la guitarra\n", "- Tocando el violin\n", "- Tocando el chelo\n", "\n", "```\n", "Dataset/\n", "├─ PlayingGuitar/\n", "│ ├─ video1.avi\n", "│ ├─ video2.avi\n", "│ └─ ...\n", "└─ PlayingCello/\n", "│ ├─ video1.avi\n", "│ ├─ video2.avi\n", "│ └─ ...\n", "└─ PlayingViolin/\n", " ├─ video1.avi\n", " ├─ video2.avi\n", " └─ ...\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Descargamos el conjunto de datos:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "id": "E8DkMctIHo5M" }, "outputs": [], "source": [ "!wget https://santiagxf.blob.core.windows.net/public/datasets/UCF3.zip \\\n", " --quiet --no-clobber\n", "!mkdir -p /tmp/videos\n", "!unzip -qq UCF3.zip -d /tmp/videos" ] }, { "cell_type": "markdown", "metadata": { "id": "c2ydVcyxCwpx" }, "source": [ "Antes de comenzar necesitaremos verificar que tenemos el runtime correcto en nuestro ambiente. Esta tarea se beneficiará mucho de una GPU." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ABQ6LdkQDfeZ", "outputId": "0bc4b540-ef1e-4ba3-ce82-468eae6271a9" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "GPUs disponibles: 4\n" ] } ], "source": [ "import tensorflow as tf\n", "print(\"GPUs disponibles: \", len(tf.config.experimental.list_physical_devices('GPU')))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Trabajando con video" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Generando frames de un video" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Como se mencionó, un video puede ser defragmentado en una secuencia de cuadros que se transicionan en el tiempo. Sin embargo, descomponer un video de tal forma puede dar lugar a estructuras de datos másivas. Considere un video de 30 segundos, a 24 cuadros tendriamos secuencias de 720 pasos. En general deberemos utilizar alguna estrategia de sampling para seleccionar los cuadros.\n", "\n", "El siguiente ejemplo toma como entrada un directorio donde se encuentran videos, para generar otro directorio donde cada video es una carpeta. En tal carpeta se encuentran todos los cuadros de tal video. Los cuadros son seleccionado equitativamente en el tiempo para obtener la cantidad de secuencias necesarias.\n", "\n", "```\n", "Dataset/\n", "├─ vide1/\n", "│ ├─ video1_frame_00.jpg\n", "│ ├─ video1_frame_01.jpg\n", "│ ├─ video1_frame_02.jpg\n", "│ ├─ video1_frame_03.jpg\n", "│ └─ ...\n", "└─ video2/\n", " ├─ video2_frame_00.jpg\n", " ├─ video2_frame_01.jpg\n", " ├─ video2_frame_02.jpg\n", " ├─ video2_frame_03.jpg\n", " └─ ...\n", "```" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "id": "hRpVtzaaPVpk" }, "outputs": [], "source": [ "import cv2\n", "import os\n", "from typing import Optional\n", "from tqdm import tqdm\n", "import pathlib\n", "\n", "def extract_frames(videos_dir: str, out_dir: str, sample_each_seconds: Optional[int], max_sequence_lenght: Optional[int]):\n", " for file_ in tqdm(pathlib.PosixPath(videos_dir).glob(\"*/*.avi\")):\n", " count = 0\n", " basename = file_.name.split('.')[0]\n", " label = file_.parent.name\n", " targetpath = os.path.join(out_dir, label, basename)\n", " if os.path.isdir(targetpath):\n", " continue\n", " \n", " os.makedirs(targetpath, exist_ok=True)\n", " vidcap = cv2.VideoCapture(str(file_))\n", "\n", " if (sample_each_seconds):\n", " sample_every_frame = 1000 * sample_each_seconds\n", " else:\n", " num_frames = int(vidcap.get(cv2.CAP_PROP_FRAME_COUNT))\n", " sample_every_frame = max(1, num_frames // max_sequence_lenght)\n", "\n", " success, image = vidcap.read()\n", " while success:\n", " cv2.imwrite(os.path.join(targetpath, \"%s_frame_%d.jpg\" % (basename, count)), image)\n", " count += 1\n", " vidcap.set(cv2.CAP_PROP_POS_MSEC,(count*sample_every_frame))\n", " success,image = vidcap.read()\n", " \n", " vidcap.release()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ejecutamos este procedimiento en el directorio donde se encuentra nuestro conjnto de datos:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "SEQUENCE_LENGTH=10\n", "IMG_SIZE = 224\n", "CHANNELS = 3" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "VIDEOS_PATH = '/tmp/videos'\n", "FRAMES_PATH = '/tmp/frames'" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "tKreFOwEwZto", "outputId": "a7fb6fce-3d56-4743-fe21-3fc67bb0170e" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "424it [00:35, 11.90it/s]\n" ] } ], "source": [ "extract_frames(VIDEOS_PATH, FRAMES_PATH, sample_each_seconds=1, max_sequence_lenght=SEQUENCE_LENGTH)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Labels:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "labels = [folder.name for folder in pathlib.PosixPath(FRAMES_PATH).glob('*/')]" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "3\n" ] } ], "source": [ "NUM_LABELS = len(labels)\n", "print(NUM_LABELS)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Construyendo un modelo basado en CNN y LSTM" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Utilizaremos `TensorFlow` para construir un modelo que pueda extraer los predictores desde las imágenes de forma independiente para luego unir todos estos predictores en una secuencia que sera utilizada como entrada para una red recurrente." ] }, { "cell_type": "markdown", "metadata": { "id": "-vp215uiDfer" }, "source": [ "Nuestra red CNN estará basada en una CNNs típica. En este caso la misma constará de:\n", " - 2 capas de CNN\n", " - 1 capas de Pooling\n", " - 1 capa de regularización\n", " \n", "Esta unidad básica la repetiremos 4 veces sobre cada imagen de la secuencia. Para realizar esta operación utilizaremos la capa `TimeDistributed` que permite realizar una misma operación de forma distribuida sobre todos los elementos de una secuencia." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "id": "a6UPyxr9Iy_2" }, "outputs": [], "source": [ "import tensorflow as tf\n", "import tensorflow.keras as keras" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "id": "3l3IDPVNI3lM" }, "outputs": [], "source": [ "def build_cnn():\n", " model = keras.models.Sequential([\n", " keras.layers.InputLayer(input_shape=(IMG_SIZE, IMG_SIZE, CHANNELS)),\n", " keras.layers.Conv2D(32, (3, 3), padding='same', activation='relu'),\n", " keras.layers.Conv2D(32, (3, 3), padding='same', activation='relu'),\n", " keras.layers.MaxPooling2D((2, 2)),\n", " \n", " keras.layers.Conv2D(64, (3, 3), padding='same', activation='relu'),\n", " keras.layers.Conv2D(64, (3, 3), padding='same', activation='relu'),\n", " keras.layers.MaxPooling2D((2, 2)),\n", " \n", " keras.layers.Conv2D(128, (3, 3), padding='same', activation='relu'),\n", " keras.layers.Conv2D(128, (3, 3), padding='same', activation='relu'),\n", " keras.layers.MaxPooling2D((2, 2)),\n", " \n", " keras.layers.Conv2D(128, (4, 4), padding='same', activation='relu'),\n", " keras.layers.Conv2D(128, (3, 3), padding='same', activation='relu'),\n", " keras.layers.MaxPooling2D((2, 2)),\n", " \n", " keras.layers.Flatten(),\n", " ])\n", " \n", " return model\n", "\n", "def build_lstm(feature_extractor):\n", " model = keras.models.Sequential([\n", " keras.layers.InputLayer(input_shape=(SEQUENCE_LENGTH, IMG_SIZE, IMG_SIZE, CHANNELS)),\n", " keras.layers.TimeDistributed(feature_extractor),\n", " keras.layers.Masking(mask_value=0.),\n", " keras.layers.LSTM(128, dropout=0.5, recurrent_dropout=0.5),\n", " keras.layers.Dense(32, activation='relu'),\n", " keras.layers.Dropout(0.3),\n", " keras.layers.Dense(NUM_LABELS, activation='softmax')\n", " ])\n", "\n", " model.compile(optimizer='adam', loss=tf.keras.losses.SparseCategoricalCrossentropy(), metrics=['accuracy'])\n", " return model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Contruimos el modelo:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Model: \"sequential_2\"\n", "_________________________________________________________________\n", "Layer (type) Output Shape Param # \n", "=================================================================\n", "conv2d_8 (Conv2D) (None, 224, 224, 32) 896 \n", "_________________________________________________________________\n", "conv2d_9 (Conv2D) (None, 224, 224, 32) 9248 \n", "_________________________________________________________________\n", "max_pooling2d_4 (MaxPooling2 (None, 112, 112, 32) 0 \n", "_________________________________________________________________\n", "conv2d_10 (Conv2D) (None, 112, 112, 64) 18496 \n", "_________________________________________________________________\n", "conv2d_11 (Conv2D) (None, 112, 112, 64) 36928 \n", "_________________________________________________________________\n", "max_pooling2d_5 (MaxPooling2 (None, 56, 56, 64) 0 \n", "_________________________________________________________________\n", "conv2d_12 (Conv2D) (None, 56, 56, 128) 73856 \n", "_________________________________________________________________\n", "conv2d_13 (Conv2D) (None, 56, 56, 128) 147584 \n", "_________________________________________________________________\n", "max_pooling2d_6 (MaxPooling2 (None, 28, 28, 128) 0 \n", "_________________________________________________________________\n", "conv2d_14 (Conv2D) (None, 28, 28, 128) 262272 \n", "_________________________________________________________________\n", "conv2d_15 (Conv2D) (None, 28, 28, 128) 147584 \n", "_________________________________________________________________\n", "max_pooling2d_7 (MaxPooling2 (None, 14, 14, 128) 0 \n", "_________________________________________________________________\n", "flatten_1 (Flatten) (None, 25088) 0 \n", "=================================================================\n", "Total params: 696,864\n", "Trainable params: 696,864\n", "Non-trainable params: 0\n", "_________________________________________________________________\n" ] } ], "source": [ "cnn_model = build_cnn()\n", "cnn_model.summary()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 272 }, "id": "PJrD3ZI343OB", "outputId": "40eeb80f-1262-4275-e8bb-c976f3df0990" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "WARNING:tensorflow:Layer lstm_1 will not use cuDNN kernels since it doesn't meet the criteria. It will use a generic GPU kernel as fallback when running on GPU.\n", "Model: \"sequential_3\"\n", "_________________________________________________________________\n", "Layer (type) Output Shape Param # \n", "=================================================================\n", "time_distributed_1 (TimeDist (None, 10, 25088) 696864 \n", "_________________________________________________________________\n", "masking_1 (Masking) (None, 10, 25088) 0 \n", "_________________________________________________________________\n", "lstm_1 (LSTM) (None, 128) 12911104 \n", "_________________________________________________________________\n", "dense_2 (Dense) (None, 32) 4128 \n", "_________________________________________________________________\n", "dropout_1 (Dropout) (None, 32) 0 \n", "_________________________________________________________________\n", "dense_3 (Dense) (None, 3) 99 \n", "=================================================================\n", "Total params: 13,612,195\n", "Trainable params: 13,612,195\n", "Non-trainable params: 0\n", "_________________________________________________________________\n" ] } ], "source": [ "model = build_lstm(cnn_model)\n", "model.summary()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Generando un conjunto de datos que funcione con el modelo" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Generaremos una función que tome un directorio donde se encuentran las imágenes y retorne tensores con los valores de los pixeles junto con su respectiva etiqueta. Recuerde como estan almacenados nuestros datos:\n", "\n", "```\n", "Dataset/\n", "├─ clase1/\n", "│ ├─ vide1/\n", "│ │ ├─ video1_frame_00.jpg\n", "│ │ ├─ video1_frame_01.jpg\n", "│ │ ├─ video1_frame_02.jpg\n", "│ │ ├─ video1_frame_03.jpg\n", "│ │ └─ ...\n", "│ └─ video2/\n", "│ ├─ video2_frame_00.jpg\n", "│ ├─ video2_frame_01.jpg\n", "│ ├─ video2_frame_02.jpg\n", "│ ├─ video2_frame_03.jpg\n", "│ └─ ...\n", "├─ clase2/\n", "│ ├─ vide1/\n", "│ │ ├─ video1_frame_00.jpg\n", "│ │ ├─ video1_frame_01.jpg\n", "│ │ ├─ video1_frame_02.jpg\n", "│ │ ├─ video1_frame_03.jpg\n", "│ │ └─ ...\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Etiquetas" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Veamos cuales son las etiquetas disponibles:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "id": "oBn_FjWUTDbB" }, "outputs": [ { "data": { "text/plain": [ "LabelEncoder()" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pathlib\n", "from sklearn import preprocessing\n", "\n", "label_encoder = preprocessing.LabelEncoder()\n", "label_encoder.fit(labels)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Consultemos sus valores:" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array(['PlayingCello', 'PlayingGuitar', 'PlayingViolin'], dtype='= sequence_length:\n", " break\n", " padded_sequence[idx] = parse_image(img, channels, img_size)\n", "\n", " return padded_sequence\n", "\n", "def generate_sequences():\n", " for video_folder in pathlib.PosixPath(FRAMES_PATH).glob('*/*/'):\n", " label = video_folder.parent.name\n", " yield (parse_video(video_folder, SEQUENCE_LENGTH, CHANNELS, IMG_SIZE), label_encoder.transform([str(label)])[0])\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Construimos un objeto `tf.data.Dataset`:" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "id": "IRf8GJhYraop" }, "outputs": [], "source": [ "import tensorflow as tf\n", "\n", "dataset = tf.data.Dataset.from_generator(generate_sequences, \n", " output_signature=(\n", " tf.TensorSpec(shape=(SEQUENCE_LENGTH, IMG_SIZE, IMG_SIZE, CHANNELS), dtype=tf.float32), \n", " tf.TensorSpec(shape=(), dtype=tf.int16))\n", " ).shuffle(400).batch(16)" ] }, { "cell_type": "markdown", "metadata": { "id": "COmfsQ7I_DVh" }, "source": [ "Probemos el generador para revisar si funciona correctamente:" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "oC1eFI-49yTe", "outputId": "1df39c3b-4ef4-4f73-8855-24a1d90d2dd9" }, "outputs": [ { "data": { "text/plain": [ "TensorShape([16, 10, 224, 224, 3])" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list(dataset.take(1))[0][0].shape" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Entrenando el modelo" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "7vRlk_Jj5M_e", "outputId": "f79669d7-0d0a-4798-8ded-19d2bd3e0082" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Epoch 1/10\n", "27/27 [==============================] - 75s 2s/step - loss: 1.1001 - accuracy: 0.3561\n", "Epoch 2/10\n", "27/27 [==============================] - 48s 1s/step - loss: 1.0946 - accuracy: 0.3514\n", "Epoch 3/10\n", "27/27 [==============================] - 48s 1s/step - loss: 0.8938 - accuracy: 0.5448\n", "Epoch 4/10\n", "27/27 [==============================] - 48s 1s/step - loss: 0.7407 - accuracy: 0.6651\n", "Epoch 5/10\n", "27/27 [==============================] - 48s 1s/step - loss: 0.7253 - accuracy: 0.6533\n", "Epoch 6/10\n", "27/27 [==============================] - 48s 1s/step - loss: 0.9794 - accuracy: 0.4717\n", "Epoch 7/10\n", "27/27 [==============================] - 48s 1s/step - loss: 0.6776 - accuracy: 0.6698\n", "Epoch 8/10\n", "27/27 [==============================] - 48s 1s/step - loss: 0.5862 - accuracy: 0.7052\n", "Epoch 9/10\n", "27/27 [==============================] - 48s 1s/step - loss: 0.5810 - accuracy: 0.7264\n", "Epoch 10/10\n", "27/27 [==============================] - 48s 1s/step - loss: 0.6770 - accuracy: 0.7217\n" ] } ], "source": [ "history = model.fit(dataset, epochs=10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Preguntas:\n", " \n", " - ¿Que le parecen estos resulados?\n", " - ¿Como podría aplicar transferencia de aprendizaje en este ejemplo?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Utilizando una capa más potente como extractor de predictores" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Podemos combinar esta técnica con transferencia de aprendizaje. Para realizar esto podemos utilizar TensorFlow Hub.\n", "\n", "> Nota: esta forma de implementación resulta ineficiente computacionalmente, aunque sencilla de interpretar." ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [], "source": [ "EXTRACTOR_SIZE = 1280" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [], "source": [ "import tensorflow_hub as tfhub\n", "\n", "def build_cnn_tfhub():\n", " extractor = tfhub.KerasLayer(\"https://tfhub.dev/google/imagenet/mobilenet_v2_100_224/feature_vector/4\",\n", " input_shape=(IMG_SIZE, IMG_SIZE, CHANNELS),\n", " output_shape=(EXTRACTOR_SIZE),\n", " trainable=False)\n", " \n", " return keras.layers.Lambda(lambda x: extractor(x))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Instanciamos el extractor de predictores:" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [], "source": [ "feature_extractor = build_cnn_tfhub()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Lo insertamos en nuestra red:" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [], "source": [ "def build_lstm(feature_extractor):\n", " model = keras.models.Sequential([\n", " keras.layers.InputLayer(input_shape=(SEQUENCE_LENGTH, IMG_SIZE, IMG_SIZE, CHANNELS)),\n", " keras.layers.TimeDistributed(feature_extractor),\n", " keras.layers.Masking(mask_value=0.),\n", " keras.layers.LSTM(512, dropout=0.5, recurrent_dropout=0.5),\n", " keras.layers.Dense(128, activation='relu'),\n", " keras.layers.Dropout(0.3),\n", " keras.layers.Dense(3, activation='softmax')\n", " ])\n", "\n", " model.compile(optimizer='adam', loss=tf.keras.losses.SparseCategoricalCrossentropy(), metrics=['accuracy'])\n", " return model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Nota: Si `TimeDistributed` no funciona para usted, puede cambiarlo por el siguiente codigo:\n", "\n", "```\n", "keras.layers.Lambda(\n", " lambda x: tf.reshape(feature_extractor(tf.reshape(x, [-1, IMG_SIZE, IMG_SIZE,CHANNELS])),\n", " [-1, SEQUENCE_LENGTH, EXTRACTOR_SIZE]),\n", "),\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Contruimos el modelo" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "WARNING:tensorflow:Layer lstm_3 will not use cuDNN kernels since it doesn't meet the criteria. It will use a generic GPU kernel as fallback when running on GPU.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:tensorflow:Layer lstm_3 will not use cuDNN kernels since it doesn't meet the criteria. It will use a generic GPU kernel as fallback when running on GPU.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Model: \"sequential_5\"\n", "_________________________________________________________________\n", "Layer (type) Output Shape Param # \n", "=================================================================\n", "time_distributed_3 (TimeDist (None, 10, 25088) 696864 \n", "_________________________________________________________________\n", "masking_3 (Masking) (None, 10, 25088) 0 \n", "_________________________________________________________________\n", "lstm_3 (LSTM) (None, 512) 52430848 \n", "_________________________________________________________________\n", "dense_6 (Dense) (None, 128) 65664 \n", "_________________________________________________________________\n", "dropout_3 (Dropout) (None, 128) 0 \n", "_________________________________________________________________\n", "dense_7 (Dense) (None, 3) 387 \n", "=================================================================\n", "Total params: 53,193,763\n", "Trainable params: 53,193,763\n", "Non-trainable params: 0\n", "_________________________________________________________________\n" ] } ], "source": [ "model = build_lstm(cnn_model)\n", "model.summary()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Entrenamos el modelo" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Epoch 1/10\n", "27/27 [==============================] - 56s 1s/step - loss: 0.8045 - accuracy: 0.5802\n", "Epoch 2/10\n", "27/27 [==============================] - 53s 2s/step - loss: 0.5732 - accuracy: 0.7146\n", "Epoch 3/10\n", "27/27 [==============================] - 53s 2s/step - loss: 0.4512 - accuracy: 0.7948\n", "Epoch 4/10\n", "27/27 [==============================] - 53s 2s/step - loss: 0.3997 - accuracy: 0.8396\n", "Epoch 5/10\n", "27/27 [==============================] - 53s 2s/step - loss: 0.3705 - accuracy: 0.8349\n", "Epoch 6/10\n", "27/27 [==============================] - 53s 2s/step - loss: 0.2939 - accuracy: 0.8939\n", "Epoch 7/10\n", "27/27 [==============================] - 53s 2s/step - loss: 0.2220 - accuracy: 0.9175\n", "Epoch 8/10\n", "27/27 [==============================] - 53s 2s/step - loss: 0.1632 - accuracy: 0.9575\n", "Epoch 9/10\n", "27/27 [==============================] - 53s 2s/step - loss: 0.2006 - accuracy: 0.9387\n", "Epoch 10/10\n", "27/27 [==============================] - 53s 2s/step - loss: 0.5872 - accuracy: 0.7783\n" ] } ], "source": [ "history = model.fit(dataset, epochs=10)" ] } ], "metadata": { "accelerator": "GPU", "colab": { "name": "CNNs.ipynb", "provenance": [] }, "kernelspec": { "display_name": "Python 3.8.10 64-bit", "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.8.10" }, "vscode": { "interpreter": { "hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6" } }, "widgets": { "application/vnd.jupyter.widget-state+json": { "02fa91e96b7c4018aa49966300118888": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "04a833d4a05c4aae8b5a5d038a0a0cf5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "0d31622bf2174b0f8cc0577ce51b10ee": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "14096e9a8ead4aeda33e718d82b63599": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "danger", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_971a2dea22314f4a89fe983fafada55d", "max": 50000, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_b978e2a941924257bf310d667634cfc0", "value": 49999 } }, "17ba3cf0f15e45e4ad81300c473d94ec": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "20px" } }, "1bc692f2cce54bd99c471fd079524d03": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "245dd51a75ac4206ba4dc59ae4368a91": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "2bcf48ced9bf4b95a9cf74c47ce701bd": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "danger", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_ca7ae85da0bb45138e552b9c3fb99b6d", "max": 10000, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_f63d61325960472286323ccad5c0a8c1", "value": 9999 } }, "2d379880079e4d41b834ac6d24a4e973": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_8e9b0c286254445e85c8a07ded95664a", "placeholder": "​", "style": "IPY_MODEL_db6ee4ce372a4b7796a50f4245f32391", "value": " 1/1 [00:14<00:00, 12.24s/ url]" } }, "2ef9c6045bd84828a911005cf3dc5e77": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_aa546b5e6592444887d3cd6807bb51c5", "IPY_MODEL_4dd307101fb54034bec8bb9880dc3f63", "IPY_MODEL_5064bc9e21c043bea68023717c371e76" ], "layout": "IPY_MODEL_8f65f79b9c934984ad51f526a6a8de3a" } }, "30b53f6a9f9743c784255c6a3a4889e6": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "31f08f9b00ac42b5b1baa88584ac38ce": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "3353567fd71a4ecdba723667d255a64a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_acb70112d114472ea8bdf5f17e0b2365", "placeholder": "​", "style": "IPY_MODEL_a4ae53d2fa794a63a1c0c0fe726f5b9c", "value": "Dl Size...: 100%" } }, "39d0a0370a614e909b67f3ac6425a882": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "3e52f7e8557541679b245d489b095ade": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "42fb5250fe444e7dbdb2b198ee9ff2ff": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_adb44fc68ed847009506446e18f518dd", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_79909db9791341598ac1e88acdd4376b", "value": 1 } }, "434cb581266849a58cd6847c6f1db563": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "44fb7b511fec476cb325c3a4bcf49e50": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "49d6851b7a914aaf912544a5c64a59ca": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "4ca0f46a38b6407f92df51867eb5a98f": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "20px" } }, "4dd307101fb54034bec8bb9880dc3f63": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "info", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_17ba3cf0f15e45e4ad81300c473d94ec", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_c73c11d0ea684febb407cef61dc10385", "value": 1 } }, "5064bc9e21c043bea68023717c371e76": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_6ce09378352146baaf3e6927ab67818a", "placeholder": "​", "style": "IPY_MODEL_39d0a0370a614e909b67f3ac6425a882", "value": " 9971/0 [00:11<00:00, 880.94 examples/s]" } }, "57bc5efa91684d109f9d5e05b2285b0c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_f101f8d04e8241f4999063532b0a4cf8", "IPY_MODEL_e124b2fdba3442cda440f8a291b081ad", "IPY_MODEL_eddaafcef91847a79474ddd17cd0d1cf" ], "layout": "IPY_MODEL_6977f2b57675492eb9764fb3bdf01a9c" } }, "6008d81bd4794bd590333e28e33c46ca": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "6977f2b57675492eb9764fb3bdf01a9c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "6ce09378352146baaf3e6927ab67818a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "70f63988c3fe46f1b2e50fc3991be1ae": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "71283db175b24cc182d0b75608b91fc0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_730cabee4e4649889be5456696759310", "placeholder": "​", "style": "IPY_MODEL_f25d44f1dd7c4663ad60b78c4aea59ae", "value": " 49999/50000 [00:00<00:00, 112412.49 examples/s]" } }, "72ff895f6da34a8e9a6f3c18e62ccb86": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "730cabee4e4649889be5456696759310": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "74079e8219cf4b1fb8cacb0de488a94c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "74ee6e37dbdb4f7a998978ebd6014e06": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_70f63988c3fe46f1b2e50fc3991be1ae", "placeholder": "​", "style": "IPY_MODEL_1bc692f2cce54bd99c471fd079524d03", "value": "100%" } }, "75048468aaf040acb66b1a9f824f06d3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "79909db9791341598ac1e88acdd4376b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "7ee61797945948e09f05dc5c3c1b417c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "800f973161eb4ae8a1e9e662919d4273": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_f63013265b2e40a995fa6d5414ec6151", "IPY_MODEL_42fb5250fe444e7dbdb2b198ee9ff2ff", "IPY_MODEL_2d379880079e4d41b834ac6d24a4e973" ], "layout": "IPY_MODEL_b90b85ef3f114528996a366e1b633f04" } }, "819fe743dcfc4d149a7ed92891031fed": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "8e9b0c286254445e85c8a07ded95664a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "8f65f79b9c934984ad51f526a6a8de3a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "93d83f9a323d4266bf1b906f2a4a78ac": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "941126311ced43608197534db3538263": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "94d7ac24026f4892a873c0e78c3b16f4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_cc02ef0fd50446cdb3fb3106aae04d71", "placeholder": "​", "style": "IPY_MODEL_7ee61797945948e09f05dc5c3c1b417c", "value": "100%" } }, "971a2dea22314f4a89fe983fafada55d": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "99d530a6549b405aaee8b879dfc4ada9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "9f1453748bc14f068fbef050a9edd25c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_74ee6e37dbdb4f7a998978ebd6014e06", "IPY_MODEL_14096e9a8ead4aeda33e718d82b63599", "IPY_MODEL_71283db175b24cc182d0b75608b91fc0" ], "layout": "IPY_MODEL_72ff895f6da34a8e9a6f3c18e62ccb86" } }, "a4ae53d2fa794a63a1c0c0fe726f5b9c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "a99198139c184c2f935ab9fa82090d31": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "aa546b5e6592444887d3cd6807bb51c5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_49d6851b7a914aaf912544a5c64a59ca", "placeholder": "​", "style": "IPY_MODEL_aeed96838a494ff7a76a1704de6c4f7d", "value": "" } }, "acb70112d114472ea8bdf5f17e0b2365": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "adb44fc68ed847009506446e18f518dd": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "20px" } }, "adcc0bab948d402fbbe4ba0e63d9158c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_3353567fd71a4ecdba723667d255a64a", "IPY_MODEL_e3a6e2aa94bb43748a7b54f2aab2f98b", "IPY_MODEL_b48a5deea7bf4018a764d1ce57e8a9fe" ], "layout": "IPY_MODEL_e8abb8af1e1248beac181090efe6c37d" } }, "aeed96838a494ff7a76a1704de6c4f7d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "b48a5deea7bf4018a764d1ce57e8a9fe": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_e651aec3b3ac4ad19c2518b7ea5d54e2", "placeholder": "​", "style": "IPY_MODEL_99d530a6549b405aaee8b879dfc4ada9", "value": " 162/162 [00:14<00:00, 16.00 MiB/s]" } }, "b78d009673f542bf9bb272c545031442": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_94d7ac24026f4892a873c0e78c3b16f4", "IPY_MODEL_2bcf48ced9bf4b95a9cf74c47ce701bd", "IPY_MODEL_dc33deb8e98042e2b065886302965e88" ], "layout": "IPY_MODEL_6008d81bd4794bd590333e28e33c46ca" } }, "b90b85ef3f114528996a366e1b633f04": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "b978e2a941924257bf310d667634cfc0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "c27dd1b70b494f0495502e79418fdef7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_819fe743dcfc4d149a7ed92891031fed", "placeholder": "​", "style": "IPY_MODEL_0d31622bf2174b0f8cc0577ce51b10ee", "value": "Extraction completed...: 100%" } }, "c40eaaedb76f40408a7aca122ef6214e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "c73c11d0ea684febb407cef61dc10385": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "ca7ae85da0bb45138e552b9c3fb99b6d": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "cc02ef0fd50446cdb3fb3106aae04d71": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "ccce1497976c47bcaf07a472a7e4c39a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_c27dd1b70b494f0495502e79418fdef7", "IPY_MODEL_deaffef7e1c34741af8dbe586aa894a1", "IPY_MODEL_f7f26f5c31b04487b89be5054a3ded68" ], "layout": "IPY_MODEL_a99198139c184c2f935ab9fa82090d31" } }, "db6ee4ce372a4b7796a50f4245f32391": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "dc33deb8e98042e2b065886302965e88": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_245dd51a75ac4206ba4dc59ae4368a91", "placeholder": "​", "style": "IPY_MODEL_75048468aaf040acb66b1a9f824f06d3", "value": " 9999/10000 [00:00<00:00, 37133.93 examples/s]" } }, "dc58971750e74173b26ba934dbf51aa8": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "20px" } }, "deaffef7e1c34741af8dbe586aa894a1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_dc58971750e74173b26ba934dbf51aa8", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_04a833d4a05c4aae8b5a5d038a0a0cf5", "value": 1 } }, "e124b2fdba3442cda440f8a291b081ad": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "info", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_4ca0f46a38b6407f92df51867eb5a98f", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_93d83f9a323d4266bf1b906f2a4a78ac", "value": 1 } }, "e3a6e2aa94bb43748a7b54f2aab2f98b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_fa2a437796c84b9097ea084b058cae8b", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_3e52f7e8557541679b245d489b095ade", "value": 1 } }, "e651aec3b3ac4ad19c2518b7ea5d54e2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "e8abb8af1e1248beac181090efe6c37d": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "eddaafcef91847a79474ddd17cd0d1cf": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_30b53f6a9f9743c784255c6a3a4889e6", "placeholder": "​", "style": "IPY_MODEL_74079e8219cf4b1fb8cacb0de488a94c", "value": " 49968/0 [01:02<00:00, 882.96 examples/s]" } }, "f101f8d04e8241f4999063532b0a4cf8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_44fb7b511fec476cb325c3a4bcf49e50", "placeholder": "​", "style": "IPY_MODEL_941126311ced43608197534db3538263", "value": "" } }, "f25d44f1dd7c4663ad60b78c4aea59ae": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "f63013265b2e40a995fa6d5414ec6151": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_02fa91e96b7c4018aa49966300118888", "placeholder": "​", "style": "IPY_MODEL_c40eaaedb76f40408a7aca122ef6214e", "value": "Dl Completed...: 100%" } }, "f63d61325960472286323ccad5c0a8c1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "f7f26f5c31b04487b89be5054a3ded68": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_434cb581266849a58cd6847c6f1db563", "placeholder": "​", "style": "IPY_MODEL_31f08f9b00ac42b5b1baa88584ac38ce", "value": " 1/1 [00:14<00:00, 14.72s/ file]" } }, "fa2a437796c84b9097ea084b058cae8b": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "20px" } } } } }, "nbformat": 4, "nbformat_minor": 4 }