├── .gitattributes ├── images ├── umap_fire.png └── umap_banner.png ├── models └── fashion_mnist_encoder.pt ├── README.md ├── .gitignore ├── source ├── arch │ └── VAE.py └── umap_projection.ipynb └── environment.yml /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /images/umap_fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhudsmith/nnet_umap/HEAD/images/umap_fire.png -------------------------------------------------------------------------------- /images/umap_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhudsmith/nnet_umap/HEAD/images/umap_banner.png -------------------------------------------------------------------------------- /models/fashion_mnist_encoder.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhudsmith/nnet_umap/HEAD/models/fashion_mnist_encoder.pt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![umap banner](images/umap_banner.png) 2 | 3 | This repository shows how to make pictures like the one above. 4 | 5 | This simple repo contains code for training a VAE on fashion MNIST data and 6 | then using the encoder from the VAE to generate features for each fashion 7 | MNIST image. These are then used as the inputs for the UMAP projection. 8 | The latter relies heavily on the excellent [`umap-learn`](https://github.com/lmcinnes/umap) 9 | python library. 10 | 11 | ### Set up the environment 12 | Clone this repository somewhere: 13 | ```bash 14 | git clone https://github.com/dhudsmith/nnet_umap.git 15 | ``` 16 | 17 | With anaconda installed, navigate to the project root and execute 18 | ```bash 19 | conda env create -f environment.yml 20 | ``` 21 | 22 | To start the environment, execute 23 | ```bash 24 | conda activate nnet_umap 25 | ``` 26 | Use `conda deactivate` to exit. 27 | 28 | ### Starting jupyter 29 | Within the conda environment, execute 30 | ```bash 31 | jupyter lab 32 | ``` 33 | Jupyter should open in your default browser. If not, 34 | follow the link in your terminal. 35 | 36 | ### Training the VAE 37 | You can optionally run through `train_vae.ipynb` jupyter notebook to train the VAE yourself 38 | using the fashion-MNIST dataset. A pretrained encoder 39 | is available in the `models/` folder, so you can skip this unless you want to 40 | customize the model or use a different dataset. 41 | 42 | ### Generating the graphic 43 | Run through `umap_projection.ipynb` to generate the visual. Note the settings at the top 44 | these control the number of data points used, the color scheme, 45 | the resolution, and the size of data points. The code can take an hour or more 46 | run if you use lots of data points. The default parameters should run in a few minutes 47 | on most machines. If all goes well, you should get something like this with default settings: 48 | ![umap example](images/umap_fire.png) 49 | 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | data 2 | models 3 | *.ipynb_checkpoints 4 | .idea 5 | 6 | # Byte-compiled / optimized / DLL files 7 | __pycache__/ 8 | *.py[cod] 9 | *$py.class 10 | 11 | # C extensions 12 | *.so 13 | 14 | # Distribution / packaging 15 | .Python 16 | build/ 17 | develop-eggs/ 18 | dist/ 19 | downloads/ 20 | eggs/ 21 | .eggs/ 22 | lib/ 23 | lib64/ 24 | parts/ 25 | sdist/ 26 | var/ 27 | wheels/ 28 | *.egg-info/ 29 | .installed.cfg 30 | *.egg 31 | MANIFEST 32 | 33 | # PyInstaller 34 | # Usually these files are written by a python script from a template 35 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 36 | *.manifest 37 | *.spec 38 | 39 | # Installer logs 40 | pip-log.txt 41 | pip-delete-this-directory.txt 42 | 43 | # Unit test / coverage reports 44 | htmlcov/ 45 | .tox/ 46 | .nox/ 47 | .coverage 48 | .coverage.* 49 | .cache 50 | nosetests.xml 51 | coverage.xml 52 | *.cover 53 | .hypothesis/ 54 | .pytest_cache/ 55 | 56 | # Translations 57 | *.mo 58 | *.pot 59 | 60 | # Django stuff: 61 | *.log 62 | local_settings.py 63 | db.sqlite3 64 | 65 | # Flask stuff: 66 | instance/ 67 | .webassets-cache 68 | 69 | # Scrapy stuff: 70 | .scrapy 71 | 72 | # Sphinx documentation 73 | docs/_build/ 74 | 75 | # PyBuilder 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | .python-version 87 | 88 | # celery beat schedule file 89 | celerybeat-schedule 90 | 91 | # SageMath parsed files 92 | *.sage.py 93 | 94 | # Environments 95 | .env 96 | .venv 97 | env/ 98 | venv/ 99 | ENV/ 100 | env.bak/ 101 | venv.bak/ 102 | 103 | # Spyder project settings 104 | .spyderproject 105 | .spyproject 106 | 107 | # Rope project settings 108 | .ropeproject 109 | 110 | # mkdocs documentation 111 | /site 112 | 113 | # mypy 114 | .mypy_cache/ 115 | .dmypy.json 116 | dmypy.json 117 | 118 | # Pyre type checker 119 | .pyre/ 120 | -------------------------------------------------------------------------------- /source/arch/VAE.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | from collections import OrderedDict 4 | 5 | 6 | class Encoder(nn.Module): 7 | def __init__(self, coarse_resolution=(4, 4), hid_channels=(8, 12, 16)): 8 | super(Encoder, self).__init__() 9 | 10 | self.coarse_resolution = coarse_resolution 11 | 12 | # block 1: 13 | self.block1 = nn.Sequential(OrderedDict( 14 | conv=nn.Conv2d(in_channels=1, out_channels=hid_channels[0], kernel_size=5, stride=1, padding=2, bias=False), 15 | bn=nn.BatchNorm2d(hid_channels[0]), 16 | relu=nn.ReLU(), 17 | pool=nn.MaxPool2d(2) 18 | )) 19 | 20 | # block 2: 21 | self.block2 = nn.Sequential(OrderedDict( 22 | conv=nn.Conv2d(in_channels=hid_channels[0], out_channels=hid_channels[1], kernel_size=3, stride=1, 23 | padding=1, bias=False), 24 | bn=nn.BatchNorm2d(num_features=hid_channels[1]), 25 | relu=nn.ReLU(), 26 | pool=nn.MaxPool2d(2) 27 | )) 28 | 29 | # block 3: 30 | self.block3 = nn.Sequential(OrderedDict( 31 | conv=nn.Conv2d(in_channels=hid_channels[1], out_channels=hid_channels[2], kernel_size=3, stride=1, 32 | padding=1, bias=False), 33 | bn=nn.BatchNorm2d(num_features=hid_channels[2]), 34 | relu=nn.ReLU(), 35 | pool=nn.AdaptiveAvgPool2d(output_size=self.coarse_resolution), 36 | flatten=nn.Flatten() 37 | )) 38 | 39 | def forward(self, x): 40 | x = self.block1(x) 41 | x = self.block2(x) 42 | z = self.block3(x) 43 | 44 | return (z) 45 | 46 | 47 | class Decoder(nn.Module): 48 | def __init__(self, coarse_resolution=(4, 4), hid_channels=(16, 12, 8)): 49 | super(Decoder, self).__init__() 50 | 51 | self.coarse_resolution = coarse_resolution 52 | self.zdim = hid_channels[0] * self.coarse_resolution[0] * self.coarse_resolution[1] 53 | 54 | # block 1: 55 | self.block1 = nn.Sequential(OrderedDict( 56 | unflatten=nn.Unflatten(-1, (hid_channels[0], self.coarse_resolution[0], self.coarse_resolution[1])), 57 | conv=nn.Conv2d(in_channels=hid_channels[0], out_channels=hid_channels[1], kernel_size=3, stride=1, 58 | padding=1, bias=False), 59 | bn=nn.BatchNorm2d(hid_channels[1]), 60 | relu=nn.ReLU(), 61 | upsample=nn.UpsamplingBilinear2d(scale_factor=2) 62 | )) 63 | 64 | # block 2: 65 | self.block2 = nn.Sequential(OrderedDict( 66 | conv=nn.Conv2d(in_channels=hid_channels[1], out_channels=hid_channels[2], kernel_size=3, stride=1, 67 | padding=1, bias=False), 68 | bn=nn.BatchNorm2d(num_features=hid_channels[2]), 69 | relu=nn.ReLU(), 70 | upsample=nn.UpsamplingBilinear2d(scale_factor=2) 71 | )) 72 | 73 | # block 3: 74 | self.block3 = nn.Sequential(OrderedDict( 75 | conv=nn.Conv2d(in_channels=hid_channels[2], out_channels=hid_channels[2], kernel_size=3, stride=1, 76 | padding=1, bias=False), 77 | bn=nn.BatchNorm2d(num_features=hid_channels[2]), 78 | relu=nn.ReLU(), 79 | upsample=nn.UpsamplingBilinear2d(size=(28, 28)) 80 | )) 81 | 82 | # touch-up 83 | self.touchup = nn.Sequential(OrderedDict( 84 | conv=nn.Conv2d(in_channels=hid_channels[2], out_channels=1, kernel_size=3, stride=1, padding=1), 85 | sig=nn.Sigmoid() 86 | )) 87 | 88 | def forward(self, z): 89 | z = self.block1(z) 90 | z = self.block2(z) 91 | z = self.block3(z) 92 | x = self.touchup(z) 93 | 94 | return (x) 95 | 96 | 97 | class VAE(nn.Module): 98 | def __init__(self, 99 | coarse_resolution=(4, 4), 100 | hid_channels_encoder=(8, 12, 16), 101 | hid_channels_decoder=(16, 12, 8), 102 | hdim=128): 103 | super(VAE, self).__init__() 104 | 105 | self.coarse_resolution = coarse_resolution 106 | self.hid_channels_encoder = hid_channels_encoder 107 | self.hid_channels_decoder = hid_channels_decoder 108 | self.hdim = hdim 109 | self.zdim = coarse_resolution[0] * coarse_resolution[1] * hid_channels_encoder[2] 110 | 111 | # encoder/decoder 112 | self.encoder = Encoder(coarse_resolution, hid_channels_encoder) 113 | self.decoder = Decoder(coarse_resolution, hid_channels_decoder) 114 | 115 | # reparametrization 116 | self.mu = nn.Linear(self.zdim, self.hdim) 117 | self.logvar = nn.Linear(self.zdim, self.hdim) 118 | self.zdecode = nn.Linear(self.hdim, self.zdim) 119 | 120 | def encode(self, x): 121 | z = self.encoder(x) 122 | return self.mu(z), self.logvar(z) 123 | 124 | def sample(self, mu, log_var): 125 | std = torch.exp(0.5 * log_var) 126 | eps = torch.randn_like(std) 127 | return eps.mul(std).add_(mu) # return z sample 128 | 129 | def decode(self, h): 130 | z = self.zdecode(h) 131 | x = self.decoder(z) 132 | return x 133 | 134 | def forward(self, x): 135 | mu, log_var = self.encode(x) 136 | h = self.sample(mu, log_var) 137 | return self.decode(h), mu, log_var 138 | 139 | -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: nnet_umap 2 | channels: 3 | - pytorch 4 | - conda-forge 5 | - defaults 6 | dependencies: 7 | - argon2-cffi=20.1.0=py37h2bbff1b_1 8 | - async_generator=1.10=py37h28b3542_0 9 | - attrs=20.3.0=pyhd3eb1b0_0 10 | - backcall=0.2.0=pyhd3eb1b0_0 11 | - blas=2.108=mkl 12 | - blas-devel=3.9.0=8_mkl 13 | - bleach=3.3.0=pyhd3eb1b0_0 14 | - bokeh=2.3.0=py37haa95532_0 15 | - brotlipy=0.7.0=py37h2bbff1b_1003 16 | - ca-certificates=2021.1.19=haa95532_1 17 | - certifi=2020.12.5=py37haa95532_0 18 | - cffi=1.14.5=py37hcd4344a_0 19 | - chardet=4.0.0=py37haa95532_1003 20 | - click=7.1.2=pyhd3eb1b0_0 21 | - cloudpickle=1.6.0=py_0 22 | - colorama=0.4.4=pyhd3eb1b0_0 23 | - colorcet=2.0.6=pyhd3eb1b0_0 24 | - cryptography=3.4.6=py37h71e12ea_0 25 | - cudatoolkit=11.1.1=heb2d755_7 26 | - cycler=0.10.0=py37_0 27 | - cytoolz=0.11.0=py37he774522_0 28 | - dask=2021.3.0=pyhd3eb1b0_0 29 | - dask-core=2021.3.0=pyhd3eb1b0_0 30 | - datashader=0.11.1=py_0 31 | - datashape=0.5.4=py37haa95532_1 32 | - decorator=4.4.2=pyhd3eb1b0_0 33 | - defusedxml=0.7.1=pyhd3eb1b0_0 34 | - distributed=2021.3.0=py37haa95532_0 35 | - entrypoints=0.3=py37_0 36 | - freetype=2.10.4=h546665d_1 37 | - fsspec=0.8.3=py_0 38 | - heapdict=1.0.1=py_0 39 | - holoviews=1.14.2=pyhd3eb1b0_0 40 | - icu=58.2=ha925a31_3 41 | - idna=2.10=pyhd3eb1b0_0 42 | - imageio=2.9.0=py_0 43 | - importlib-metadata=2.0.0=py_1 44 | - importlib_metadata=2.0.0=1 45 | - intel-openmp=2020.3=h57928b3_311 46 | - ipykernel=5.3.4=py37h5ca1d4c_0 47 | - ipython=7.21.0=py37hd4e2768_0 48 | - ipython_genutils=0.2.0=pyhd3eb1b0_1 49 | - ipywidgets=7.6.3=pyhd3eb1b0_1 50 | - jedi=0.17.0=py37_0 51 | - jinja2=2.11.3=pyhd3eb1b0_0 52 | - joblib=1.0.1=pyhd8ed1ab_0 53 | - jpeg=9b=hb83a4c4_2 54 | - json5=0.9.5=py_0 55 | - jsonschema=3.2.0=py_2 56 | - jupyter=1.0.0=py37_7 57 | - jupyter_client=6.1.7=py_0 58 | - jupyter_console=6.2.0=py_0 59 | - jupyter_core=4.7.1=py37haa95532_0 60 | - jupyterlab=2.2.6=py_0 61 | - jupyterlab_pygments=0.1.2=py_0 62 | - jupyterlab_server=1.2.0=py_0 63 | - jupyterlab_widgets=1.0.0=pyhd3eb1b0_1 64 | - kiwisolver=1.3.1=py37hd77b12b_0 65 | - libblas=3.9.0=8_mkl 66 | - libcblas=3.9.0=8_mkl 67 | - liblapack=3.9.0=8_mkl 68 | - liblapacke=3.9.0=8_mkl 69 | - libpng=1.6.37=h1d00b33_2 70 | - libsodium=1.0.18=h62dcd97_0 71 | - libtiff=4.1.0=h56a325e_1 72 | - libuv=1.41.0=h8ffe710_0 73 | - llvmlite=0.35.0=py37habb0c8c_1 74 | - locket=0.2.1=py37haa95532_1 75 | - lz4-c=1.9.3=h8ffe710_0 76 | - m2w64-gcc-libgfortran=5.3.0=6 77 | - m2w64-gcc-libs=5.3.0=7 78 | - m2w64-gcc-libs-core=5.3.0=7 79 | - m2w64-gmp=6.1.0=2 80 | - m2w64-libwinpthread-git=5.0.0.4634.697f757=2 81 | - markdown=3.3.4=py37haa95532_0 82 | - markupsafe=1.1.1=py37hfa6e2cd_1 83 | - matplotlib=3.3.4=py37haa95532_0 84 | - matplotlib-base=3.3.4=py37h49ac443_0 85 | - mistune=0.8.4=py37hfa6e2cd_1001 86 | - mkl=2020.4=hb70f87d_311 87 | - mkl-devel=2020.4=h57928b3_312 88 | - mkl-include=2020.4=hb70f87d_311 89 | - msgpack-python=1.0.2=py37h59b6b97_1 90 | - msys2-conda-epoch=20160418=1 91 | - multipledispatch=0.6.0=py37_0 92 | - nbclient=0.5.3=pyhd3eb1b0_0 93 | - nbconvert=6.0.7=py37_0 94 | - nbformat=5.1.2=pyhd3eb1b0_1 95 | - nest-asyncio=1.5.1=pyhd3eb1b0_0 96 | - networkx=2.5=py_0 97 | - ninja=1.10.2=h5362a0b_0 98 | - notebook=6.2.0=py37haa95532_0 99 | - numba=0.52.0=py37h08fd248_0 100 | - numpy=1.20.1=py37hd20adf4_0 101 | - olefile=0.46=pyh9f0ad1d_1 102 | - openssl=1.1.1j=h2bbff1b_0 103 | - packaging=20.9=pyhd3eb1b0_0 104 | - pandas=1.2.3=py37hf11a4ad_0 105 | - pandoc=2.11=h9490d1a_0 106 | - pandocfilters=1.4.3=py37haa95532_1 107 | - panel=0.10.3=pyhd3eb1b0_0 108 | - param=1.10.1=pyhd3eb1b0_0 109 | - parso=0.8.1=pyhd3eb1b0_0 110 | - partd=1.1.0=py_0 111 | - pickleshare=0.7.5=pyhd3eb1b0_1003 112 | - pillow=8.1.2=py37h4fa10fc_0 113 | - pip=21.0.1=py37haa95532_0 114 | - prometheus_client=0.9.0=pyhd3eb1b0_0 115 | - prompt-toolkit=3.0.8=py_0 116 | - prompt_toolkit=3.0.8=0 117 | - psutil=5.8.0=py37h2bbff1b_1 118 | - pycparser=2.20=py_2 119 | - pyct=0.4.8=py37_0 120 | - pygments=2.8.1=pyhd3eb1b0_0 121 | - pynndescent=0.5.2=pyh44b312d_0 122 | - pyopenssl=20.0.1=pyhd3eb1b0_1 123 | - pyparsing=2.4.7=pyhd3eb1b0_0 124 | - pyqt=5.9.2=py37h6538335_2 125 | - pyrsistent=0.17.3=py37he774522_0 126 | - pysocks=1.7.1=py37_1 127 | - python=3.7.10=h6244533_0 128 | - python-dateutil=2.8.1=pyhd3eb1b0_0 129 | - python_abi=3.7=1_cp37m 130 | - pytorch=1.8.0=py3.7_cuda11.1_cudnn8_0 131 | - pytz=2021.1=pyhd3eb1b0_0 132 | - pyviz_comms=2.0.1=pyhd3eb1b0_0 133 | - pywavelets=1.1.1=py37he774522_2 134 | - pywin32=227=py37he774522_1 135 | - pywinpty=0.5.7=py37_0 136 | - pyyaml=5.4.1=py37h2bbff1b_1 137 | - pyzmq=20.0.0=py37hd77b12b_1 138 | - qt=5.9.7=vc14h73c81de_0 139 | - qtconsole=5.0.2=pyhd3eb1b0_0 140 | - qtpy=1.9.0=py_0 141 | - requests=2.25.1=pyhd3eb1b0_0 142 | - scikit-image=0.17.2=py37h1e1f486_0 143 | - scikit-learn=0.24.1=py37heb15398_0 144 | - scipy=1.6.0=py37h6db1a17_0 145 | - send2trash=1.5.0=pyhd3eb1b0_1 146 | - setuptools=52.0.0=py37haa95532_0 147 | - sip=4.19.8=py37h6538335_0 148 | - six=1.15.0=py37haa95532_0 149 | - sortedcontainers=2.3.0=pyhd3eb1b0_0 150 | - sqlite=3.33.0=h2a8f88b_0 151 | - tbb=2020.2=h2d74725_4 152 | - tblib=1.7.0=py_0 153 | - terminado=0.9.2=py37haa95532_0 154 | - testpath=0.4.4=pyhd3eb1b0_0 155 | - threadpoolctl=2.1.0=pyh5ca1d4c_0 156 | - tifffile=2020.10.1=py37h8c2d366_2 157 | - tk=8.6.10=h8ffe710_1 158 | - toolz=0.11.1=pyhd3eb1b0_0 159 | - torchvision=0.9.0=py37_cu111 160 | - tornado=6.1=py37h2bbff1b_0 161 | - tqdm=4.56.0=pyhd3eb1b0_0 162 | - traitlets=5.0.5=pyhd3eb1b0_0 163 | - typing_extensions=3.7.4.3=py_0 164 | - umap-learn=0.5.1=py37h03978a9_0 165 | - urllib3=1.26.3=pyhd3eb1b0_0 166 | - vc=14.2=h21ff451_1 167 | - vs2015_runtime=14.27.29016=h5e58377_2 168 | - wcwidth=0.2.5=py_0 169 | - webencodings=0.5.1=py37_1 170 | - wheel=0.36.2=pyhd3eb1b0_0 171 | - widgetsnbextension=3.5.1=py37_0 172 | - win_inet_pton=1.1.0=py37haa95532_0 173 | - wincertstore=0.2=py37_0 174 | - winpty=0.4.3=4 175 | - xarray=0.17.0=pyhd3eb1b0_0 176 | - xz=5.2.5=h62dcd97_1 177 | - yaml=0.2.5=he774522_0 178 | - zeromq=4.3.3=ha925a31_3 179 | - zict=2.0.0=pyhd3eb1b0_0 180 | - zipp=3.4.0=pyhd3eb1b0_0 181 | - zlib=1.2.11=h62dcd97_4 182 | - zstd=1.4.9=h6255e5f_0 183 | prefix: C:\ProgramData\Anaconda3\envs\nnet_art 184 | 185 | -------------------------------------------------------------------------------- /source/umap_projection.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": { 7 | "colab": { 8 | "base_uri": "https://localhost:8080/" 9 | }, 10 | "executionInfo": { 11 | "elapsed": 24708, 12 | "status": "ok", 13 | "timestamp": 1615439111127, 14 | "user": { 15 | "displayName": "Danny Saad", 16 | "photoUrl": "", 17 | "userId": "08768728463630714575" 18 | }, 19 | "user_tz": 300 20 | }, 21 | "id": "AU_4qqlsD8oe", 22 | "outputId": "d8982996-9afe-4463-8186-9f96cf56b1a8" 23 | }, 24 | "outputs": [], 25 | "source": [ 26 | "# Library imports\n", 27 | "import numpy as np\n", 28 | "import pandas as pd\n", 29 | "import argparse\n", 30 | "import torch\n", 31 | "import torch.nn as nn\n", 32 | "import torch.nn.functional as F\n", 33 | "import torch.optim as optim\n", 34 | "from torchvision import datasets, transforms\n", 35 | "from torch.optim.lr_scheduler import StepLR\n", 36 | "import matplotlib.pyplot as plt\n", 37 | "from matplotlib import rcParams\n", 38 | "from PIL import Image\n", 39 | "import math\n", 40 | "from collections import OrderedDict\n", 41 | "\n", 42 | "import umap\n", 43 | "import umap.plot\n", 44 | "from torch.utils.data import Dataset, DataLoader\n", 45 | "from torchvision import utils\n", 46 | "\n", 47 | "from arch.VAE import Encoder" 48 | ] 49 | }, 50 | { 51 | "cell_type": "markdown", 52 | "metadata": {}, 53 | "source": [ 54 | "# Settings" 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": 2, 60 | "metadata": { 61 | "colab": { 62 | "base_uri": "https://localhost:8080/", 63 | "height": 391, 64 | "referenced_widgets": [ 65 | "f121289fe6014cddbdd68e642538d452", 66 | "847e04e040f64a6282cb5a648ad712f9", 67 | "5614716f142843148e2e23482ffb2f82", 68 | "fb5d80053df1495392d95a8db355ed63", 69 | "efa8aa0e6fc0445787294d2f6b5a0ddb", 70 | "4dff4d919b2a478896996b3331bd136a", 71 | "9fe90e309cd9429891fc1ea2ffd7228d", 72 | "214497818dad447bbea1ead62155041c", 73 | "35469ea2b57a4d5aaa903d010c9c371c", 74 | "543786e7602d4e14821378d20e80a915", 75 | "649771a8bb524df6b44b216cca5e9d51", 76 | "45ddae6810954b59a993eb289bef6e6f", 77 | "f565add4b8c146b9919153ca87da3545", 78 | "6c41c0323e314eb4a6d710b4e21b36b0", 79 | "627907c9e8c8491b9f97f23cc067c038", 80 | "30338ead3a9644dcb048de47a60e8143", 81 | "52e39424474f4cadbc8d108137856100", 82 | "440a4e03df8d4d0f8e67312edd77b228", 83 | "612eb9f77c1a4cb9b6f25c621fb86817", 84 | "4073764fd5a440a28b97ac2ed1cc9db5", 85 | "2db75713acf74169acbbfcf86b6c87a0", 86 | "da53ea1b8ef14d8ca099052666155532", 87 | "031265afa26d4ec6b1ab5c7cff988cdb", 88 | "47513adb9d0948dc8f5f096d0d0c867b", 89 | "550a1d3a77384717822334ee79a54210", 90 | "04de8f0749fe4c29b4b4076beee8f55b", 91 | "a8f285b82065482982d270b7d5fec723", 92 | "2f74c334e79d4c48aea98fbc16a57c23", 93 | "8b3deb1d17b845de842b950483274fe3", 94 | "86703ac3319b4b00bae27cf8762b4940", 95 | "4edf3c6005b7431a9fd22f16fd418624", 96 | "f460a9421b534ce7a27a9e447f274201" 97 | ] 98 | }, 99 | "executionInfo": { 100 | "elapsed": 95699, 101 | "status": "ok", 102 | "timestamp": 1614871844071, 103 | "user": { 104 | "displayName": "Dane Smith", 105 | "photoUrl": "", 106 | "userId": "04907521039862763062" 107 | }, 108 | "user_tz": 300 109 | }, 110 | "id": "v1lVPAh3D8r-", 111 | "outputId": "5a368107-c531-4264-ae30-79cd804dd2f6" 112 | }, 113 | "outputs": [ 114 | { 115 | "name": "stdout", 116 | "output_type": "stream", 117 | "text": [ 118 | "Device: cuda\n" 119 | ] 120 | } 121 | ], 122 | "source": [ 123 | "# data settings:\n", 124 | "batch_size_test=1000 \n", 125 | "scale_mu = 0.5 # for rescaling images\n", 126 | "scale_sd = 0.5 # for rescaling images\n", 127 | "\n", 128 | "# visualization\n", 129 | "num=2000 # number of points to use for umap and plotting (max 60,000)\n", 130 | "edge_bundling='hammer'\n", 131 | "show_points=True\n", 132 | "theme='fire'\n", 133 | "width=800\n", 134 | "height=800\n", 135 | "pointsize=5 # size (in pixels) of points\n", 136 | "image_name='umap_' + theme\n", 137 | "\n", 138 | "rcParams['figure.dpi']=400 # the default dpi is 72. Not enough. \n", 139 | "\n", 140 | "# CUDA\n", 141 | "cuda=True #disables CUDA training (default: True)\n", 142 | "use_cuda = cuda and torch.cuda.is_available()\n", 143 | "device = torch.device(\"cuda\" if use_cuda else \"cpu\")\n", 144 | "print(\"Device:\", device)" 145 | ] 146 | }, 147 | { 148 | "cell_type": "markdown", 149 | "metadata": { 150 | "id": "ZGZ9jk2zQhRm" 151 | }, 152 | "source": [ 153 | "# The Data" 154 | ] 155 | }, 156 | { 157 | "cell_type": "code", 158 | "execution_count": 3, 159 | "metadata": { 160 | "colab": { 161 | "base_uri": "https://localhost:8080/", 162 | "height": 391, 163 | "referenced_widgets": [ 164 | "f121289fe6014cddbdd68e642538d452", 165 | "847e04e040f64a6282cb5a648ad712f9", 166 | "5614716f142843148e2e23482ffb2f82", 167 | "fb5d80053df1495392d95a8db355ed63", 168 | "efa8aa0e6fc0445787294d2f6b5a0ddb", 169 | "4dff4d919b2a478896996b3331bd136a", 170 | "9fe90e309cd9429891fc1ea2ffd7228d", 171 | "214497818dad447bbea1ead62155041c", 172 | "35469ea2b57a4d5aaa903d010c9c371c", 173 | "543786e7602d4e14821378d20e80a915", 174 | "649771a8bb524df6b44b216cca5e9d51", 175 | "45ddae6810954b59a993eb289bef6e6f", 176 | "f565add4b8c146b9919153ca87da3545", 177 | "6c41c0323e314eb4a6d710b4e21b36b0", 178 | "627907c9e8c8491b9f97f23cc067c038", 179 | "30338ead3a9644dcb048de47a60e8143", 180 | "52e39424474f4cadbc8d108137856100", 181 | "440a4e03df8d4d0f8e67312edd77b228", 182 | "612eb9f77c1a4cb9b6f25c621fb86817", 183 | "4073764fd5a440a28b97ac2ed1cc9db5", 184 | "2db75713acf74169acbbfcf86b6c87a0", 185 | "da53ea1b8ef14d8ca099052666155532", 186 | "031265afa26d4ec6b1ab5c7cff988cdb", 187 | "47513adb9d0948dc8f5f096d0d0c867b", 188 | "550a1d3a77384717822334ee79a54210", 189 | "04de8f0749fe4c29b4b4076beee8f55b", 190 | "a8f285b82065482982d270b7d5fec723", 191 | "2f74c334e79d4c48aea98fbc16a57c23", 192 | "8b3deb1d17b845de842b950483274fe3", 193 | "86703ac3319b4b00bae27cf8762b4940", 194 | "4edf3c6005b7431a9fd22f16fd418624", 195 | "f460a9421b534ce7a27a9e447f274201" 196 | ] 197 | }, 198 | "executionInfo": { 199 | "elapsed": 95699, 200 | "status": "ok", 201 | "timestamp": 1614871844071, 202 | "user": { 203 | "displayName": "Dane Smith", 204 | "photoUrl": "", 205 | "userId": "04907521039862763062" 206 | }, 207 | "user_tz": 300 208 | }, 209 | "id": "v1lVPAh3D8r-", 210 | "outputId": "5a368107-c531-4264-ae30-79cd804dd2f6" 211 | }, 212 | "outputs": [], 213 | "source": [ 214 | "# dataset\n", 215 | "data = datasets.FashionMNIST('../data', train=True, download=False,\n", 216 | " transform=transforms.Compose([\n", 217 | " transforms.ToTensor(),\n", 218 | " transforms.Normalize((scale_mu,), (scale_sd,))\n", 219 | " ]))\n", 220 | "\n", 221 | "# Data Loaders\n", 222 | "loader = torch.utils.data.DataLoader(dataset=data, batch_size=batch_size_test, shuffle=True)" 223 | ] 224 | }, 225 | { 226 | "cell_type": "markdown", 227 | "metadata": { 228 | "id": "QpmmEdSYQeQ0" 229 | }, 230 | "source": [ 231 | "# The pretrained encoder" 232 | ] 233 | }, 234 | { 235 | "cell_type": "code", 236 | "execution_count": 4, 237 | "metadata": { 238 | "colab": { 239 | "base_uri": "https://localhost:8080/" 240 | }, 241 | "executionInfo": { 242 | "elapsed": 581, 243 | "status": "ok", 244 | "timestamp": 1614872139332, 245 | "user": { 246 | "displayName": "Dane Smith", 247 | "photoUrl": "", 248 | "userId": "04907521039862763062" 249 | }, 250 | "user_tz": 300 251 | }, 252 | "id": "_UBG7t6bbP69", 253 | "outputId": "031c93f9-cb88-48bd-9040-df171810aa0a" 254 | }, 255 | "outputs": [ 256 | { 257 | "name": "stdout", 258 | "output_type": "stream", 259 | "text": [ 260 | "Number of free parameters: 2864\n" 261 | ] 262 | } 263 | ], 264 | "source": [ 265 | "enc = Encoder(coarse_resolution=(4,4)).to(device)\n", 266 | "print(\"Number of free parameters: \", sum(p.numel() for p in enc.parameters() if p.requires_grad))" 267 | ] 268 | }, 269 | { 270 | "cell_type": "code", 271 | "execution_count": 5, 272 | "metadata": {}, 273 | "outputs": [ 274 | { 275 | "data": { 276 | "text/plain": [ 277 | "" 278 | ] 279 | }, 280 | "execution_count": 5, 281 | "metadata": {}, 282 | "output_type": "execute_result" 283 | } 284 | ], 285 | "source": [ 286 | "# Load in the pretrained weights\n", 287 | "enc.load_state_dict(torch.load('../models/fashion_mnist_encoder.pt'))" 288 | ] 289 | }, 290 | { 291 | "cell_type": "markdown", 292 | "metadata": { 293 | "id": "Ry3hyYFB0Czi" 294 | }, 295 | "source": [ 296 | "# Get the encodings for all images" 297 | ] 298 | }, 299 | { 300 | "cell_type": "code", 301 | "execution_count": 6, 302 | "metadata": { 303 | "id": "YxgiIxeFAGJV" 304 | }, 305 | "outputs": [], 306 | "source": [ 307 | "enc.eval()\n", 308 | "encodings = []\n", 309 | "targets = []\n", 310 | "with torch.no_grad():\n", 311 | " for images, trg in loader:\n", 312 | " images = images.to(device)\n", 313 | " encodings.append(enc(images))\n", 314 | " targets.append(trg)\n", 315 | " \n", 316 | "encodings = torch.cat(encodings).cpu().numpy()\n", 317 | "targets = torch.cat(targets).cpu().numpy()" 318 | ] 319 | }, 320 | { 321 | "cell_type": "code", 322 | "execution_count": 7, 323 | "metadata": {}, 324 | "outputs": [ 325 | { 326 | "name": "stdout", 327 | "output_type": "stream", 328 | "text": [ 329 | "(60000, 256) (60000,)\n" 330 | ] 331 | } 332 | ], 333 | "source": [ 334 | "print(encodings.shape, targets.shape)" 335 | ] 336 | }, 337 | { 338 | "cell_type": "markdown", 339 | "metadata": { 340 | "id": "m5u61YlL0BFQ" 341 | }, 342 | "source": [ 343 | "# UMAP" 344 | ] 345 | }, 346 | { 347 | "cell_type": "code", 348 | "execution_count": 8, 349 | "metadata": {}, 350 | "outputs": [], 351 | "source": [ 352 | "targets = targets.astype(str)" 353 | ] 354 | }, 355 | { 356 | "cell_type": "code", 357 | "execution_count": 9, 358 | "metadata": { 359 | "id": "90ijHHX50rlC" 360 | }, 361 | "outputs": [], 362 | "source": [ 363 | "mapper = umap.UMAP().fit(encodings[:num])" 364 | ] 365 | }, 366 | { 367 | "cell_type": "markdown", 368 | "metadata": {}, 369 | "source": [ 370 | "### Plot function\n", 371 | "This is a very slightly modified version of the code `umap.plot.connectivity` function provided by `umap-learn`: \n", 372 | " https://github.com/lmcinnes/umap/blob/f86c922af62af35db53e0627d70eca5362c3fe7d/umap/plot.py#L686" 373 | ] 374 | }, 375 | { 376 | "cell_type": "code", 377 | "execution_count": 10, 378 | "metadata": {}, 379 | "outputs": [], 380 | "source": [ 381 | "def connectivity(umap_object, edge_bundling='hammer', labels = targets[:num], show_points=True, height=4096, width=4096, theme='darkgreen', pointsize=5):\n", 382 | "\n", 383 | " \"\"\"Plot connectivity relationships of the underlying UMAP\n", 384 | " simplicial set data structure. Internally UMAP will make\n", 385 | " use of what can be viewed as a weighted graph. This graph\n", 386 | " can be plotted using the layout provided by UMAP as a\n", 387 | " potential diagnostic view of the embedding. Currently this only works\n", 388 | " for 2D embeddings. While there are many optional parameters\n", 389 | " to further control and tailor the plotting, you need only\n", 390 | " pass in the trained/fit umap model to get results. This plot\n", 391 | " utility will attempt to do the hard work of avoiding\n", 392 | " overplotting issues and provide options for plotting the\n", 393 | " points as well as using edge bundling for graph visualization.\n", 394 | " \n", 395 | " This is a very slightly modified version of the code written here: \n", 396 | " https://github.com/lmcinnes/umap/blob/f86c922af62af35db53e0627d70eca5362c3fe7d/umap/plot.py#L686\n", 397 | " \n", 398 | " Parameters\n", 399 | " ----------\n", 400 | " umap_object: trained UMAP object\n", 401 | " A trained UMAP object that has a 2D embedding.\n", 402 | " edge_bundling: string or None (optional, default None)\n", 403 | " The edge bundling method to use. Currently supported\n", 404 | " are None or 'hammer'. See the datashader docs\n", 405 | " on graph visualization for more details.\n", 406 | " edge_cmap: string (default 'gray_r')\n", 407 | " The name of a matplotlib colormap to use for shading/\n", 408 | " coloring the edges of the connectivity graph. Note that\n", 409 | " the ``theme``, if specified, will override this.\n", 410 | " show_points: bool (optional False)\n", 411 | " Whether to display the points over top of the edge\n", 412 | " connectivity. Further options allow for coloring/\n", 413 | " shading the points accordingly.\n", 414 | " labels: array, shape (n_samples,) (optional, default None)\n", 415 | " An array of labels (assumed integer or categorical),\n", 416 | " one for each data sample.\n", 417 | " This will be used for coloring the points in\n", 418 | " the plot according to their label. Note that\n", 419 | " this option is mutually exclusive to the ``values``\n", 420 | " option.\n", 421 | " values: array, shape (n_samples,) (optional, default None)\n", 422 | " An array of values (assumed float or continuous),\n", 423 | " one for each sample.\n", 424 | " This will be used for coloring the points in\n", 425 | " the plot according to a colorscale associated\n", 426 | " to the total range of values. Note that this\n", 427 | " option is mutually exclusive to the ``labels``\n", 428 | " option.\n", 429 | " theme: string (optional, default None)\n", 430 | " A color theme to use for plotting. A small set of\n", 431 | " predefined themes are provided which have relatively\n", 432 | " good aesthetics. Available themes are:\n", 433 | " * 'blue'\n", 434 | " * 'red'\n", 435 | " * 'green'\n", 436 | " * 'inferno'\n", 437 | " * 'fire'\n", 438 | " * 'viridis'\n", 439 | " * 'darkblue'\n", 440 | " * 'darkred'\n", 441 | " * 'darkgreen'\n", 442 | " cmap: string (optional, default 'Blues')\n", 443 | " The name of a matplotlib colormap to use for coloring\n", 444 | " or shading points. If no labels or values are passed\n", 445 | " this will be used for shading points according to\n", 446 | " density (largely only of relevance for very large\n", 447 | " datasets). If values are passed this will be used for\n", 448 | " shading according the value. Note that if theme\n", 449 | " is passed then this value will be overridden by the\n", 450 | " corresponding option of the theme.\n", 451 | " color_key: dict or array, shape (n_categories) (optional, default None)\n", 452 | " A way to assign colors to categoricals. This can either be\n", 453 | " an explicit dict mapping labels to colors (as strings of form\n", 454 | " '#RRGGBB'), or an array like object providing one color for\n", 455 | " each distinct category being provided in ``labels``. Either\n", 456 | " way this mapping will be used to color points according to\n", 457 | " the label. Note that if theme\n", 458 | " is passed then this value will be overridden by the\n", 459 | " corresponding option of the theme.\n", 460 | " color_key_cmap: string (optional, default 'Spectral')\n", 461 | " The name of a matplotlib colormap to use for categorical coloring.\n", 462 | " If an explicit ``color_key`` is not given a color mapping for\n", 463 | " categories can be generated from the label list and selecting\n", 464 | " a matching list of colors from the given colormap. Note\n", 465 | " that if theme\n", 466 | " is passed then this value will be overridden by the\n", 467 | " corresponding option of the theme.\n", 468 | " background: string (optional, default 'white)\n", 469 | " The color of the background. Usually this will be either\n", 470 | " 'white' or 'black', but any color name will work. Ideally\n", 471 | " one wants to match this appropriately to the colors being\n", 472 | " used for points etc. This is one of the things that themes\n", 473 | " handle for you. Note that if theme\n", 474 | " is passed then this value will be overridden by the\n", 475 | " corresponding option of the theme.\n", 476 | " width: int (optional, default 800)\n", 477 | " The desired width of the plot in pixels.\n", 478 | " height: int (optional, default 800)\n", 479 | " The desired height of the plot in pixels\n", 480 | " Returns\n", 481 | " -------\n", 482 | " result: matplotlib axis\n", 483 | " The result is a matplotlib axis with the relevant plot displayed.\n", 484 | " If you are using a notbooks and have ``%matplotlib inline`` set\n", 485 | " then this will simply display inline.\n", 486 | " \"\"\"\n", 487 | "\n", 488 | " #import needed items from datashader and umap.plot\n", 489 | " import datashader as ds\n", 490 | " import datashader.bundling as bd\n", 491 | " import datashader.transfer_functions as tf\n", 492 | " from umap.plot import _get_embedding, _datashade_points, _select_font_color, _embed_datashader_in_an_axis, _themes\n", 493 | " from warnings import warn\n", 494 | "\n", 495 | " if theme is not None:\n", 496 | " cmap = _themes[theme][\"cmap\"]\n", 497 | " color_key_cmap = _themes[theme][\"color_key_cmap\"]\n", 498 | " edge_cmap = _themes[theme][\"edge_cmap\"]\n", 499 | " background = _themes[theme][\"background\"]\n", 500 | "\n", 501 | "\n", 502 | " # get the points and edges\n", 503 | " points = _get_embedding(umap_object)\n", 504 | " point_df = pd.DataFrame(points, columns=(\"x\", \"y\"))\n", 505 | "\n", 506 | " point_size = pointsize # <- in umap-learn: 100.0 / np.sqrt(points.shape[0])\n", 507 | " if point_size > 1:\n", 508 | " px_size = int(np.round(point_size))\n", 509 | " else:\n", 510 | " px_size = 1\n", 511 | "\n", 512 | " if show_points:\n", 513 | " edge_how = \"log\"\n", 514 | " else:\n", 515 | " edge_how = \"eq_hist\"\n", 516 | "\n", 517 | " coo_graph = umap_object.graph_.tocoo()\n", 518 | " edge_df = pd.DataFrame(\n", 519 | " np.vstack([coo_graph.row, coo_graph.col, coo_graph.data]).T,\n", 520 | " columns=(\"source\", \"target\", \"weight\"),\n", 521 | " )\n", 522 | " edge_df[\"source\"] = edge_df.source.astype(np.int32)\n", 523 | " edge_df[\"target\"] = edge_df.target.astype(np.int32)\n", 524 | "\n", 525 | " # edge bundling?\n", 526 | " if edge_bundling is None:\n", 527 | " edges = bd.directly_connect_edges(point_df, edge_df, weight=\"weight\")\n", 528 | " elif edge_bundling == \"hammer\":\n", 529 | " warn(\n", 530 | " \"Hammer edge bundling is expensive for large graphs!\\n\"\n", 531 | " \"This may take a long time to compute!\"\n", 532 | " )\n", 533 | " edges = bd.hammer_bundle(point_df, edge_df, weight=\"weight\")\n", 534 | " else:\n", 535 | " raise ValueError(\"{} is not a recognised bundling method\".format(edge_bundling))\n", 536 | "\n", 537 | " # create canvas and render objects\n", 538 | " extent = umap.plot._get_extent(points)\n", 539 | " canvas = ds.Canvas(\n", 540 | " plot_width=width,\n", 541 | " plot_height=height,\n", 542 | " x_range=(extent[0], extent[1]),\n", 543 | " y_range=(extent[2], extent[3]),\n", 544 | " )\n", 545 | "\n", 546 | " # render the edges\n", 547 | " edge_img = tf.shade(\n", 548 | " canvas.line(edges, \"x\", \"y\", agg=ds.sum(\"weight\")),\n", 549 | " cmap=plt.get_cmap(edge_cmap),\n", 550 | " how=edge_how,\n", 551 | " )\n", 552 | "\n", 553 | " # render the background\n", 554 | " edge_img = tf.set_background(edge_img, background)\n", 555 | "\n", 556 | " # render the points\n", 557 | " if show_points:\n", 558 | " point_img = _datashade_points(\n", 559 | " points,\n", 560 | " None,\n", 561 | " labels,\n", 562 | " None,\n", 563 | " cmap,\n", 564 | " None,\n", 565 | " color_key_cmap,\n", 566 | " None,\n", 567 | " width,\n", 568 | " height,\n", 569 | " False,\n", 570 | " )\n", 571 | " if px_size > 1:\n", 572 | " point_img = tf.dynspread(point_img, threshold=0.9, max_px=px_size, how='add')\n", 573 | " result = tf.stack(edge_img, point_img, how=\"over\")\n", 574 | " else:\n", 575 | " result = edge_img\n", 576 | " \n", 577 | " return result" 578 | ] 579 | }, 580 | { 581 | "cell_type": "code", 582 | "execution_count": 11, 583 | "metadata": {}, 584 | "outputs": [ 585 | { 586 | "name": "stderr", 587 | "output_type": "stream", 588 | "text": [ 589 | "C:\\Users\\Hudson\\.conda\\envs\\nnet_umap\\lib\\site-packages\\ipykernel_launcher.py:150: UserWarning: Hammer edge bundling is expensive for large graphs!\n", 590 | "This may take a long time to compute!\n" 591 | ] 592 | } 593 | ], 594 | "source": [ 595 | "img = connectivity(mapper, edge_bundling=edge_bundling, labels = targets[:num], show_points=show_points, height=height, width=width, theme=theme, pointsize=pointsize)" 596 | ] 597 | }, 598 | { 599 | "cell_type": "code", 600 | "execution_count": 12, 601 | "metadata": {}, 602 | "outputs": [], 603 | "source": [ 604 | "img.to_pil().save('../images/{name}.png'.format(name=image_name))" 605 | ] 606 | } 607 | ], 608 | "metadata": { 609 | "accelerator": "GPU", 610 | "colab": { 611 | "collapsed_sections": [], 612 | "name": "VAE_MNIST.ipynb", 613 | "provenance": [], 614 | "toc_visible": true 615 | }, 616 | "kernelspec": { 617 | "display_name": "Python 3", 618 | "language": "python", 619 | "name": "python3" 620 | }, 621 | "language_info": { 622 | "codemirror_mode": { 623 | "name": "ipython", 624 | "version": 3 625 | }, 626 | "file_extension": ".py", 627 | "mimetype": "text/x-python", 628 | "name": "python", 629 | "nbconvert_exporter": "python", 630 | "pygments_lexer": "ipython3", 631 | "version": "3.7.10" 632 | }, 633 | "widgets": { 634 | "application/vnd.jupyter.widget-state+json": { 635 | "031265afa26d4ec6b1ab5c7cff988cdb": { 636 | "model_module": "@jupyter-widgets/controls", 637 | "model_name": "DescriptionStyleModel", 638 | "state": { 639 | "_model_module": "@jupyter-widgets/controls", 640 | "_model_module_version": "1.5.0", 641 | "_model_name": "DescriptionStyleModel", 642 | "_view_count": null, 643 | "_view_module": "@jupyter-widgets/base", 644 | "_view_module_version": "1.2.0", 645 | "_view_name": "StyleView", 646 | "description_width": "" 647 | } 648 | }, 649 | "04de8f0749fe4c29b4b4076beee8f55b": { 650 | "model_module": "@jupyter-widgets/base", 651 | "model_name": "LayoutModel", 652 | "state": { 653 | "_model_module": "@jupyter-widgets/base", 654 | "_model_module_version": "1.2.0", 655 | "_model_name": "LayoutModel", 656 | "_view_count": null, 657 | "_view_module": "@jupyter-widgets/base", 658 | "_view_module_version": "1.2.0", 659 | "_view_name": "LayoutView", 660 | "align_content": null, 661 | "align_items": null, 662 | "align_self": null, 663 | "border": null, 664 | "bottom": null, 665 | "display": null, 666 | "flex": null, 667 | "flex_flow": null, 668 | "grid_area": null, 669 | "grid_auto_columns": null, 670 | "grid_auto_flow": null, 671 | "grid_auto_rows": null, 672 | "grid_column": null, 673 | "grid_gap": null, 674 | "grid_row": null, 675 | "grid_template_areas": null, 676 | "grid_template_columns": null, 677 | "grid_template_rows": null, 678 | "height": null, 679 | "justify_content": null, 680 | "justify_items": null, 681 | "left": null, 682 | "margin": null, 683 | "max_height": null, 684 | "max_width": null, 685 | "min_height": null, 686 | "min_width": null, 687 | "object_fit": null, 688 | "object_position": null, 689 | "order": null, 690 | "overflow": null, 691 | "overflow_x": null, 692 | "overflow_y": null, 693 | "padding": null, 694 | "right": null, 695 | "top": null, 696 | "visibility": null, 697 | "width": null 698 | } 699 | }, 700 | "214497818dad447bbea1ead62155041c": { 701 | "model_module": "@jupyter-widgets/base", 702 | "model_name": "LayoutModel", 703 | "state": { 704 | "_model_module": "@jupyter-widgets/base", 705 | "_model_module_version": "1.2.0", 706 | "_model_name": "LayoutModel", 707 | "_view_count": null, 708 | "_view_module": "@jupyter-widgets/base", 709 | "_view_module_version": "1.2.0", 710 | "_view_name": "LayoutView", 711 | "align_content": null, 712 | "align_items": null, 713 | "align_self": null, 714 | "border": null, 715 | "bottom": null, 716 | "display": null, 717 | "flex": null, 718 | "flex_flow": null, 719 | "grid_area": null, 720 | "grid_auto_columns": null, 721 | "grid_auto_flow": null, 722 | "grid_auto_rows": null, 723 | "grid_column": null, 724 | "grid_gap": null, 725 | "grid_row": null, 726 | "grid_template_areas": null, 727 | "grid_template_columns": null, 728 | "grid_template_rows": null, 729 | "height": null, 730 | "justify_content": null, 731 | "justify_items": null, 732 | "left": null, 733 | "margin": null, 734 | "max_height": null, 735 | "max_width": null, 736 | "min_height": null, 737 | "min_width": null, 738 | "object_fit": null, 739 | "object_position": null, 740 | "order": null, 741 | "overflow": null, 742 | "overflow_x": null, 743 | "overflow_y": null, 744 | "padding": null, 745 | "right": null, 746 | "top": null, 747 | "visibility": null, 748 | "width": null 749 | } 750 | }, 751 | "2db75713acf74169acbbfcf86b6c87a0": { 752 | "model_module": "@jupyter-widgets/controls", 753 | "model_name": "ProgressStyleModel", 754 | "state": { 755 | "_model_module": "@jupyter-widgets/controls", 756 | "_model_module_version": "1.5.0", 757 | "_model_name": "ProgressStyleModel", 758 | "_view_count": null, 759 | "_view_module": "@jupyter-widgets/base", 760 | "_view_module_version": "1.2.0", 761 | "_view_name": "StyleView", 762 | "bar_color": null, 763 | "description_width": "initial" 764 | } 765 | }, 766 | "2f74c334e79d4c48aea98fbc16a57c23": { 767 | "model_module": "@jupyter-widgets/controls", 768 | "model_name": "HTMLModel", 769 | "state": { 770 | "_dom_classes": [], 771 | "_model_module": "@jupyter-widgets/controls", 772 | "_model_module_version": "1.5.0", 773 | "_model_name": "HTMLModel", 774 | "_view_count": null, 775 | "_view_module": "@jupyter-widgets/controls", 776 | "_view_module_version": "1.5.0", 777 | "_view_name": "HTMLView", 778 | "description": "", 779 | "description_tooltip": null, 780 | "layout": "IPY_MODEL_f460a9421b534ce7a27a9e447f274201", 781 | "placeholder": "​", 782 | "style": "IPY_MODEL_4edf3c6005b7431a9fd22f16fd418624", 783 | "value": " 8192/? [00:00<00:00, 10128.49it/s]" 784 | } 785 | }, 786 | "30338ead3a9644dcb048de47a60e8143": { 787 | "model_module": "@jupyter-widgets/base", 788 | "model_name": "LayoutModel", 789 | "state": { 790 | "_model_module": "@jupyter-widgets/base", 791 | "_model_module_version": "1.2.0", 792 | "_model_name": "LayoutModel", 793 | "_view_count": null, 794 | "_view_module": "@jupyter-widgets/base", 795 | "_view_module_version": "1.2.0", 796 | "_view_name": "LayoutView", 797 | "align_content": null, 798 | "align_items": null, 799 | "align_self": null, 800 | "border": null, 801 | "bottom": null, 802 | "display": null, 803 | "flex": null, 804 | "flex_flow": null, 805 | "grid_area": null, 806 | "grid_auto_columns": null, 807 | "grid_auto_flow": null, 808 | "grid_auto_rows": null, 809 | "grid_column": null, 810 | "grid_gap": null, 811 | "grid_row": null, 812 | "grid_template_areas": null, 813 | "grid_template_columns": null, 814 | "grid_template_rows": null, 815 | "height": null, 816 | "justify_content": null, 817 | "justify_items": null, 818 | "left": null, 819 | "margin": null, 820 | "max_height": null, 821 | "max_width": null, 822 | "min_height": null, 823 | "min_width": null, 824 | "object_fit": null, 825 | "object_position": null, 826 | "order": null, 827 | "overflow": null, 828 | "overflow_x": null, 829 | "overflow_y": null, 830 | "padding": null, 831 | "right": null, 832 | "top": null, 833 | "visibility": null, 834 | "width": null 835 | } 836 | }, 837 | "35469ea2b57a4d5aaa903d010c9c371c": { 838 | "model_module": "@jupyter-widgets/controls", 839 | "model_name": "HBoxModel", 840 | "state": { 841 | "_dom_classes": [], 842 | "_model_module": "@jupyter-widgets/controls", 843 | "_model_module_version": "1.5.0", 844 | "_model_name": "HBoxModel", 845 | "_view_count": null, 846 | "_view_module": "@jupyter-widgets/controls", 847 | "_view_module_version": "1.5.0", 848 | "_view_name": "HBoxView", 849 | "box_style": "", 850 | "children": [ 851 | "IPY_MODEL_649771a8bb524df6b44b216cca5e9d51", 852 | "IPY_MODEL_45ddae6810954b59a993eb289bef6e6f" 853 | ], 854 | "layout": "IPY_MODEL_543786e7602d4e14821378d20e80a915" 855 | } 856 | }, 857 | "4073764fd5a440a28b97ac2ed1cc9db5": { 858 | "model_module": "@jupyter-widgets/controls", 859 | "model_name": "HTMLModel", 860 | "state": { 861 | "_dom_classes": [], 862 | "_model_module": "@jupyter-widgets/controls", 863 | "_model_module_version": "1.5.0", 864 | "_model_name": "HTMLModel", 865 | "_view_count": null, 866 | "_view_module": "@jupyter-widgets/controls", 867 | "_view_module_version": "1.5.0", 868 | "_view_name": "HTMLView", 869 | "description": "", 870 | "description_tooltip": null, 871 | "layout": "IPY_MODEL_47513adb9d0948dc8f5f096d0d0c867b", 872 | "placeholder": "​", 873 | "style": "IPY_MODEL_031265afa26d4ec6b1ab5c7cff988cdb", 874 | "value": " 1654784/? [00:02<00:00, 651234.50it/s]" 875 | } 876 | }, 877 | "440a4e03df8d4d0f8e67312edd77b228": { 878 | "model_module": "@jupyter-widgets/base", 879 | "model_name": "LayoutModel", 880 | "state": { 881 | "_model_module": "@jupyter-widgets/base", 882 | "_model_module_version": "1.2.0", 883 | "_model_name": "LayoutModel", 884 | "_view_count": null, 885 | "_view_module": "@jupyter-widgets/base", 886 | "_view_module_version": "1.2.0", 887 | "_view_name": "LayoutView", 888 | "align_content": null, 889 | "align_items": null, 890 | "align_self": null, 891 | "border": null, 892 | "bottom": null, 893 | "display": null, 894 | "flex": null, 895 | "flex_flow": null, 896 | "grid_area": null, 897 | "grid_auto_columns": null, 898 | "grid_auto_flow": null, 899 | "grid_auto_rows": null, 900 | "grid_column": null, 901 | "grid_gap": null, 902 | "grid_row": null, 903 | "grid_template_areas": null, 904 | "grid_template_columns": null, 905 | "grid_template_rows": null, 906 | "height": null, 907 | "justify_content": null, 908 | "justify_items": null, 909 | "left": null, 910 | "margin": null, 911 | "max_height": null, 912 | "max_width": null, 913 | "min_height": null, 914 | "min_width": null, 915 | "object_fit": null, 916 | "object_position": null, 917 | "order": null, 918 | "overflow": null, 919 | "overflow_x": null, 920 | "overflow_y": null, 921 | "padding": null, 922 | "right": null, 923 | "top": null, 924 | "visibility": null, 925 | "width": null 926 | } 927 | }, 928 | "45ddae6810954b59a993eb289bef6e6f": { 929 | "model_module": "@jupyter-widgets/controls", 930 | "model_name": "HTMLModel", 931 | "state": { 932 | "_dom_classes": [], 933 | "_model_module": "@jupyter-widgets/controls", 934 | "_model_module_version": "1.5.0", 935 | "_model_name": "HTMLModel", 936 | "_view_count": null, 937 | "_view_module": "@jupyter-widgets/controls", 938 | "_view_module_version": "1.5.0", 939 | "_view_name": "HTMLView", 940 | "description": "", 941 | "description_tooltip": null, 942 | "layout": "IPY_MODEL_30338ead3a9644dcb048de47a60e8143", 943 | "placeholder": "​", 944 | "style": "IPY_MODEL_627907c9e8c8491b9f97f23cc067c038", 945 | "value": " 32768/? [00:17<00:00, 91979.91it/s]" 946 | } 947 | }, 948 | "47513adb9d0948dc8f5f096d0d0c867b": { 949 | "model_module": "@jupyter-widgets/base", 950 | "model_name": "LayoutModel", 951 | "state": { 952 | "_model_module": "@jupyter-widgets/base", 953 | "_model_module_version": "1.2.0", 954 | "_model_name": "LayoutModel", 955 | "_view_count": null, 956 | "_view_module": "@jupyter-widgets/base", 957 | "_view_module_version": "1.2.0", 958 | "_view_name": "LayoutView", 959 | "align_content": null, 960 | "align_items": null, 961 | "align_self": null, 962 | "border": null, 963 | "bottom": null, 964 | "display": null, 965 | "flex": null, 966 | "flex_flow": null, 967 | "grid_area": null, 968 | "grid_auto_columns": null, 969 | "grid_auto_flow": null, 970 | "grid_auto_rows": null, 971 | "grid_column": null, 972 | "grid_gap": null, 973 | "grid_row": null, 974 | "grid_template_areas": null, 975 | "grid_template_columns": null, 976 | "grid_template_rows": null, 977 | "height": null, 978 | "justify_content": null, 979 | "justify_items": null, 980 | "left": null, 981 | "margin": null, 982 | "max_height": null, 983 | "max_width": null, 984 | "min_height": null, 985 | "min_width": null, 986 | "object_fit": null, 987 | "object_position": null, 988 | "order": null, 989 | "overflow": null, 990 | "overflow_x": null, 991 | "overflow_y": null, 992 | "padding": null, 993 | "right": null, 994 | "top": null, 995 | "visibility": null, 996 | "width": null 997 | } 998 | }, 999 | "4dff4d919b2a478896996b3331bd136a": { 1000 | "model_module": "@jupyter-widgets/base", 1001 | "model_name": "LayoutModel", 1002 | "state": { 1003 | "_model_module": "@jupyter-widgets/base", 1004 | "_model_module_version": "1.2.0", 1005 | "_model_name": "LayoutModel", 1006 | "_view_count": null, 1007 | "_view_module": "@jupyter-widgets/base", 1008 | "_view_module_version": "1.2.0", 1009 | "_view_name": "LayoutView", 1010 | "align_content": null, 1011 | "align_items": null, 1012 | "align_self": null, 1013 | "border": null, 1014 | "bottom": null, 1015 | "display": null, 1016 | "flex": null, 1017 | "flex_flow": null, 1018 | "grid_area": null, 1019 | "grid_auto_columns": null, 1020 | "grid_auto_flow": null, 1021 | "grid_auto_rows": null, 1022 | "grid_column": null, 1023 | "grid_gap": null, 1024 | "grid_row": null, 1025 | "grid_template_areas": null, 1026 | "grid_template_columns": null, 1027 | "grid_template_rows": null, 1028 | "height": null, 1029 | "justify_content": null, 1030 | "justify_items": null, 1031 | "left": null, 1032 | "margin": null, 1033 | "max_height": null, 1034 | "max_width": null, 1035 | "min_height": null, 1036 | "min_width": null, 1037 | "object_fit": null, 1038 | "object_position": null, 1039 | "order": null, 1040 | "overflow": null, 1041 | "overflow_x": null, 1042 | "overflow_y": null, 1043 | "padding": null, 1044 | "right": null, 1045 | "top": null, 1046 | "visibility": null, 1047 | "width": null 1048 | } 1049 | }, 1050 | "4edf3c6005b7431a9fd22f16fd418624": { 1051 | "model_module": "@jupyter-widgets/controls", 1052 | "model_name": "DescriptionStyleModel", 1053 | "state": { 1054 | "_model_module": "@jupyter-widgets/controls", 1055 | "_model_module_version": "1.5.0", 1056 | "_model_name": "DescriptionStyleModel", 1057 | "_view_count": null, 1058 | "_view_module": "@jupyter-widgets/base", 1059 | "_view_module_version": "1.2.0", 1060 | "_view_name": "StyleView", 1061 | "description_width": "" 1062 | } 1063 | }, 1064 | "52e39424474f4cadbc8d108137856100": { 1065 | "model_module": "@jupyter-widgets/controls", 1066 | "model_name": "HBoxModel", 1067 | "state": { 1068 | "_dom_classes": [], 1069 | "_model_module": "@jupyter-widgets/controls", 1070 | "_model_module_version": "1.5.0", 1071 | "_model_name": "HBoxModel", 1072 | "_view_count": null, 1073 | "_view_module": "@jupyter-widgets/controls", 1074 | "_view_module_version": "1.5.0", 1075 | "_view_name": "HBoxView", 1076 | "box_style": "", 1077 | "children": [ 1078 | "IPY_MODEL_612eb9f77c1a4cb9b6f25c621fb86817", 1079 | "IPY_MODEL_4073764fd5a440a28b97ac2ed1cc9db5" 1080 | ], 1081 | "layout": "IPY_MODEL_440a4e03df8d4d0f8e67312edd77b228" 1082 | } 1083 | }, 1084 | "543786e7602d4e14821378d20e80a915": { 1085 | "model_module": "@jupyter-widgets/base", 1086 | "model_name": "LayoutModel", 1087 | "state": { 1088 | "_model_module": "@jupyter-widgets/base", 1089 | "_model_module_version": "1.2.0", 1090 | "_model_name": "LayoutModel", 1091 | "_view_count": null, 1092 | "_view_module": "@jupyter-widgets/base", 1093 | "_view_module_version": "1.2.0", 1094 | "_view_name": "LayoutView", 1095 | "align_content": null, 1096 | "align_items": null, 1097 | "align_self": null, 1098 | "border": null, 1099 | "bottom": null, 1100 | "display": null, 1101 | "flex": null, 1102 | "flex_flow": null, 1103 | "grid_area": null, 1104 | "grid_auto_columns": null, 1105 | "grid_auto_flow": null, 1106 | "grid_auto_rows": null, 1107 | "grid_column": null, 1108 | "grid_gap": null, 1109 | "grid_row": null, 1110 | "grid_template_areas": null, 1111 | "grid_template_columns": null, 1112 | "grid_template_rows": null, 1113 | "height": null, 1114 | "justify_content": null, 1115 | "justify_items": null, 1116 | "left": null, 1117 | "margin": null, 1118 | "max_height": null, 1119 | "max_width": null, 1120 | "min_height": null, 1121 | "min_width": null, 1122 | "object_fit": null, 1123 | "object_position": null, 1124 | "order": null, 1125 | "overflow": null, 1126 | "overflow_x": null, 1127 | "overflow_y": null, 1128 | "padding": null, 1129 | "right": null, 1130 | "top": null, 1131 | "visibility": null, 1132 | "width": null 1133 | } 1134 | }, 1135 | "550a1d3a77384717822334ee79a54210": { 1136 | "model_module": "@jupyter-widgets/controls", 1137 | "model_name": "HBoxModel", 1138 | "state": { 1139 | "_dom_classes": [], 1140 | "_model_module": "@jupyter-widgets/controls", 1141 | "_model_module_version": "1.5.0", 1142 | "_model_name": "HBoxModel", 1143 | "_view_count": null, 1144 | "_view_module": "@jupyter-widgets/controls", 1145 | "_view_module_version": "1.5.0", 1146 | "_view_name": "HBoxView", 1147 | "box_style": "", 1148 | "children": [ 1149 | "IPY_MODEL_a8f285b82065482982d270b7d5fec723", 1150 | "IPY_MODEL_2f74c334e79d4c48aea98fbc16a57c23" 1151 | ], 1152 | "layout": "IPY_MODEL_04de8f0749fe4c29b4b4076beee8f55b" 1153 | } 1154 | }, 1155 | "5614716f142843148e2e23482ffb2f82": { 1156 | "model_module": "@jupyter-widgets/controls", 1157 | "model_name": "FloatProgressModel", 1158 | "state": { 1159 | "_dom_classes": [], 1160 | "_model_module": "@jupyter-widgets/controls", 1161 | "_model_module_version": "1.5.0", 1162 | "_model_name": "FloatProgressModel", 1163 | "_view_count": null, 1164 | "_view_module": "@jupyter-widgets/controls", 1165 | "_view_module_version": "1.5.0", 1166 | "_view_name": "ProgressView", 1167 | "bar_style": "success", 1168 | "description": "", 1169 | "description_tooltip": null, 1170 | "layout": "IPY_MODEL_4dff4d919b2a478896996b3331bd136a", 1171 | "max": 1, 1172 | "min": 0, 1173 | "orientation": "horizontal", 1174 | "style": "IPY_MODEL_efa8aa0e6fc0445787294d2f6b5a0ddb", 1175 | "value": 1 1176 | } 1177 | }, 1178 | "612eb9f77c1a4cb9b6f25c621fb86817": { 1179 | "model_module": "@jupyter-widgets/controls", 1180 | "model_name": "FloatProgressModel", 1181 | "state": { 1182 | "_dom_classes": [], 1183 | "_model_module": "@jupyter-widgets/controls", 1184 | "_model_module_version": "1.5.0", 1185 | "_model_name": "FloatProgressModel", 1186 | "_view_count": null, 1187 | "_view_module": "@jupyter-widgets/controls", 1188 | "_view_module_version": "1.5.0", 1189 | "_view_name": "ProgressView", 1190 | "bar_style": "success", 1191 | "description": "", 1192 | "description_tooltip": null, 1193 | "layout": "IPY_MODEL_da53ea1b8ef14d8ca099052666155532", 1194 | "max": 1, 1195 | "min": 0, 1196 | "orientation": "horizontal", 1197 | "style": "IPY_MODEL_2db75713acf74169acbbfcf86b6c87a0", 1198 | "value": 1 1199 | } 1200 | }, 1201 | "627907c9e8c8491b9f97f23cc067c038": { 1202 | "model_module": "@jupyter-widgets/controls", 1203 | "model_name": "DescriptionStyleModel", 1204 | "state": { 1205 | "_model_module": "@jupyter-widgets/controls", 1206 | "_model_module_version": "1.5.0", 1207 | "_model_name": "DescriptionStyleModel", 1208 | "_view_count": null, 1209 | "_view_module": "@jupyter-widgets/base", 1210 | "_view_module_version": "1.2.0", 1211 | "_view_name": "StyleView", 1212 | "description_width": "" 1213 | } 1214 | }, 1215 | "649771a8bb524df6b44b216cca5e9d51": { 1216 | "model_module": "@jupyter-widgets/controls", 1217 | "model_name": "FloatProgressModel", 1218 | "state": { 1219 | "_dom_classes": [], 1220 | "_model_module": "@jupyter-widgets/controls", 1221 | "_model_module_version": "1.5.0", 1222 | "_model_name": "FloatProgressModel", 1223 | "_view_count": null, 1224 | "_view_module": "@jupyter-widgets/controls", 1225 | "_view_module_version": "1.5.0", 1226 | "_view_name": "ProgressView", 1227 | "bar_style": "info", 1228 | "description": "", 1229 | "description_tooltip": null, 1230 | "layout": "IPY_MODEL_6c41c0323e314eb4a6d710b4e21b36b0", 1231 | "max": 1, 1232 | "min": 0, 1233 | "orientation": "horizontal", 1234 | "style": "IPY_MODEL_f565add4b8c146b9919153ca87da3545", 1235 | "value": 1 1236 | } 1237 | }, 1238 | "6c41c0323e314eb4a6d710b4e21b36b0": { 1239 | "model_module": "@jupyter-widgets/base", 1240 | "model_name": "LayoutModel", 1241 | "state": { 1242 | "_model_module": "@jupyter-widgets/base", 1243 | "_model_module_version": "1.2.0", 1244 | "_model_name": "LayoutModel", 1245 | "_view_count": null, 1246 | "_view_module": "@jupyter-widgets/base", 1247 | "_view_module_version": "1.2.0", 1248 | "_view_name": "LayoutView", 1249 | "align_content": null, 1250 | "align_items": null, 1251 | "align_self": null, 1252 | "border": null, 1253 | "bottom": null, 1254 | "display": null, 1255 | "flex": null, 1256 | "flex_flow": null, 1257 | "grid_area": null, 1258 | "grid_auto_columns": null, 1259 | "grid_auto_flow": null, 1260 | "grid_auto_rows": null, 1261 | "grid_column": null, 1262 | "grid_gap": null, 1263 | "grid_row": null, 1264 | "grid_template_areas": null, 1265 | "grid_template_columns": null, 1266 | "grid_template_rows": null, 1267 | "height": null, 1268 | "justify_content": null, 1269 | "justify_items": null, 1270 | "left": null, 1271 | "margin": null, 1272 | "max_height": null, 1273 | "max_width": null, 1274 | "min_height": null, 1275 | "min_width": null, 1276 | "object_fit": null, 1277 | "object_position": null, 1278 | "order": null, 1279 | "overflow": null, 1280 | "overflow_x": null, 1281 | "overflow_y": null, 1282 | "padding": null, 1283 | "right": null, 1284 | "top": null, 1285 | "visibility": null, 1286 | "width": null 1287 | } 1288 | }, 1289 | "847e04e040f64a6282cb5a648ad712f9": { 1290 | "model_module": "@jupyter-widgets/base", 1291 | "model_name": "LayoutModel", 1292 | "state": { 1293 | "_model_module": "@jupyter-widgets/base", 1294 | "_model_module_version": "1.2.0", 1295 | "_model_name": "LayoutModel", 1296 | "_view_count": null, 1297 | "_view_module": "@jupyter-widgets/base", 1298 | "_view_module_version": "1.2.0", 1299 | "_view_name": "LayoutView", 1300 | "align_content": null, 1301 | "align_items": null, 1302 | "align_self": null, 1303 | "border": null, 1304 | "bottom": null, 1305 | "display": null, 1306 | "flex": null, 1307 | "flex_flow": null, 1308 | "grid_area": null, 1309 | "grid_auto_columns": null, 1310 | "grid_auto_flow": null, 1311 | "grid_auto_rows": null, 1312 | "grid_column": null, 1313 | "grid_gap": null, 1314 | "grid_row": null, 1315 | "grid_template_areas": null, 1316 | "grid_template_columns": null, 1317 | "grid_template_rows": null, 1318 | "height": null, 1319 | "justify_content": null, 1320 | "justify_items": null, 1321 | "left": null, 1322 | "margin": null, 1323 | "max_height": null, 1324 | "max_width": null, 1325 | "min_height": null, 1326 | "min_width": null, 1327 | "object_fit": null, 1328 | "object_position": null, 1329 | "order": null, 1330 | "overflow": null, 1331 | "overflow_x": null, 1332 | "overflow_y": null, 1333 | "padding": null, 1334 | "right": null, 1335 | "top": null, 1336 | "visibility": null, 1337 | "width": null 1338 | } 1339 | }, 1340 | "86703ac3319b4b00bae27cf8762b4940": { 1341 | "model_module": "@jupyter-widgets/base", 1342 | "model_name": "LayoutModel", 1343 | "state": { 1344 | "_model_module": "@jupyter-widgets/base", 1345 | "_model_module_version": "1.2.0", 1346 | "_model_name": "LayoutModel", 1347 | "_view_count": null, 1348 | "_view_module": "@jupyter-widgets/base", 1349 | "_view_module_version": "1.2.0", 1350 | "_view_name": "LayoutView", 1351 | "align_content": null, 1352 | "align_items": null, 1353 | "align_self": null, 1354 | "border": null, 1355 | "bottom": null, 1356 | "display": null, 1357 | "flex": null, 1358 | "flex_flow": null, 1359 | "grid_area": null, 1360 | "grid_auto_columns": null, 1361 | "grid_auto_flow": null, 1362 | "grid_auto_rows": null, 1363 | "grid_column": null, 1364 | "grid_gap": null, 1365 | "grid_row": null, 1366 | "grid_template_areas": null, 1367 | "grid_template_columns": null, 1368 | "grid_template_rows": null, 1369 | "height": null, 1370 | "justify_content": null, 1371 | "justify_items": null, 1372 | "left": null, 1373 | "margin": null, 1374 | "max_height": null, 1375 | "max_width": null, 1376 | "min_height": null, 1377 | "min_width": null, 1378 | "object_fit": null, 1379 | "object_position": null, 1380 | "order": null, 1381 | "overflow": null, 1382 | "overflow_x": null, 1383 | "overflow_y": null, 1384 | "padding": null, 1385 | "right": null, 1386 | "top": null, 1387 | "visibility": null, 1388 | "width": null 1389 | } 1390 | }, 1391 | "8b3deb1d17b845de842b950483274fe3": { 1392 | "model_module": "@jupyter-widgets/controls", 1393 | "model_name": "ProgressStyleModel", 1394 | "state": { 1395 | "_model_module": "@jupyter-widgets/controls", 1396 | "_model_module_version": "1.5.0", 1397 | "_model_name": "ProgressStyleModel", 1398 | "_view_count": null, 1399 | "_view_module": "@jupyter-widgets/base", 1400 | "_view_module_version": "1.2.0", 1401 | "_view_name": "StyleView", 1402 | "bar_color": null, 1403 | "description_width": "initial" 1404 | } 1405 | }, 1406 | "9fe90e309cd9429891fc1ea2ffd7228d": { 1407 | "model_module": "@jupyter-widgets/controls", 1408 | "model_name": "DescriptionStyleModel", 1409 | "state": { 1410 | "_model_module": "@jupyter-widgets/controls", 1411 | "_model_module_version": "1.5.0", 1412 | "_model_name": "DescriptionStyleModel", 1413 | "_view_count": null, 1414 | "_view_module": "@jupyter-widgets/base", 1415 | "_view_module_version": "1.2.0", 1416 | "_view_name": "StyleView", 1417 | "description_width": "" 1418 | } 1419 | }, 1420 | "a8f285b82065482982d270b7d5fec723": { 1421 | "model_module": "@jupyter-widgets/controls", 1422 | "model_name": "FloatProgressModel", 1423 | "state": { 1424 | "_dom_classes": [], 1425 | "_model_module": "@jupyter-widgets/controls", 1426 | "_model_module_version": "1.5.0", 1427 | "_model_name": "FloatProgressModel", 1428 | "_view_count": null, 1429 | "_view_module": "@jupyter-widgets/controls", 1430 | "_view_module_version": "1.5.0", 1431 | "_view_name": "ProgressView", 1432 | "bar_style": "success", 1433 | "description": "", 1434 | "description_tooltip": null, 1435 | "layout": "IPY_MODEL_86703ac3319b4b00bae27cf8762b4940", 1436 | "max": 1, 1437 | "min": 0, 1438 | "orientation": "horizontal", 1439 | "style": "IPY_MODEL_8b3deb1d17b845de842b950483274fe3", 1440 | "value": 1 1441 | } 1442 | }, 1443 | "da53ea1b8ef14d8ca099052666155532": { 1444 | "model_module": "@jupyter-widgets/base", 1445 | "model_name": "LayoutModel", 1446 | "state": { 1447 | "_model_module": "@jupyter-widgets/base", 1448 | "_model_module_version": "1.2.0", 1449 | "_model_name": "LayoutModel", 1450 | "_view_count": null, 1451 | "_view_module": "@jupyter-widgets/base", 1452 | "_view_module_version": "1.2.0", 1453 | "_view_name": "LayoutView", 1454 | "align_content": null, 1455 | "align_items": null, 1456 | "align_self": null, 1457 | "border": null, 1458 | "bottom": null, 1459 | "display": null, 1460 | "flex": null, 1461 | "flex_flow": null, 1462 | "grid_area": null, 1463 | "grid_auto_columns": null, 1464 | "grid_auto_flow": null, 1465 | "grid_auto_rows": null, 1466 | "grid_column": null, 1467 | "grid_gap": null, 1468 | "grid_row": null, 1469 | "grid_template_areas": null, 1470 | "grid_template_columns": null, 1471 | "grid_template_rows": null, 1472 | "height": null, 1473 | "justify_content": null, 1474 | "justify_items": null, 1475 | "left": null, 1476 | "margin": null, 1477 | "max_height": null, 1478 | "max_width": null, 1479 | "min_height": null, 1480 | "min_width": null, 1481 | "object_fit": null, 1482 | "object_position": null, 1483 | "order": null, 1484 | "overflow": null, 1485 | "overflow_x": null, 1486 | "overflow_y": null, 1487 | "padding": null, 1488 | "right": null, 1489 | "top": null, 1490 | "visibility": null, 1491 | "width": null 1492 | } 1493 | }, 1494 | "efa8aa0e6fc0445787294d2f6b5a0ddb": { 1495 | "model_module": "@jupyter-widgets/controls", 1496 | "model_name": "ProgressStyleModel", 1497 | "state": { 1498 | "_model_module": "@jupyter-widgets/controls", 1499 | "_model_module_version": "1.5.0", 1500 | "_model_name": "ProgressStyleModel", 1501 | "_view_count": null, 1502 | "_view_module": "@jupyter-widgets/base", 1503 | "_view_module_version": "1.2.0", 1504 | "_view_name": "StyleView", 1505 | "bar_color": null, 1506 | "description_width": "initial" 1507 | } 1508 | }, 1509 | "f121289fe6014cddbdd68e642538d452": { 1510 | "model_module": "@jupyter-widgets/controls", 1511 | "model_name": "HBoxModel", 1512 | "state": { 1513 | "_dom_classes": [], 1514 | "_model_module": "@jupyter-widgets/controls", 1515 | "_model_module_version": "1.5.0", 1516 | "_model_name": "HBoxModel", 1517 | "_view_count": null, 1518 | "_view_module": "@jupyter-widgets/controls", 1519 | "_view_module_version": "1.5.0", 1520 | "_view_name": "HBoxView", 1521 | "box_style": "", 1522 | "children": [ 1523 | "IPY_MODEL_5614716f142843148e2e23482ffb2f82", 1524 | "IPY_MODEL_fb5d80053df1495392d95a8db355ed63" 1525 | ], 1526 | "layout": "IPY_MODEL_847e04e040f64a6282cb5a648ad712f9" 1527 | } 1528 | }, 1529 | "f460a9421b534ce7a27a9e447f274201": { 1530 | "model_module": "@jupyter-widgets/base", 1531 | "model_name": "LayoutModel", 1532 | "state": { 1533 | "_model_module": "@jupyter-widgets/base", 1534 | "_model_module_version": "1.2.0", 1535 | "_model_name": "LayoutModel", 1536 | "_view_count": null, 1537 | "_view_module": "@jupyter-widgets/base", 1538 | "_view_module_version": "1.2.0", 1539 | "_view_name": "LayoutView", 1540 | "align_content": null, 1541 | "align_items": null, 1542 | "align_self": null, 1543 | "border": null, 1544 | "bottom": null, 1545 | "display": null, 1546 | "flex": null, 1547 | "flex_flow": null, 1548 | "grid_area": null, 1549 | "grid_auto_columns": null, 1550 | "grid_auto_flow": null, 1551 | "grid_auto_rows": null, 1552 | "grid_column": null, 1553 | "grid_gap": null, 1554 | "grid_row": null, 1555 | "grid_template_areas": null, 1556 | "grid_template_columns": null, 1557 | "grid_template_rows": null, 1558 | "height": null, 1559 | "justify_content": null, 1560 | "justify_items": null, 1561 | "left": null, 1562 | "margin": null, 1563 | "max_height": null, 1564 | "max_width": null, 1565 | "min_height": null, 1566 | "min_width": null, 1567 | "object_fit": null, 1568 | "object_position": null, 1569 | "order": null, 1570 | "overflow": null, 1571 | "overflow_x": null, 1572 | "overflow_y": null, 1573 | "padding": null, 1574 | "right": null, 1575 | "top": null, 1576 | "visibility": null, 1577 | "width": null 1578 | } 1579 | }, 1580 | "f565add4b8c146b9919153ca87da3545": { 1581 | "model_module": "@jupyter-widgets/controls", 1582 | "model_name": "ProgressStyleModel", 1583 | "state": { 1584 | "_model_module": "@jupyter-widgets/controls", 1585 | "_model_module_version": "1.5.0", 1586 | "_model_name": "ProgressStyleModel", 1587 | "_view_count": null, 1588 | "_view_module": "@jupyter-widgets/base", 1589 | "_view_module_version": "1.2.0", 1590 | "_view_name": "StyleView", 1591 | "bar_color": null, 1592 | "description_width": "initial" 1593 | } 1594 | }, 1595 | "fb5d80053df1495392d95a8db355ed63": { 1596 | "model_module": "@jupyter-widgets/controls", 1597 | "model_name": "HTMLModel", 1598 | "state": { 1599 | "_dom_classes": [], 1600 | "_model_module": "@jupyter-widgets/controls", 1601 | "_model_module_version": "1.5.0", 1602 | "_model_name": "HTMLModel", 1603 | "_view_count": null, 1604 | "_view_module": "@jupyter-widgets/controls", 1605 | "_view_module_version": "1.5.0", 1606 | "_view_name": "HTMLView", 1607 | "description": "", 1608 | "description_tooltip": null, 1609 | "layout": "IPY_MODEL_214497818dad447bbea1ead62155041c", 1610 | "placeholder": "​", 1611 | "style": "IPY_MODEL_9fe90e309cd9429891fc1ea2ffd7228d", 1612 | "value": " 9920512/? [00:02<00:00, 3369323.55it/s]" 1613 | } 1614 | } 1615 | } 1616 | } 1617 | }, 1618 | "nbformat": 4, 1619 | "nbformat_minor": 4 1620 | } 1621 | --------------------------------------------------------------------------------