├── README.md ├── .gitignore ├── 02-convolution ├── 01-conv-and-deconv.ipynb └── 02-upsample.ipynb ├── 03-recurrent-modules └── 02-lstm.ipynb ├── 05-pytorch-lighting └── 01-mnist.ipynb └── 10-pretrained-training └── CIFAR10.ipynb /README.md: -------------------------------------------------------------------------------- 1 | # Pytorch Snippets 2 | 3 | the repository has useful tutorial and snippets. 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # python 2 | *.pyc 3 | .ipynb_checkpoints 4 | 5 | # Pytorch 6 | *.pth 7 | checkpoints 8 | 9 | # Data 10 | lightning_logs 11 | MNIST 12 | -------------------------------------------------------------------------------- /02-convolution/01-conv-and-deconv.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 4, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import torch\n", 10 | "import torch.nn as nn" 11 | ] 12 | }, 13 | { 14 | "cell_type": "markdown", 15 | "metadata": {}, 16 | "source": [ 17 | "## 2D Convolution and Deconvolution" 18 | ] 19 | }, 20 | { 21 | "cell_type": "code", 22 | "execution_count": 37, 23 | "metadata": {}, 24 | "outputs": [ 25 | { 26 | "name": "stdout", 27 | "output_type": "stream", 28 | "text": [ 29 | "conv : torch.Size([16, 12, 60, 60])\n", 30 | "deconv: torch.Size([16, 7, 64, 64])\n" 31 | ] 32 | } 33 | ], 34 | "source": [ 35 | "x = torch.rand(16, 3, 64, 64) # 16 images\n", 36 | "\n", 37 | "conv = nn.Conv2d(3, 12, kernel_size=5)\n", 38 | "deconv = nn.ConvTranspose2d(12, 7, kernel_size=5)\n", 39 | "h1 = conv(x)\n", 40 | "h2 = deconv(h)\n", 41 | "\n", 42 | "print('conv :', h1.shape)\n", 43 | "print('deconv:', h2.shape)" 44 | ] 45 | } 46 | ], 47 | "metadata": { 48 | "kernelspec": { 49 | "display_name": "Python 3", 50 | "language": "python", 51 | "name": "python3" 52 | }, 53 | "language_info": { 54 | "codemirror_mode": { 55 | "name": "ipython", 56 | "version": 3 57 | }, 58 | "file_extension": ".py", 59 | "mimetype": "text/x-python", 60 | "name": "python", 61 | "nbconvert_exporter": "python", 62 | "pygments_lexer": "ipython3", 63 | "version": "3.6.9" 64 | }, 65 | "toc": { 66 | "base_numbering": 1, 67 | "nav_menu": {}, 68 | "number_sections": true, 69 | "sideBar": true, 70 | "skip_h1_title": false, 71 | "title_cell": "Table of Contents", 72 | "title_sidebar": "Contents", 73 | "toc_cell": false, 74 | "toc_position": {}, 75 | "toc_section_display": true, 76 | "toc_window_display": false 77 | } 78 | }, 79 | "nbformat": 4, 80 | "nbformat_minor": 4 81 | } 82 | -------------------------------------------------------------------------------- /02-convolution/02-upsample.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 9, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import torch\n", 10 | "import torch.nn as nn\n", 11 | "import torch.nn.functional as F" 12 | ] 13 | }, 14 | { 15 | "cell_type": "markdown", 16 | "metadata": {}, 17 | "source": [ 18 | "## 2D Upsampling Layer" 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": 27, 24 | "metadata": {}, 25 | "outputs": [ 26 | { 27 | "name": "stdout", 28 | "output_type": "stream", 29 | "text": [ 30 | "x : torch.Size([16, 3, 64, 64])\n", 31 | "conv : torch.Size([16, 12, 30, 30])\n", 32 | "upsample: torch.Size([16, 12, 64, 64])\n" 33 | ] 34 | } 35 | ], 36 | "source": [ 37 | "x = torch.rand(16, 3, 64, 64) # 16 images\n", 38 | "\n", 39 | "conv = nn.Conv2d(3, 12, kernel_size=6, stride=2)\n", 40 | "upsample = nn.Upsample(64, mode='nearest')\n", 41 | "\n", 42 | "h1 = conv(x)\n", 43 | "h2 = upsample(h1)\n", 44 | "\n", 45 | "print('x :', x.shape)\n", 46 | "print('conv :', h1.shape)\n", 47 | "print('upsample:', h2.shape)" 48 | ] 49 | }, 50 | { 51 | "cell_type": "markdown", 52 | "metadata": {}, 53 | "source": [ 54 | "## 2D UpSampling Function" 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": 50, 60 | "metadata": {}, 61 | "outputs": [ 62 | { 63 | "name": "stdout", 64 | "output_type": "stream", 65 | "text": [ 66 | "x.shape[-2:]: torch.Size([64, 64])\n", 67 | "x : torch.Size([16, 3, 64, 64])\n", 68 | "conv : torch.Size([16, 12, 30, 30])\n", 69 | "upsample: torch.Size([16, 12, 64, 64])\n" 70 | ] 71 | } 72 | ], 73 | "source": [ 74 | "x = torch.rand(16, 3, 64, 64) # 16 images\n", 75 | "\n", 76 | "conv = nn.Conv2d(3, 12, kernel_size=6, stride=2)\n", 77 | "\n", 78 | "h1 = conv(x)\n", 79 | "h2 = F.upsample(h1, size=x.shape[-2:])\n", 80 | "\n", 81 | "print('x.shape[-2:]:', x.shape[-2:])\n", 82 | "print('x :', x.shape)\n", 83 | "print('conv :', h1.shape)\n", 84 | "print('upsample:', h2.shape)" 85 | ] 86 | } 87 | ], 88 | "metadata": { 89 | "kernelspec": { 90 | "display_name": "Python 3", 91 | "language": "python", 92 | "name": "python3" 93 | }, 94 | "language_info": { 95 | "codemirror_mode": { 96 | "name": "ipython", 97 | "version": 3 98 | }, 99 | "file_extension": ".py", 100 | "mimetype": "text/x-python", 101 | "name": "python", 102 | "nbconvert_exporter": "python", 103 | "pygments_lexer": "ipython3", 104 | "version": "3.6.9" 105 | }, 106 | "toc": { 107 | "base_numbering": 1, 108 | "nav_menu": {}, 109 | "number_sections": true, 110 | "sideBar": true, 111 | "skip_h1_title": false, 112 | "title_cell": "Table of Contents", 113 | "title_sidebar": "Contents", 114 | "toc_cell": false, 115 | "toc_position": {}, 116 | "toc_section_display": true, 117 | "toc_window_display": false 118 | } 119 | }, 120 | "nbformat": 4, 121 | "nbformat_minor": 4 122 | } 123 | -------------------------------------------------------------------------------- /03-recurrent-modules/02-lstm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "Populating the interactive namespace from numpy and matplotlib\n" 13 | ] 14 | } 15 | ], 16 | "source": [ 17 | "%pylab inline\n", 18 | "\n", 19 | "import torch\n", 20 | "import torch.nn as nn\n", 21 | "import torch.nn.functional as F\n", 22 | "import torch.optim as optim\n" 23 | ] 24 | }, 25 | { 26 | "cell_type": "markdown", 27 | "metadata": {}, 28 | "source": [ 29 | "# LSTM\n", 30 | "\n", 31 | "nn.LSTM\n", 32 | " - input_size: x의 features 갯수\n", 33 | " - hidden_size: hidden state의 크기\n", 34 | " - num_layers: default=1 이며 stacking LSTM 사용시 늘려준다\n", 35 | " - bias: default=True 이며, False일 경우 bias weights b_ih, b_hh 사용 안함\n", 36 | " - batch_first: default=False이며, True이면 (batch, seq_feature) 순으로 intput, output 제공됨 \n", 37 | " - dropout: LSTM안의 output마다 dropout이 제공됨. default=0 (확률) \n", 38 | " - bidirectional: default=False\n", 39 | "\n", 40 | "Input Arguments\n", 41 | " - input: (seq_len, batch, input_size)\n", 42 | " - h_0: (n_layers * n_directions, batch, hidden_size)\n", 43 | " - c_0: (n_layers * n_directions, batch, hidden_size)" 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "metadata": {}, 49 | "source": [ 50 | "## Inference step at a time" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 81, 56 | "metadata": {}, 57 | "outputs": [ 58 | { 59 | "name": "stdout", 60 | "output_type": "stream", 61 | "text": [ 62 | "torch.Size([1, 32, 5]) tensor(0.0698, grad_fn=)\n", 63 | "torch.Size([1, 32, 5]) tensor(0.0867, grad_fn=)\n", 64 | "torch.Size([1, 32, 5]) tensor(0.0916, grad_fn=)\n", 65 | "torch.Size([1, 32, 5]) tensor(0.0923, grad_fn=)\n", 66 | "torch.Size([1, 32, 5]) tensor(0.0804, grad_fn=)\n", 67 | "torch.Size([1, 32, 5]) tensor(0.0788, grad_fn=)\n", 68 | "torch.Size([1, 32, 5]) tensor(0.0980, grad_fn=)\n", 69 | "torch.Size([1, 32, 5]) tensor(0.1026, grad_fn=)\n", 70 | "torch.Size([1, 32, 5]) tensor(0.0984, grad_fn=)\n" 71 | ] 72 | } 73 | ], 74 | "source": [ 75 | "# batch = 32, input=7, hidden=5\n", 76 | "torch.manual_seed(1)\n", 77 | "\n", 78 | "batch_size = 32\n", 79 | "input_size = 7\n", 80 | "hidden_size = 5\n", 81 | "\n", 82 | "# initialize LSTM and hidden state.\n", 83 | "lstm = nn.LSTM(input_size=input_size, hidden_size=5)\n", 84 | "h_0 = torch.rand(1, batch_size, 5)\n", 85 | "c_0 = torch.randn(1, batch_size, 5)\n", 86 | "\n", 87 | "# Sequence에서 하나씩 처리를 한다\n", 88 | "inputs = [torch.randn(batch_size, input_size) for _ in range(9)] # (seq_len, batch, input_size)\n", 89 | "for i in inputs:\n", 90 | " output, (h_0, c_0) = lstm(i.unsqueeze(0), (h_0, c_0))\n", 91 | " print(output.shape, output.mean())" 92 | ] 93 | }, 94 | { 95 | "cell_type": "markdown", 96 | "metadata": {}, 97 | "source": [ 98 | "## Inference entire sequence all at once" 99 | ] 100 | }, 101 | { 102 | "cell_type": "code", 103 | "execution_count": 83, 104 | "metadata": {}, 105 | "outputs": [ 106 | { 107 | "name": "stdout", 108 | "output_type": "stream", 109 | "text": [ 110 | "output: torch.Size([9, 32, 5])\n", 111 | "h_0: torch.Size([1, 32, 5])\n", 112 | "c_0: torch.Size([1, 32, 5])\n" 113 | ] 114 | } 115 | ], 116 | "source": [ 117 | "inputs2 = torch.cat(inputs).view(-1, batch_size, input_size)\n", 118 | "output, (h_0, c_0) = lstm(inputs2, (h_0, c_0))\n", 119 | "\n", 120 | "print('output:', output.shape)\n", 121 | "print('h_0:', h_0.shape)\n", 122 | "print('c_0:', c_0.shape)" 123 | ] 124 | }, 125 | { 126 | "cell_type": "code", 127 | "execution_count": 370, 128 | "metadata": {}, 129 | "outputs": [ 130 | { 131 | "data": { 132 | "text/plain": [ 133 | "[['NNG', 'JKS', 'NP+JKG', 'NNG', 'JKO', 'VV', 'EP', 'EC'],\n", 134 | " ['MAG', 'VV', 'ETM', 'NNG', 'JX', 'NNG', 'NNG', 'NNP', 'NNG'],\n", 135 | " ['NNG', 'JKS', 'NP+JKG', 'NNG', 'NNP', 'NNG', 'NNG', 'JKO', 'VV', 'EP', 'EC']]" 136 | ] 137 | }, 138 | "execution_count": 370, 139 | "metadata": {}, 140 | "output_type": "execute_result" 141 | } 142 | ], 143 | "source": [ 144 | "y_train" 145 | ] 146 | }, 147 | { 148 | "cell_type": "code", 149 | "execution_count": 330, 150 | "metadata": {}, 151 | "outputs": [], 152 | "source": [ 153 | "from konlpy.tag import Mecab\n", 154 | "mecab = Mecab()\n", 155 | "\n", 156 | "def prepare_sequence(seq, to_ix):\n", 157 | " idxs = [to_ix[w] for w in seq]\n", 158 | " return torch.tensor(idxs, dtype=torch.long)\n", 159 | "\n", 160 | "\n", 161 | "training_data = [\n", 162 | " '강아지가 내 사과를 먹었다',\n", 163 | " '어제 먹은 사과는 완전 핵존맛', \n", 164 | " '강아지가 내 핵존맛 저녁을 먹었다']\n", 165 | "\n", 166 | "x_train = []\n", 167 | "y_train = []\n", 168 | "word_to_ix = {}\n", 169 | "tag_to_ix = {}\n", 170 | "for st in training_data:\n", 171 | " pos = mecab.pos(st)\n", 172 | " x_train.append([i[0] for i in pos])\n", 173 | " y_train.append([i[1] for i in pos])\n", 174 | " \n", 175 | " for word in x_train[-1]:\n", 176 | " if word not in word_to_ix:\n", 177 | " word_to_ix[word] = len(word_to_ix)\n", 178 | " \n", 179 | " for tag in y_train[-1]:\n", 180 | " if tag not in tag_to_ix:\n", 181 | " tag_to_ix[tag] = len(tag_to_ix)\n", 182 | " \n", 183 | "ix_to_tag = {v:k for k, v in tag_to_ix.items()}\n", 184 | "\n", 185 | "EMBEDDING_DIM = len(word_to_ix)\n", 186 | "HIDDEN_DIM = 15" 187 | ] 188 | }, 189 | { 190 | "cell_type": "code", 191 | "execution_count": 368, 192 | "metadata": {}, 193 | "outputs": [], 194 | "source": [ 195 | "class LSTMTagger(nn.Module):\n", 196 | "\n", 197 | " def __init__(self, embedding_dim, hidden_dim, vocab_size, tagset_size):\n", 198 | " super(LSTMTagger, self).__init__()\n", 199 | " self.hidden_dim = hidden_dim\n", 200 | "\n", 201 | " self.word_embeddings = nn.Embedding(vocab_size, embedding_dim)\n", 202 | "\n", 203 | " # The LSTM takes word embeddings as inputs, and outputs hidden states\n", 204 | " # with dimensionality hidden_dim.\n", 205 | " self.lstm = nn.LSTM(embedding_dim, hidden_dim, bidirectional=False)\n", 206 | " self.decoder = nn.GRU(hidden_dim, hidden_dim)\n", 207 | "# self.decoder = nn.LSTM()\n", 208 | "\n", 209 | " # The linear layer that maps from hidden state space to tag space\n", 210 | " self.hidden2tag = nn.Linear(hidden_dim*1, tagset_size)\n", 211 | " self.hidden = self.init_hidden()\n", 212 | " self.hidden2 = None\n", 213 | "\n", 214 | " def init_hidden(self):\n", 215 | " # Before we've done anything, we dont have any hidden state.\n", 216 | " # Refer to the Pytorch documentation to see exactly\n", 217 | " # why they have this dimensionality.\n", 218 | " # The axes semantics are (num_layers, minibatch_size, hidden_dim)\n", 219 | " return (torch.zeros(1, 1, self.hidden_dim),\n", 220 | " torch.zeros(1, 1, self.hidden_dim))\n", 221 | "\n", 222 | " def forward(self, sentence):\n", 223 | " embeds = self.word_embeddings(sentence)\n", 224 | " \n", 225 | " lstm_outs = []\n", 226 | " for i in range(embeds.shape[0]):\n", 227 | " lstm_out, self.hidden = self.lstm(embeds[i].view(1, 1, -1), self.hidden)\n", 228 | " lstm_outs.append(lstm_out)\n", 229 | " \n", 230 | " encode_output = torch.cat(lstm_outs)\n", 231 | " decode_output = lstm_out\n", 232 | " self.hidden2 = lstm_out\n", 233 | " for _ in range(len(lstm_outs)):\n", 234 | " dot = encode_output @ decode_output.view(-1)\n", 235 | " score = torch.softmax(dot.squeeze(-1), dim=0)\n", 236 | " alignment_vectors = encode_output * score.view(-1, 1, 1)\n", 237 | " decode_output = alignment_vectors.sum(0).unsqueeze(0) + decode_output\n", 238 | " decode_output, self.hidden2 = self.decoder(decode_output, self.hidden2)\n", 239 | " \n", 240 | " tag_space = self.hidden2tag(torch.cat(lstm_outs).squeeze(1))\n", 241 | " tag_scores = F.log_softmax(tag_space, dim=1)\n", 242 | " return tag_scores\n", 243 | "\n", 244 | "with torch.no_grad():\n", 245 | " model = LSTMTagger(EMBEDDING_DIM, hidden_dim=25, vocab_size=len(word_to_ix), tagset_size=len(tag_to_ix))\n", 246 | " inputs = prepare_sequence(x_train[0], word_to_ix)\n", 247 | " tag_scores = model(inputs)" 248 | ] 249 | }, 250 | { 251 | "cell_type": "code", 252 | "execution_count": 372, 253 | "metadata": {}, 254 | "outputs": [ 255 | { 256 | "name": "stdout", 257 | "output_type": "stream", 258 | "text": [ 259 | "before training: tensor([4, 5, 8, 1, 6, 0, 0, 7])\n", 260 | "after training: tensor([0, 1, 2, 0, 3, 4, 5, 6])\n", 261 | "y_true : [0, 1, 2, 0, 3, 4, 5, 6]\n", 262 | "\n", 263 | "after training: tensor([ 7, 4, 8, 0, 9, 0, 0, 10, 0])\n", 264 | "y_true : [7, 4, 8, 0, 9, 0, 0, 10, 0]\n", 265 | "\n", 266 | "after training: tensor([ 0, 1, 2, 0, 10, 0, 0, 3, 4, 5, 6])\n", 267 | "y_true : [0, 1, 2, 0, 10, 0, 0, 3, 4, 5, 6]\n", 268 | "\n" 269 | ] 270 | } 271 | ], 272 | "source": [ 273 | "torch.manual_seed(1)\n", 274 | "\n", 275 | "model = LSTMTagger(EMBEDDING_DIM, hidden_dim=25, vocab_size=len(word_to_ix), tagset_size=len(tag_to_ix))\n", 276 | "loss_function = nn.NLLLoss()\n", 277 | "optimizer = optim.SGD(model.parameters(), lr=0.1)\n", 278 | "\n", 279 | "# See what the scores are before training\n", 280 | "# Note that element i,j of the output is the score for tag j for word i.\n", 281 | "# Here we don't need to train, so the code is wrapped in torch.no_grad()\n", 282 | "with torch.no_grad():\n", 283 | " inputs = prepare_sequence(x_train[0], word_to_ix)\n", 284 | " tag_scores = model(inputs)\n", 285 | " print('before training:', torch.softmax(tag_scores, dim=0).argmax(dim=-1))\n", 286 | "\n", 287 | "for epoch in range(300): # again, normally you would NOT do 300 epochs, it is toy data\n", 288 | " for sentence, tags in zip(x_train, y_train):\n", 289 | " # Step 1. Remember that Pytorch accumulates gradients.\n", 290 | " # We need to clear them out before each instance\n", 291 | " model.zero_grad()\n", 292 | "\n", 293 | " # Also, we need to clear out the hidden state of the LSTM,\n", 294 | " # detaching it from its history on the last instance.\n", 295 | " model.hidden = model.init_hidden()\n", 296 | "\n", 297 | " # Step 2. Get our inputs ready for the network, that is, turn them into\n", 298 | " # Tensors of word indices.\n", 299 | " sentence_in = prepare_sequence(sentence, word_to_ix)\n", 300 | " targets = prepare_sequence(tags, tag_to_ix)\n", 301 | "\n", 302 | " # Step 3. Run our forward pass.\n", 303 | " tag_scores = model(sentence_in)\n", 304 | "\n", 305 | " # Step 4. Compute the loss, gradients, and update the parameters by\n", 306 | " # calling optimizer.step()\n", 307 | " loss = loss_function(tag_scores, targets)\n", 308 | " loss.backward()\n", 309 | " optimizer.step()\n", 310 | "\n", 311 | "# See what the scores are after training\n", 312 | "with torch.no_grad():\n", 313 | " for i in range(3):\n", 314 | " inputs = prepare_sequence(x_train[i], word_to_ix)\n", 315 | " tag_scores = model(inputs)\n", 316 | "\n", 317 | " # The sentence is \"the dog ate the apple\". i,j corresponds to score for tag j\n", 318 | " # for word i. The predicted tag is the maximum scoring tag.\n", 319 | " # Here, we can see the predicted sequence below is 0 1 2 0 1\n", 320 | " # since 0 is index of the maximum value of row 1,\n", 321 | " # 1 is the index of maximum value of row 2, etc.\n", 322 | " # Which is DET NOUN VERB DET NOUN, the correct sequence!\n", 323 | " print('after training:', torch.softmax(tag_scores, dim=0).argmax(dim=-1))\n", 324 | " print('y_true :', [tag_to_ix[tag] for tag in y_train[i]])\n", 325 | " print()\n", 326 | " " 327 | ] 328 | } 329 | ], 330 | "metadata": { 331 | "kernelspec": { 332 | "display_name": "Python 3", 333 | "language": "python", 334 | "name": "python3" 335 | }, 336 | "language_info": { 337 | "codemirror_mode": { 338 | "name": "ipython", 339 | "version": 3 340 | }, 341 | "file_extension": ".py", 342 | "mimetype": "text/x-python", 343 | "name": "python", 344 | "nbconvert_exporter": "python", 345 | "pygments_lexer": "ipython3", 346 | "version": "3.6.9" 347 | }, 348 | "toc": { 349 | "base_numbering": 1, 350 | "nav_menu": {}, 351 | "number_sections": true, 352 | "sideBar": true, 353 | "skip_h1_title": false, 354 | "title_cell": "Table of Contents", 355 | "title_sidebar": "Contents", 356 | "toc_cell": false, 357 | "toc_position": {}, 358 | "toc_section_display": true, 359 | "toc_window_display": false 360 | } 361 | }, 362 | "nbformat": 4, 363 | "nbformat_minor": 4 364 | } 365 | -------------------------------------------------------------------------------- /05-pytorch-lighting/01-mnist.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 5, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import os\n", 10 | "\n", 11 | "import torch\n", 12 | "from torch.nn import functional as F\n", 13 | "from torch.utils.data import DataLoader\n", 14 | "from torchvision.datasets import MNIST\n", 15 | "from torchvision import transforms\n", 16 | "import pytorch_lightning as pl\n", 17 | "\n", 18 | "\n", 19 | "class MNISTModel(pl.LightningModule):\n", 20 | "\n", 21 | " def __init__(self):\n", 22 | " super(MNISTModel, self).__init__()\n", 23 | " # not the best model...\n", 24 | " self.l1 = torch.nn.Linear(28 * 28, 10)\n", 25 | "\n", 26 | " def forward(self, x):\n", 27 | " # called with self(x)\n", 28 | " return torch.relu(self.l1(x.view(x.size(0), -1)))\n", 29 | "\n", 30 | " def training_step(self, batch, batch_nb):\n", 31 | " # REQUIRED\n", 32 | " x, y = batch\n", 33 | " y_hat = self(x)\n", 34 | " loss = F.cross_entropy(y_hat, y)\n", 35 | " tensorboard_logs = {'train_loss': loss}\n", 36 | " return {'loss': loss, 'log': tensorboard_logs}\n", 37 | "\n", 38 | " def validation_step(self, batch, batch_nb):\n", 39 | " # OPTIONAL\n", 40 | " x, y = batch\n", 41 | " y_hat = self(x)\n", 42 | " return {'val_loss': F.cross_entropy(y_hat, y)}\n", 43 | "\n", 44 | " def validation_epoch_end(self, outputs):\n", 45 | " # OPTIONAL\n", 46 | " avg_loss = torch.stack([x['val_loss'] for x in outputs]).mean()\n", 47 | " tensorboard_logs = {'val_loss': avg_loss}\n", 48 | " return {'val_loss': avg_loss, 'log': tensorboard_logs}\n", 49 | "\n", 50 | " def test_step(self, batch, batch_nb):\n", 51 | " # OPTIONAL\n", 52 | " x, y = batch\n", 53 | " y_hat = self(x)\n", 54 | " return {'test_loss': F.cross_entropy(y_hat, y)}\n", 55 | "\n", 56 | " def test_epoch_end(self, outputs):\n", 57 | " # OPTIONAL\n", 58 | " avg_loss = torch.stack([x['test_loss'] for x in outputs]).mean()\n", 59 | " logs = {'test_loss': avg_loss}\n", 60 | " return {'test_loss': avg_loss, 'log': logs, 'progress_bar': logs}\n", 61 | "\n", 62 | " def configure_optimizers(self):\n", 63 | " # REQUIRED\n", 64 | " # can return multiple optimizers and learning_rate schedulers\n", 65 | " # (LBFGS it is automatically supported, no need for closure function)\n", 66 | " return torch.optim.Adam(self.parameters(), lr=0.02)\n", 67 | "\n", 68 | " def train_dataloader(self):\n", 69 | " # REQUIRED\n", 70 | " return DataLoader(MNIST(os.getcwd(), train=True, download=True,\n", 71 | " transform=transforms.ToTensor()), batch_size=32)\n", 72 | "\n", 73 | " def val_dataloader(self):\n", 74 | " # OPTIONAL\n", 75 | " return DataLoader(MNIST(os.getcwd(), train=True, download=True,\n", 76 | " transform=transforms.ToTensor()), batch_size=32)\n", 77 | "\n", 78 | " def test_dataloader(self):\n", 79 | " # OPTIONAL\n", 80 | " return DataLoader(MNIST(os.getcwd(), train=False, download=True,\n", 81 | " transform=transforms.ToTensor()), batch_size=32)\n", 82 | " \n", 83 | "model = MNISTModel()\n", 84 | "train_dl = model.train_dataloader()\n", 85 | "\n", 86 | "for x_train in train_dl:\n", 87 | " model.training_step(x_train, 0)\n", 88 | " break" 89 | ] 90 | }, 91 | { 92 | "cell_type": "code", 93 | "execution_count": 3, 94 | "metadata": {}, 95 | "outputs": [ 96 | { 97 | "name": "stderr", 98 | "output_type": "stream", 99 | "text": [ 100 | "INFO:lightning:GPU available: True, used: True\n", 101 | "INFO:lightning:CUDA_VISIBLE_DEVICES: [0]\n", 102 | "INFO:lightning:\n", 103 | " | Name | Type | Params\n", 104 | "----------------------------\n", 105 | "0 | l1 | Linear | 7 K \n" 106 | ] 107 | }, 108 | { 109 | "name": "stdout", 110 | "output_type": "stream", 111 | "text": [ 112 | "Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw/train-images-idx3-ubyte.gz\n" 113 | ] 114 | }, 115 | { 116 | "data": { 117 | "application/vnd.jupyter.widget-view+json": { 118 | "model_id": "31eb6955e7aa48929111e613c64f9114", 119 | "version_major": 2, 120 | "version_minor": 0 121 | }, 122 | "text/plain": [ 123 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))" 124 | ] 125 | }, 126 | "metadata": {}, 127 | "output_type": "display_data" 128 | }, 129 | { 130 | "name": "stdout", 131 | "output_type": "stream", 132 | "text": [ 133 | "Extracting /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw/train-images-idx3-ubyte.gz to /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw\n", 134 | "Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz to /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw/train-labels-idx1-ubyte.gz\n" 135 | ] 136 | }, 137 | { 138 | "data": { 139 | "application/vnd.jupyter.widget-view+json": { 140 | "model_id": "106c03f2d24b4963a50f779f5ff0d2ad", 141 | "version_major": 2, 142 | "version_minor": 0 143 | }, 144 | "text/plain": [ 145 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))" 146 | ] 147 | }, 148 | "metadata": {}, 149 | "output_type": "display_data" 150 | }, 151 | { 152 | "name": "stdout", 153 | "output_type": "stream", 154 | "text": [ 155 | "Extracting /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw/train-labels-idx1-ubyte.gz to /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw\n", 156 | "Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz to /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw/t10k-images-idx3-ubyte.gz\n" 157 | ] 158 | }, 159 | { 160 | "data": { 161 | "application/vnd.jupyter.widget-view+json": { 162 | "model_id": "e79b1980fca84389860945be9009faf3", 163 | "version_major": 2, 164 | "version_minor": 0 165 | }, 166 | "text/plain": [ 167 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))" 168 | ] 169 | }, 170 | "metadata": {}, 171 | "output_type": "display_data" 172 | }, 173 | { 174 | "name": "stdout", 175 | "output_type": "stream", 176 | "text": [ 177 | "Extracting /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw/t10k-images-idx3-ubyte.gz to /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw\n", 178 | "Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz to /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw/t10k-labels-idx1-ubyte.gz\n", 179 | "\n", 180 | "\n" 181 | ] 182 | }, 183 | { 184 | "data": { 185 | "application/vnd.jupyter.widget-view+json": { 186 | "model_id": "c029caa5e65d4e54994e0b2b9f40b028", 187 | "version_major": 2, 188 | "version_minor": 0 189 | }, 190 | "text/plain": [ 191 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', max=1.0), HTML(value='')))" 192 | ] 193 | }, 194 | "metadata": {}, 195 | "output_type": "display_data" 196 | }, 197 | { 198 | "name": "stdout", 199 | "output_type": "stream", 200 | "text": [ 201 | "Extracting /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw/t10k-labels-idx1-ubyte.gz to /home/anderson/@python/pytorch-tutorial-anderson/05-pytorch-lighting/MNIST/raw\n", 202 | "Processing...\n", 203 | "Done!\n" 204 | ] 205 | }, 206 | { 207 | "name": "stderr", 208 | "output_type": "stream", 209 | "text": [ 210 | "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/utilities/distributed.py:23: UserWarning: The dataloader, val dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` in the `DataLoader` init to improve performance.\n", 211 | " warnings.warn(*args, **kwargs)\n" 212 | ] 213 | }, 214 | { 215 | "data": { 216 | "application/vnd.jupyter.widget-view+json": { 217 | "model_id": "", 218 | "version_major": 2, 219 | "version_minor": 0 220 | }, 221 | "text/plain": [ 222 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validation sanity check', layout=Layout…" 223 | ] 224 | }, 225 | "metadata": {}, 226 | "output_type": "display_data" 227 | }, 228 | { 229 | "name": "stdout", 230 | "output_type": "stream", 231 | "text": [ 232 | "\r" 233 | ] 234 | }, 235 | { 236 | "name": "stderr", 237 | "output_type": "stream", 238 | "text": [ 239 | "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/utilities/distributed.py:23: UserWarning: The dataloader, train dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` in the `DataLoader` init to improve performance.\n", 240 | " warnings.warn(*args, **kwargs)\n" 241 | ] 242 | }, 243 | { 244 | "data": { 245 | "application/vnd.jupyter.widget-view+json": { 246 | "model_id": "ce7aca5e62fa4c87ada044803028c152", 247 | "version_major": 2, 248 | "version_minor": 0 249 | }, 250 | "text/plain": [ 251 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Training', layout=Layout(flex='2'), max…" 252 | ] 253 | }, 254 | "metadata": {}, 255 | "output_type": "display_data" 256 | }, 257 | { 258 | "data": { 259 | "application/vnd.jupyter.widget-view+json": { 260 | "model_id": "", 261 | "version_major": 2, 262 | "version_minor": 0 263 | }, 264 | "text/plain": [ 265 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 266 | ] 267 | }, 268 | "metadata": {}, 269 | "output_type": "display_data" 270 | }, 271 | { 272 | "data": { 273 | "application/vnd.jupyter.widget-view+json": { 274 | "model_id": "", 275 | "version_major": 2, 276 | "version_minor": 0 277 | }, 278 | "text/plain": [ 279 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 280 | ] 281 | }, 282 | "metadata": {}, 283 | "output_type": "display_data" 284 | }, 285 | { 286 | "data": { 287 | "application/vnd.jupyter.widget-view+json": { 288 | "model_id": "", 289 | "version_major": 2, 290 | "version_minor": 0 291 | }, 292 | "text/plain": [ 293 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 294 | ] 295 | }, 296 | "metadata": {}, 297 | "output_type": "display_data" 298 | }, 299 | { 300 | "data": { 301 | "application/vnd.jupyter.widget-view+json": { 302 | "model_id": "", 303 | "version_major": 2, 304 | "version_minor": 0 305 | }, 306 | "text/plain": [ 307 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 308 | ] 309 | }, 310 | "metadata": {}, 311 | "output_type": "display_data" 312 | }, 313 | { 314 | "data": { 315 | "application/vnd.jupyter.widget-view+json": { 316 | "model_id": "", 317 | "version_major": 2, 318 | "version_minor": 0 319 | }, 320 | "text/plain": [ 321 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 322 | ] 323 | }, 324 | "metadata": {}, 325 | "output_type": "display_data" 326 | }, 327 | { 328 | "data": { 329 | "application/vnd.jupyter.widget-view+json": { 330 | "model_id": "", 331 | "version_major": 2, 332 | "version_minor": 0 333 | }, 334 | "text/plain": [ 335 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 336 | ] 337 | }, 338 | "metadata": {}, 339 | "output_type": "display_data" 340 | }, 341 | { 342 | "data": { 343 | "application/vnd.jupyter.widget-view+json": { 344 | "model_id": "", 345 | "version_major": 2, 346 | "version_minor": 0 347 | }, 348 | "text/plain": [ 349 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 350 | ] 351 | }, 352 | "metadata": {}, 353 | "output_type": "display_data" 354 | }, 355 | { 356 | "data": { 357 | "application/vnd.jupyter.widget-view+json": { 358 | "model_id": "", 359 | "version_major": 2, 360 | "version_minor": 0 361 | }, 362 | "text/plain": [ 363 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 364 | ] 365 | }, 366 | "metadata": {}, 367 | "output_type": "display_data" 368 | }, 369 | { 370 | "data": { 371 | "application/vnd.jupyter.widget-view+json": { 372 | "model_id": "", 373 | "version_major": 2, 374 | "version_minor": 0 375 | }, 376 | "text/plain": [ 377 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 378 | ] 379 | }, 380 | "metadata": {}, 381 | "output_type": "display_data" 382 | }, 383 | { 384 | "data": { 385 | "application/vnd.jupyter.widget-view+json": { 386 | "model_id": "", 387 | "version_major": 2, 388 | "version_minor": 0 389 | }, 390 | "text/plain": [ 391 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 392 | ] 393 | }, 394 | "metadata": {}, 395 | "output_type": "display_data" 396 | }, 397 | { 398 | "data": { 399 | "application/vnd.jupyter.widget-view+json": { 400 | "model_id": "", 401 | "version_major": 2, 402 | "version_minor": 0 403 | }, 404 | "text/plain": [ 405 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 406 | ] 407 | }, 408 | "metadata": {}, 409 | "output_type": "display_data" 410 | }, 411 | { 412 | "data": { 413 | "application/vnd.jupyter.widget-view+json": { 414 | "model_id": "", 415 | "version_major": 2, 416 | "version_minor": 0 417 | }, 418 | "text/plain": [ 419 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 420 | ] 421 | }, 422 | "metadata": {}, 423 | "output_type": "display_data" 424 | }, 425 | { 426 | "data": { 427 | "application/vnd.jupyter.widget-view+json": { 428 | "model_id": "", 429 | "version_major": 2, 430 | "version_minor": 0 431 | }, 432 | "text/plain": [ 433 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 434 | ] 435 | }, 436 | "metadata": {}, 437 | "output_type": "display_data" 438 | }, 439 | { 440 | "data": { 441 | "application/vnd.jupyter.widget-view+json": { 442 | "model_id": "", 443 | "version_major": 2, 444 | "version_minor": 0 445 | }, 446 | "text/plain": [ 447 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 448 | ] 449 | }, 450 | "metadata": {}, 451 | "output_type": "display_data" 452 | }, 453 | { 454 | "data": { 455 | "application/vnd.jupyter.widget-view+json": { 456 | "model_id": "", 457 | "version_major": 2, 458 | "version_minor": 0 459 | }, 460 | "text/plain": [ 461 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 462 | ] 463 | }, 464 | "metadata": {}, 465 | "output_type": "display_data" 466 | }, 467 | { 468 | "data": { 469 | "application/vnd.jupyter.widget-view+json": { 470 | "model_id": "", 471 | "version_major": 2, 472 | "version_minor": 0 473 | }, 474 | "text/plain": [ 475 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 476 | ] 477 | }, 478 | "metadata": {}, 479 | "output_type": "display_data" 480 | }, 481 | { 482 | "data": { 483 | "application/vnd.jupyter.widget-view+json": { 484 | "model_id": "", 485 | "version_major": 2, 486 | "version_minor": 0 487 | }, 488 | "text/plain": [ 489 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 490 | ] 491 | }, 492 | "metadata": {}, 493 | "output_type": "display_data" 494 | }, 495 | { 496 | "data": { 497 | "application/vnd.jupyter.widget-view+json": { 498 | "model_id": "", 499 | "version_major": 2, 500 | "version_minor": 0 501 | }, 502 | "text/plain": [ 503 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 504 | ] 505 | }, 506 | "metadata": {}, 507 | "output_type": "display_data" 508 | }, 509 | { 510 | "data": { 511 | "application/vnd.jupyter.widget-view+json": { 512 | "model_id": "", 513 | "version_major": 2, 514 | "version_minor": 0 515 | }, 516 | "text/plain": [ 517 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 518 | ] 519 | }, 520 | "metadata": {}, 521 | "output_type": "display_data" 522 | }, 523 | { 524 | "data": { 525 | "application/vnd.jupyter.widget-view+json": { 526 | "model_id": "", 527 | "version_major": 2, 528 | "version_minor": 0 529 | }, 530 | "text/plain": [ 531 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 532 | ] 533 | }, 534 | "metadata": {}, 535 | "output_type": "display_data" 536 | }, 537 | { 538 | "data": { 539 | "application/vnd.jupyter.widget-view+json": { 540 | "model_id": "", 541 | "version_major": 2, 542 | "version_minor": 0 543 | }, 544 | "text/plain": [ 545 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 546 | ] 547 | }, 548 | "metadata": {}, 549 | "output_type": "display_data" 550 | }, 551 | { 552 | "data": { 553 | "application/vnd.jupyter.widget-view+json": { 554 | "model_id": "", 555 | "version_major": 2, 556 | "version_minor": 0 557 | }, 558 | "text/plain": [ 559 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 560 | ] 561 | }, 562 | "metadata": {}, 563 | "output_type": "display_data" 564 | }, 565 | { 566 | "data": { 567 | "application/vnd.jupyter.widget-view+json": { 568 | "model_id": "", 569 | "version_major": 2, 570 | "version_minor": 0 571 | }, 572 | "text/plain": [ 573 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 574 | ] 575 | }, 576 | "metadata": {}, 577 | "output_type": "display_data" 578 | }, 579 | { 580 | "data": { 581 | "application/vnd.jupyter.widget-view+json": { 582 | "model_id": "", 583 | "version_major": 2, 584 | "version_minor": 0 585 | }, 586 | "text/plain": [ 587 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 588 | ] 589 | }, 590 | "metadata": {}, 591 | "output_type": "display_data" 592 | }, 593 | { 594 | "data": { 595 | "application/vnd.jupyter.widget-view+json": { 596 | "model_id": "", 597 | "version_major": 2, 598 | "version_minor": 0 599 | }, 600 | "text/plain": [ 601 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 602 | ] 603 | }, 604 | "metadata": {}, 605 | "output_type": "display_data" 606 | }, 607 | { 608 | "data": { 609 | "application/vnd.jupyter.widget-view+json": { 610 | "model_id": "", 611 | "version_major": 2, 612 | "version_minor": 0 613 | }, 614 | "text/plain": [ 615 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 616 | ] 617 | }, 618 | "metadata": {}, 619 | "output_type": "display_data" 620 | }, 621 | { 622 | "data": { 623 | "application/vnd.jupyter.widget-view+json": { 624 | "model_id": "", 625 | "version_major": 2, 626 | "version_minor": 0 627 | }, 628 | "text/plain": [ 629 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 630 | ] 631 | }, 632 | "metadata": {}, 633 | "output_type": "display_data" 634 | }, 635 | { 636 | "data": { 637 | "application/vnd.jupyter.widget-view+json": { 638 | "model_id": "", 639 | "version_major": 2, 640 | "version_minor": 0 641 | }, 642 | "text/plain": [ 643 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 644 | ] 645 | }, 646 | "metadata": {}, 647 | "output_type": "display_data" 648 | }, 649 | { 650 | "data": { 651 | "application/vnd.jupyter.widget-view+json": { 652 | "model_id": "", 653 | "version_major": 2, 654 | "version_minor": 0 655 | }, 656 | "text/plain": [ 657 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 658 | ] 659 | }, 660 | "metadata": {}, 661 | "output_type": "display_data" 662 | }, 663 | { 664 | "data": { 665 | "application/vnd.jupyter.widget-view+json": { 666 | "model_id": "", 667 | "version_major": 2, 668 | "version_minor": 0 669 | }, 670 | "text/plain": [ 671 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 672 | ] 673 | }, 674 | "metadata": {}, 675 | "output_type": "display_data" 676 | }, 677 | { 678 | "data": { 679 | "application/vnd.jupyter.widget-view+json": { 680 | "model_id": "", 681 | "version_major": 2, 682 | "version_minor": 0 683 | }, 684 | "text/plain": [ 685 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 686 | ] 687 | }, 688 | "metadata": {}, 689 | "output_type": "display_data" 690 | }, 691 | { 692 | "data": { 693 | "application/vnd.jupyter.widget-view+json": { 694 | "model_id": "", 695 | "version_major": 2, 696 | "version_minor": 0 697 | }, 698 | "text/plain": [ 699 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 700 | ] 701 | }, 702 | "metadata": {}, 703 | "output_type": "display_data" 704 | }, 705 | { 706 | "data": { 707 | "application/vnd.jupyter.widget-view+json": { 708 | "model_id": "", 709 | "version_major": 2, 710 | "version_minor": 0 711 | }, 712 | "text/plain": [ 713 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 714 | ] 715 | }, 716 | "metadata": {}, 717 | "output_type": "display_data" 718 | }, 719 | { 720 | "data": { 721 | "application/vnd.jupyter.widget-view+json": { 722 | "model_id": "", 723 | "version_major": 2, 724 | "version_minor": 0 725 | }, 726 | "text/plain": [ 727 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 728 | ] 729 | }, 730 | "metadata": {}, 731 | "output_type": "display_data" 732 | }, 733 | { 734 | "data": { 735 | "application/vnd.jupyter.widget-view+json": { 736 | "model_id": "", 737 | "version_major": 2, 738 | "version_minor": 0 739 | }, 740 | "text/plain": [ 741 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 742 | ] 743 | }, 744 | "metadata": {}, 745 | "output_type": "display_data" 746 | }, 747 | { 748 | "data": { 749 | "application/vnd.jupyter.widget-view+json": { 750 | "model_id": "", 751 | "version_major": 2, 752 | "version_minor": 0 753 | }, 754 | "text/plain": [ 755 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 756 | ] 757 | }, 758 | "metadata": {}, 759 | "output_type": "display_data" 760 | }, 761 | { 762 | "data": { 763 | "application/vnd.jupyter.widget-view+json": { 764 | "model_id": "", 765 | "version_major": 2, 766 | "version_minor": 0 767 | }, 768 | "text/plain": [ 769 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 770 | ] 771 | }, 772 | "metadata": {}, 773 | "output_type": "display_data" 774 | }, 775 | { 776 | "data": { 777 | "application/vnd.jupyter.widget-view+json": { 778 | "model_id": "", 779 | "version_major": 2, 780 | "version_minor": 0 781 | }, 782 | "text/plain": [ 783 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 784 | ] 785 | }, 786 | "metadata": {}, 787 | "output_type": "display_data" 788 | }, 789 | { 790 | "data": { 791 | "application/vnd.jupyter.widget-view+json": { 792 | "model_id": "", 793 | "version_major": 2, 794 | "version_minor": 0 795 | }, 796 | "text/plain": [ 797 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 798 | ] 799 | }, 800 | "metadata": {}, 801 | "output_type": "display_data" 802 | }, 803 | { 804 | "data": { 805 | "application/vnd.jupyter.widget-view+json": { 806 | "model_id": "", 807 | "version_major": 2, 808 | "version_minor": 0 809 | }, 810 | "text/plain": [ 811 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 812 | ] 813 | }, 814 | "metadata": {}, 815 | "output_type": "display_data" 816 | }, 817 | { 818 | "data": { 819 | "application/vnd.jupyter.widget-view+json": { 820 | "model_id": "", 821 | "version_major": 2, 822 | "version_minor": 0 823 | }, 824 | "text/plain": [ 825 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 826 | ] 827 | }, 828 | "metadata": {}, 829 | "output_type": "display_data" 830 | }, 831 | { 832 | "data": { 833 | "application/vnd.jupyter.widget-view+json": { 834 | "model_id": "", 835 | "version_major": 2, 836 | "version_minor": 0 837 | }, 838 | "text/plain": [ 839 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 840 | ] 841 | }, 842 | "metadata": {}, 843 | "output_type": "display_data" 844 | }, 845 | { 846 | "data": { 847 | "application/vnd.jupyter.widget-view+json": { 848 | "model_id": "", 849 | "version_major": 2, 850 | "version_minor": 0 851 | }, 852 | "text/plain": [ 853 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 854 | ] 855 | }, 856 | "metadata": {}, 857 | "output_type": "display_data" 858 | }, 859 | { 860 | "data": { 861 | "application/vnd.jupyter.widget-view+json": { 862 | "model_id": "", 863 | "version_major": 2, 864 | "version_minor": 0 865 | }, 866 | "text/plain": [ 867 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 868 | ] 869 | }, 870 | "metadata": {}, 871 | "output_type": "display_data" 872 | }, 873 | { 874 | "data": { 875 | "application/vnd.jupyter.widget-view+json": { 876 | "model_id": "", 877 | "version_major": 2, 878 | "version_minor": 0 879 | }, 880 | "text/plain": [ 881 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 882 | ] 883 | }, 884 | "metadata": {}, 885 | "output_type": "display_data" 886 | }, 887 | { 888 | "data": { 889 | "application/vnd.jupyter.widget-view+json": { 890 | "model_id": "", 891 | "version_major": 2, 892 | "version_minor": 0 893 | }, 894 | "text/plain": [ 895 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 896 | ] 897 | }, 898 | "metadata": {}, 899 | "output_type": "display_data" 900 | }, 901 | { 902 | "data": { 903 | "application/vnd.jupyter.widget-view+json": { 904 | "model_id": "", 905 | "version_major": 2, 906 | "version_minor": 0 907 | }, 908 | "text/plain": [ 909 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 910 | ] 911 | }, 912 | "metadata": {}, 913 | "output_type": "display_data" 914 | }, 915 | { 916 | "data": { 917 | "application/vnd.jupyter.widget-view+json": { 918 | "model_id": "", 919 | "version_major": 2, 920 | "version_minor": 0 921 | }, 922 | "text/plain": [ 923 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 924 | ] 925 | }, 926 | "metadata": {}, 927 | "output_type": "display_data" 928 | }, 929 | { 930 | "data": { 931 | "application/vnd.jupyter.widget-view+json": { 932 | "model_id": "", 933 | "version_major": 2, 934 | "version_minor": 0 935 | }, 936 | "text/plain": [ 937 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 938 | ] 939 | }, 940 | "metadata": {}, 941 | "output_type": "display_data" 942 | }, 943 | { 944 | "data": { 945 | "application/vnd.jupyter.widget-view+json": { 946 | "model_id": "", 947 | "version_major": 2, 948 | "version_minor": 0 949 | }, 950 | "text/plain": [ 951 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 952 | ] 953 | }, 954 | "metadata": {}, 955 | "output_type": "display_data" 956 | }, 957 | { 958 | "data": { 959 | "application/vnd.jupyter.widget-view+json": { 960 | "model_id": "", 961 | "version_major": 2, 962 | "version_minor": 0 963 | }, 964 | "text/plain": [ 965 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 966 | ] 967 | }, 968 | "metadata": {}, 969 | "output_type": "display_data" 970 | }, 971 | { 972 | "data": { 973 | "application/vnd.jupyter.widget-view+json": { 974 | "model_id": "fac7ed3cff554cf6995a5f870b88645f", 975 | "version_major": 2, 976 | "version_minor": 0 977 | }, 978 | "text/plain": [ 979 | "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validating', layout=Layout(flex='2'), m…" 980 | ] 981 | }, 982 | "metadata": {}, 983 | "output_type": "display_data" 984 | }, 985 | { 986 | "name": "stderr", 987 | "output_type": "stream", 988 | "text": [ 989 | "INFO:lightning:Detected KeyboardInterrupt, attempting graceful shutdown...\n" 990 | ] 991 | }, 992 | { 993 | "name": "stdout", 994 | "output_type": "stream", 995 | "text": [ 996 | "\n" 997 | ] 998 | }, 999 | { 1000 | "data": { 1001 | "text/plain": [ 1002 | "1" 1003 | ] 1004 | }, 1005 | "execution_count": 3, 1006 | "metadata": {}, 1007 | "output_type": "execute_result" 1008 | } 1009 | ], 1010 | "source": [ 1011 | "mnist_model = MNISTModel()\n", 1012 | "\n", 1013 | "# most basic trainer, uses good defaults (1 gpu)\n", 1014 | "trainer = pl.Trainer(gpus=1) \n", 1015 | "trainer.fit(mnist_model) " 1016 | ] 1017 | } 1018 | ], 1019 | "metadata": { 1020 | "kernelspec": { 1021 | "display_name": "Python 3", 1022 | "language": "python", 1023 | "name": "python3" 1024 | }, 1025 | "language_info": { 1026 | "codemirror_mode": { 1027 | "name": "ipython", 1028 | "version": 3 1029 | }, 1030 | "file_extension": ".py", 1031 | "mimetype": "text/x-python", 1032 | "name": "python", 1033 | "nbconvert_exporter": "python", 1034 | "pygments_lexer": "ipython3", 1035 | "version": "3.6.9" 1036 | }, 1037 | "toc": { 1038 | "base_numbering": 1, 1039 | "nav_menu": {}, 1040 | "number_sections": true, 1041 | "sideBar": true, 1042 | "skip_h1_title": false, 1043 | "title_cell": "Table of Contents", 1044 | "title_sidebar": "Contents", 1045 | "toc_cell": false, 1046 | "toc_position": {}, 1047 | "toc_section_display": true, 1048 | "toc_window_display": false 1049 | } 1050 | }, 1051 | "nbformat": 4, 1052 | "nbformat_minor": 4 1053 | } 1054 | -------------------------------------------------------------------------------- /10-pretrained-training/CIFAR10.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 44, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "\n", 11 | "import os\n", 12 | "import torch\n", 13 | "import torch.nn as nn\n", 14 | "import torch.nn.functional as F\n", 15 | "import tempfile\n", 16 | "import re\n", 17 | "\n", 18 | "from PIL import Image\n", 19 | "from torch.utils.data import DataLoader\n", 20 | "from torch.optim import Adam\n", 21 | "from torch.optim.lr_scheduler import ReduceLROnPlateau\n", 22 | "from torchvision import transforms\n", 23 | "from torchvision.datasets import CIFAR10\n", 24 | "from torchvision.models import vgg19_bn\n", 25 | "\n", 26 | "from tqdm.notebook import tqdm_notebook as tqdm" 27 | ] 28 | }, 29 | { 30 | "cell_type": "markdown", 31 | "metadata": {}, 32 | "source": [ 33 | "# Data" 34 | ] 35 | }, 36 | { 37 | "cell_type": "code", 38 | "execution_count": 30, 39 | "metadata": {}, 40 | "outputs": [ 41 | { 42 | "name": "stdout", 43 | "output_type": "stream", 44 | "text": [ 45 | "Files already downloaded and verified\n", 46 | "normalization mean: [0.49139968 0.48215841 0.44653091]\n", 47 | "normalization std : [0.00089181 0.00114635 0.00057204]\n", 48 | "Files already downloaded and verified\n", 49 | "Files already downloaded and verified\n" 50 | ] 51 | } 52 | ], 53 | "source": [ 54 | "cifar10 = CIFAR10(tempfile.gettempdir(),\n", 55 | " train=True,\n", 56 | " download=True)\n", 57 | "_mean = cifar10.data.mean(axis=0).mean(0).mean(0)/255\n", 58 | "_std = cifar10.data.std(axis=0).std(0).std(0)/255\n", 59 | "\n", 60 | "print('normalization mean:', _mean)\n", 61 | "print('normalization std :', _std)\n", 62 | "\n", 63 | "\n", 64 | "transform = transforms.Compose([transforms.RandomCrop(32, padding=3),\n", 65 | " transforms.RandomHorizontalFlip(),\n", 66 | " transforms.RandomVerticalFlip(),\n", 67 | " transforms.ToTensor(),\n", 68 | " transforms.Normalize(_mean, _std)])\n", 69 | "\n", 70 | "train_loader = DataLoader(CIFAR10(tempfile.gettempdir(),\n", 71 | " train=True,\n", 72 | " transform=transform,\n", 73 | " download=True),\n", 74 | " batch_size=64,\n", 75 | " shuffle=True)\n", 76 | "\n", 77 | "test_loader = DataLoader(CIFAR10(tempfile.gettempdir(),\n", 78 | " train=False,\n", 79 | " transform=transform,\n", 80 | " download=True),\n", 81 | " num_workers=4,\n", 82 | " batch_size=64,\n", 83 | " shuffle=True,\n", 84 | " drop_last=True, \n", 85 | " pin_memory=True)" 86 | ] 87 | }, 88 | { 89 | "cell_type": "code", 90 | "execution_count": 49, 91 | "metadata": {}, 92 | "outputs": [ 93 | { 94 | "data": { 95 | "text/plain": [ 96 | "torch.Size([3, 32, 32])" 97 | ] 98 | }, 99 | "execution_count": 49, 100 | "metadata": {}, 101 | "output_type": "execute_result" 102 | } 103 | ], 104 | "source": [ 105 | "transform(Image.fromarray(cifar10.data[0])).shape" 106 | ] 107 | }, 108 | { 109 | "cell_type": "markdown", 110 | "metadata": {}, 111 | "source": [ 112 | "# Model" 113 | ] 114 | }, 115 | { 116 | "cell_type": "code", 117 | "execution_count": 25, 118 | "metadata": { 119 | "scrolled": true 120 | }, 121 | "outputs": [ 122 | { 123 | "name": "stdout", 124 | "output_type": "stream", 125 | "text": [ 126 | "checkpoint loaded: checkpoints/checkpoint_76_0.85.pth\n" 127 | ] 128 | } 129 | ], 130 | "source": [ 131 | "class Model(nn.Module):\n", 132 | " \n", 133 | " def __init__(self):\n", 134 | " super().__init__()\n", 135 | " \n", 136 | " backbone = vgg19_bn(pretrained=True)\n", 137 | " backbone = nn.Sequential(* (list(list(backbone.modules())[0].children())[:-2]))\n", 138 | " \n", 139 | "# for param in list(backbone.parameters())[:-25]:\n", 140 | "# param.requires_grad = False\n", 141 | " \n", 142 | " self.backbone = backbone\n", 143 | " self.gap = nn.AdaptiveAvgPool2d((1,1))\n", 144 | " \n", 145 | " self.linear = nn.Linear(512, 10)\n", 146 | " \n", 147 | " def forward(self, x):\n", 148 | " h1 = self.backbone(x)\n", 149 | " h2 = self.gap(h1)\n", 150 | " b_sz, c_sz, h_sz, w_sz = h2.shape\n", 151 | " h2 = h2.view(b_sz, c_sz)\n", 152 | " h3 = self.linear(h2)\n", 153 | " output = F.log_softmax(h3)\n", 154 | " return output\n", 155 | "\n", 156 | "def load_checkpoint(model):\n", 157 | " regex = re.compile('checkpoint_(\\d+)_(\\d\\.\\d+)\\.pth')\n", 158 | " files = []\n", 159 | " for file in os.listdir('checkpoints'):\n", 160 | " matched = regex.match(file)\n", 161 | " if matched:\n", 162 | " acc = float(matched.group(2))\n", 163 | " files.append((acc, file))\n", 164 | " files = sorted(files, key=lambda x: -x[0])\n", 165 | " if files: \n", 166 | " checkpoint_path = os.path.join('checkpoints', files[0][1])\n", 167 | " model.load_state_dict(torch.load(checkpoint_path))\n", 168 | " print(f'checkpoint loaded: {checkpoint_path}')\n", 169 | " \n", 170 | "clf = Model()\n", 171 | "clf = clf.cuda()\n", 172 | "\n", 173 | "# load_checkpoint(clf)\n", 174 | "\n", 175 | "adam = Adam(clf.parameters(), lr=0.01)\n", 176 | "lr_scheduler = ReduceLROnPlateau(adam, factor=0.1)" 177 | ] 178 | }, 179 | { 180 | "cell_type": "markdown", 181 | "metadata": {}, 182 | "source": [ 183 | "# Train" 184 | ] 185 | }, 186 | { 187 | "cell_type": "code", 188 | "execution_count": 26, 189 | "metadata": {}, 190 | "outputs": [ 191 | { 192 | "data": { 193 | "application/vnd.jupyter.widget-view+json": { 194 | "model_id": "675e24d3a70d4cccb7a1a3dbf355ddf1", 195 | "version_major": 2, 196 | "version_minor": 0 197 | }, 198 | "text/plain": [ 199 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 200 | ] 201 | }, 202 | "metadata": {}, 203 | "output_type": "display_data" 204 | }, 205 | { 206 | "name": "stderr", 207 | "output_type": "stream", 208 | "text": [ 209 | "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:23: UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument.\n" 210 | ] 211 | }, 212 | { 213 | "name": "stdout", 214 | "output_type": "stream", 215 | "text": [ 216 | "\n", 217 | "epoch:00 | loss:0.44, 0.57 | acc:0.86, 0.83 | lr:0.0100\n" 218 | ] 219 | }, 220 | { 221 | "data": { 222 | "application/vnd.jupyter.widget-view+json": { 223 | "model_id": "96c3e08a05a348c88a9a8144f08470f3", 224 | "version_major": 2, 225 | "version_minor": 0 226 | }, 227 | "text/plain": [ 228 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 229 | ] 230 | }, 231 | "metadata": {}, 232 | "output_type": "display_data" 233 | }, 234 | { 235 | "name": "stdout", 236 | "output_type": "stream", 237 | "text": [ 238 | "\n", 239 | "epoch:01 | loss:0.46, 0.59 | acc:0.85, 0.82 | lr:0.0100\n" 240 | ] 241 | }, 242 | { 243 | "data": { 244 | "application/vnd.jupyter.widget-view+json": { 245 | "model_id": "c9e5875544e04ec3873c7d121b1c0eaa", 246 | "version_major": 2, 247 | "version_minor": 0 248 | }, 249 | "text/plain": [ 250 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 251 | ] 252 | }, 253 | "metadata": {}, 254 | "output_type": "display_data" 255 | }, 256 | { 257 | "name": "stdout", 258 | "output_type": "stream", 259 | "text": [ 260 | "\n", 261 | "epoch:02 | loss:0.44, 0.58 | acc:0.86, 0.82 | lr:0.0100\n" 262 | ] 263 | }, 264 | { 265 | "data": { 266 | "application/vnd.jupyter.widget-view+json": { 267 | "model_id": "ed71fc0492ea4728b1ec2b33e0ebd51b", 268 | "version_major": 2, 269 | "version_minor": 0 270 | }, 271 | "text/plain": [ 272 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 273 | ] 274 | }, 275 | "metadata": {}, 276 | "output_type": "display_data" 277 | }, 278 | { 279 | "name": "stdout", 280 | "output_type": "stream", 281 | "text": [ 282 | "\n", 283 | "epoch:03 | loss:0.45, 0.55 | acc:0.86, 0.83 | lr:0.0100\n" 284 | ] 285 | }, 286 | { 287 | "data": { 288 | "application/vnd.jupyter.widget-view+json": { 289 | "model_id": "21ad9158dd71471883319368a0a34eb9", 290 | "version_major": 2, 291 | "version_minor": 0 292 | }, 293 | "text/plain": [ 294 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 295 | ] 296 | }, 297 | "metadata": {}, 298 | "output_type": "display_data" 299 | }, 300 | { 301 | "name": "stdout", 302 | "output_type": "stream", 303 | "text": [ 304 | "\n", 305 | "epoch:04 | loss:0.45, 0.58 | acc:0.86, 0.82 | lr:0.0100\n" 306 | ] 307 | }, 308 | { 309 | "data": { 310 | "application/vnd.jupyter.widget-view+json": { 311 | "model_id": "02783c7965df47dca934352a97326a83", 312 | "version_major": 2, 313 | "version_minor": 0 314 | }, 315 | "text/plain": [ 316 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 317 | ] 318 | }, 319 | "metadata": {}, 320 | "output_type": "display_data" 321 | }, 322 | { 323 | "name": "stdout", 324 | "output_type": "stream", 325 | "text": [ 326 | "\n", 327 | "epoch:05 | loss:0.44, 0.64 | acc:0.86, 0.81 | lr:0.0100\n" 328 | ] 329 | }, 330 | { 331 | "data": { 332 | "application/vnd.jupyter.widget-view+json": { 333 | "model_id": "02e698d55a964b6da4519a0810a8d998", 334 | "version_major": 2, 335 | "version_minor": 0 336 | }, 337 | "text/plain": [ 338 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 339 | ] 340 | }, 341 | "metadata": {}, 342 | "output_type": "display_data" 343 | }, 344 | { 345 | "name": "stdout", 346 | "output_type": "stream", 347 | "text": [ 348 | "\n", 349 | "epoch:06 | loss:0.45, 0.56 | acc:0.86, 0.82 | lr:0.0100\n" 350 | ] 351 | }, 352 | { 353 | "data": { 354 | "application/vnd.jupyter.widget-view+json": { 355 | "model_id": "b04a46fc49a54753bf1309215819da3e", 356 | "version_major": 2, 357 | "version_minor": 0 358 | }, 359 | "text/plain": [ 360 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 361 | ] 362 | }, 363 | "metadata": {}, 364 | "output_type": "display_data" 365 | }, 366 | { 367 | "name": "stdout", 368 | "output_type": "stream", 369 | "text": [ 370 | "\n", 371 | "epoch:07 | loss:0.42, 0.57 | acc:0.87, 0.82 | lr:0.0100\n" 372 | ] 373 | }, 374 | { 375 | "data": { 376 | "application/vnd.jupyter.widget-view+json": { 377 | "model_id": "2e778f58116b43ac9a48bca4c4e515ee", 378 | "version_major": 2, 379 | "version_minor": 0 380 | }, 381 | "text/plain": [ 382 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 383 | ] 384 | }, 385 | "metadata": {}, 386 | "output_type": "display_data" 387 | }, 388 | { 389 | "name": "stdout", 390 | "output_type": "stream", 391 | "text": [ 392 | "\n", 393 | "epoch:08 | loss:0.42, 0.54 | acc:0.87, 0.83 | lr:0.0100\n" 394 | ] 395 | }, 396 | { 397 | "data": { 398 | "application/vnd.jupyter.widget-view+json": { 399 | "model_id": "ef55c674814f49a98fac2b41600a7d4c", 400 | "version_major": 2, 401 | "version_minor": 0 402 | }, 403 | "text/plain": [ 404 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 405 | ] 406 | }, 407 | "metadata": {}, 408 | "output_type": "display_data" 409 | }, 410 | { 411 | "name": "stdout", 412 | "output_type": "stream", 413 | "text": [ 414 | "\n", 415 | "epoch:09 | loss:0.40, 0.52 | acc:0.87, 0.84 | lr:0.0100\n" 416 | ] 417 | }, 418 | { 419 | "data": { 420 | "application/vnd.jupyter.widget-view+json": { 421 | "model_id": "afab67e7e5b0430b9996ded23ff4c382", 422 | "version_major": 2, 423 | "version_minor": 0 424 | }, 425 | "text/plain": [ 426 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 427 | ] 428 | }, 429 | "metadata": {}, 430 | "output_type": "display_data" 431 | }, 432 | { 433 | "name": "stdout", 434 | "output_type": "stream", 435 | "text": [ 436 | "\n", 437 | "epoch:10 | loss:0.38, 0.52 | acc:0.88, 0.84 | lr:0.0100\n" 438 | ] 439 | }, 440 | { 441 | "data": { 442 | "application/vnd.jupyter.widget-view+json": { 443 | "model_id": "b064d47acaf7488cadee3593fd05dccc", 444 | "version_major": 2, 445 | "version_minor": 0 446 | }, 447 | "text/plain": [ 448 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 449 | ] 450 | }, 451 | "metadata": {}, 452 | "output_type": "display_data" 453 | }, 454 | { 455 | "name": "stdout", 456 | "output_type": "stream", 457 | "text": [ 458 | "\n", 459 | "epoch:11 | loss:0.38, 0.53 | acc:0.88, 0.84 | lr:0.0100\n" 460 | ] 461 | }, 462 | { 463 | "data": { 464 | "application/vnd.jupyter.widget-view+json": { 465 | "model_id": "7761fb56feae436caa14637a13d9a55c", 466 | "version_major": 2, 467 | "version_minor": 0 468 | }, 469 | "text/plain": [ 470 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 471 | ] 472 | }, 473 | "metadata": {}, 474 | "output_type": "display_data" 475 | }, 476 | { 477 | "name": "stdout", 478 | "output_type": "stream", 479 | "text": [ 480 | "\n", 481 | "epoch:12 | loss:0.37, 0.54 | acc:0.88, 0.83 | lr:0.0100\n" 482 | ] 483 | }, 484 | { 485 | "data": { 486 | "application/vnd.jupyter.widget-view+json": { 487 | "model_id": "b062be7b73674be4b81ae40d80c44066", 488 | "version_major": 2, 489 | "version_minor": 0 490 | }, 491 | "text/plain": [ 492 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 493 | ] 494 | }, 495 | "metadata": {}, 496 | "output_type": "display_data" 497 | }, 498 | { 499 | "name": "stdout", 500 | "output_type": "stream", 501 | "text": [ 502 | "\n", 503 | "epoch:13 | loss:0.37, 0.51 | acc:0.88, 0.84 | lr:0.0100\n" 504 | ] 505 | }, 506 | { 507 | "data": { 508 | "application/vnd.jupyter.widget-view+json": { 509 | "model_id": "6b1451b77e1b4b75b5b504994d39c3fb", 510 | "version_major": 2, 511 | "version_minor": 0 512 | }, 513 | "text/plain": [ 514 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 515 | ] 516 | }, 517 | "metadata": {}, 518 | "output_type": "display_data" 519 | }, 520 | { 521 | "name": "stdout", 522 | "output_type": "stream", 523 | "text": [ 524 | "\n", 525 | "epoch:14 | loss:0.36, 0.55 | acc:0.88, 0.84 | lr:0.0100\n" 526 | ] 527 | }, 528 | { 529 | "data": { 530 | "application/vnd.jupyter.widget-view+json": { 531 | "model_id": "4f399ede8d2b4969863b364979fea772", 532 | "version_major": 2, 533 | "version_minor": 0 534 | }, 535 | "text/plain": [ 536 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 537 | ] 538 | }, 539 | "metadata": {}, 540 | "output_type": "display_data" 541 | }, 542 | { 543 | "name": "stdout", 544 | "output_type": "stream", 545 | "text": [ 546 | "\n", 547 | "epoch:15 | loss:0.36, 0.51 | acc:0.89, 0.84 | lr:0.0100\n" 548 | ] 549 | }, 550 | { 551 | "data": { 552 | "application/vnd.jupyter.widget-view+json": { 553 | "model_id": "c4b5e8ff2f9f4a29a39aeca554cda047", 554 | "version_major": 2, 555 | "version_minor": 0 556 | }, 557 | "text/plain": [ 558 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 559 | ] 560 | }, 561 | "metadata": {}, 562 | "output_type": "display_data" 563 | }, 564 | { 565 | "name": "stdout", 566 | "output_type": "stream", 567 | "text": [ 568 | "\n", 569 | "epoch:16 | loss:0.35, 0.50 | acc:0.89, 0.85 | lr:0.0100\n" 570 | ] 571 | }, 572 | { 573 | "data": { 574 | "application/vnd.jupyter.widget-view+json": { 575 | "model_id": "42cc2185983d4225884c8ee485a93679", 576 | "version_major": 2, 577 | "version_minor": 0 578 | }, 579 | "text/plain": [ 580 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 581 | ] 582 | }, 583 | "metadata": {}, 584 | "output_type": "display_data" 585 | }, 586 | { 587 | "name": "stdout", 588 | "output_type": "stream", 589 | "text": [ 590 | "\n", 591 | "epoch:17 | loss:0.35, 0.56 | acc:0.89, 0.83 | lr:0.0100\n" 592 | ] 593 | }, 594 | { 595 | "data": { 596 | "application/vnd.jupyter.widget-view+json": { 597 | "model_id": "ddd3445b305f45868cd0091c9c6e9b4f", 598 | "version_major": 2, 599 | "version_minor": 0 600 | }, 601 | "text/plain": [ 602 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 603 | ] 604 | }, 605 | "metadata": {}, 606 | "output_type": "display_data" 607 | }, 608 | { 609 | "name": "stdout", 610 | "output_type": "stream", 611 | "text": [ 612 | "\n", 613 | "epoch:18 | loss:0.34, 0.53 | acc:0.89, 0.84 | lr:0.0100\n" 614 | ] 615 | }, 616 | { 617 | "data": { 618 | "application/vnd.jupyter.widget-view+json": { 619 | "model_id": "e6c7d4bf2ac4417cae5a7634409a4f55", 620 | "version_major": 2, 621 | "version_minor": 0 622 | }, 623 | "text/plain": [ 624 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 625 | ] 626 | }, 627 | "metadata": {}, 628 | "output_type": "display_data" 629 | }, 630 | { 631 | "name": "stdout", 632 | "output_type": "stream", 633 | "text": [ 634 | "\n", 635 | "epoch:19 | loss:0.33, 0.52 | acc:0.89, 0.84 | lr:0.0100\n" 636 | ] 637 | }, 638 | { 639 | "data": { 640 | "application/vnd.jupyter.widget-view+json": { 641 | "model_id": "6397031f61564dd48796e930dd1a6656", 642 | "version_major": 2, 643 | "version_minor": 0 644 | }, 645 | "text/plain": [ 646 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 647 | ] 648 | }, 649 | "metadata": {}, 650 | "output_type": "display_data" 651 | }, 652 | { 653 | "name": "stdout", 654 | "output_type": "stream", 655 | "text": [ 656 | "\n", 657 | "epoch:20 | loss:0.33, 0.52 | acc:0.90, 0.83 | lr:0.0100\n" 658 | ] 659 | }, 660 | { 661 | "data": { 662 | "application/vnd.jupyter.widget-view+json": { 663 | "model_id": "a6a42079ace74351a654ac4f7ec43d2f", 664 | "version_major": 2, 665 | "version_minor": 0 666 | }, 667 | "text/plain": [ 668 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 669 | ] 670 | }, 671 | "metadata": {}, 672 | "output_type": "display_data" 673 | }, 674 | { 675 | "name": "stdout", 676 | "output_type": "stream", 677 | "text": [ 678 | "\n", 679 | "epoch:21 | loss:0.32, 0.49 | acc:0.90, 0.85 | lr:0.0100\n" 680 | ] 681 | }, 682 | { 683 | "data": { 684 | "application/vnd.jupyter.widget-view+json": { 685 | "model_id": "3c01f2511752459186b87ea4698da05a", 686 | "version_major": 2, 687 | "version_minor": 0 688 | }, 689 | "text/plain": [ 690 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 691 | ] 692 | }, 693 | "metadata": {}, 694 | "output_type": "display_data" 695 | }, 696 | { 697 | "name": "stdout", 698 | "output_type": "stream", 699 | "text": [ 700 | "\n", 701 | "epoch:22 | loss:0.32, 0.49 | acc:0.90, 0.85 | lr:0.0100\n" 702 | ] 703 | }, 704 | { 705 | "data": { 706 | "application/vnd.jupyter.widget-view+json": { 707 | "model_id": "08605bbc02484c9b8c192733593c2b06", 708 | "version_major": 2, 709 | "version_minor": 0 710 | }, 711 | "text/plain": [ 712 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 713 | ] 714 | }, 715 | "metadata": {}, 716 | "output_type": "display_data" 717 | }, 718 | { 719 | "name": "stdout", 720 | "output_type": "stream", 721 | "text": [ 722 | "\n", 723 | "epoch:23 | loss:0.32, 0.51 | acc:0.90, 0.84 | lr:0.0100\n" 724 | ] 725 | }, 726 | { 727 | "data": { 728 | "application/vnd.jupyter.widget-view+json": { 729 | "model_id": "7aae1b9a0ce945a6a09885091f936ffe", 730 | "version_major": 2, 731 | "version_minor": 0 732 | }, 733 | "text/plain": [ 734 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 735 | ] 736 | }, 737 | "metadata": {}, 738 | "output_type": "display_data" 739 | }, 740 | { 741 | "name": "stdout", 742 | "output_type": "stream", 743 | "text": [ 744 | "\n", 745 | "epoch:24 | loss:0.32, 0.50 | acc:0.90, 0.84 | lr:0.0100\n" 746 | ] 747 | }, 748 | { 749 | "data": { 750 | "application/vnd.jupyter.widget-view+json": { 751 | "model_id": "81b5c043480f49468a523b9b228a5cd8", 752 | "version_major": 2, 753 | "version_minor": 0 754 | }, 755 | "text/plain": [ 756 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 757 | ] 758 | }, 759 | "metadata": {}, 760 | "output_type": "display_data" 761 | }, 762 | { 763 | "name": "stdout", 764 | "output_type": "stream", 765 | "text": [ 766 | "\n", 767 | "epoch:25 | loss:0.32, 0.48 | acc:0.90, 0.85 | lr:0.0100\n" 768 | ] 769 | }, 770 | { 771 | "data": { 772 | "application/vnd.jupyter.widget-view+json": { 773 | "model_id": "f7d667af24dc4f8b843ddf8709442674", 774 | "version_major": 2, 775 | "version_minor": 0 776 | }, 777 | "text/plain": [ 778 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 779 | ] 780 | }, 781 | "metadata": {}, 782 | "output_type": "display_data" 783 | }, 784 | { 785 | "name": "stdout", 786 | "output_type": "stream", 787 | "text": [ 788 | "\n", 789 | "epoch:26 | loss:0.31, 0.52 | acc:0.90, 0.84 | lr:0.0100\n" 790 | ] 791 | }, 792 | { 793 | "data": { 794 | "application/vnd.jupyter.widget-view+json": { 795 | "model_id": "697e9acc59fc4dc8a5edac5f7543e5f3", 796 | "version_major": 2, 797 | "version_minor": 0 798 | }, 799 | "text/plain": [ 800 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 801 | ] 802 | }, 803 | "metadata": {}, 804 | "output_type": "display_data" 805 | }, 806 | { 807 | "name": "stdout", 808 | "output_type": "stream", 809 | "text": [ 810 | "\n", 811 | "epoch:27 | loss:0.30, 0.48 | acc:0.90, 0.85 | lr:0.0100\n" 812 | ] 813 | }, 814 | { 815 | "data": { 816 | "application/vnd.jupyter.widget-view+json": { 817 | "model_id": "aba128f4ed734a37b02c241617372465", 818 | "version_major": 2, 819 | "version_minor": 0 820 | }, 821 | "text/plain": [ 822 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 823 | ] 824 | }, 825 | "metadata": {}, 826 | "output_type": "display_data" 827 | }, 828 | { 829 | "name": "stdout", 830 | "output_type": "stream", 831 | "text": [ 832 | "\n", 833 | "epoch:28 | loss:0.30, 0.52 | acc:0.90, 0.85 | lr:0.0100\n" 834 | ] 835 | }, 836 | { 837 | "data": { 838 | "application/vnd.jupyter.widget-view+json": { 839 | "model_id": "9a222f929fa540d9b824cc8d4d903791", 840 | "version_major": 2, 841 | "version_minor": 0 842 | }, 843 | "text/plain": [ 844 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 845 | ] 846 | }, 847 | "metadata": {}, 848 | "output_type": "display_data" 849 | }, 850 | { 851 | "name": "stdout", 852 | "output_type": "stream", 853 | "text": [ 854 | "\n", 855 | "epoch:29 | loss:0.30, 0.51 | acc:0.90, 0.85 | lr:0.0100\n" 856 | ] 857 | }, 858 | { 859 | "data": { 860 | "application/vnd.jupyter.widget-view+json": { 861 | "model_id": "71169b754c664127a8d0971c364e28c8", 862 | "version_major": 2, 863 | "version_minor": 0 864 | }, 865 | "text/plain": [ 866 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 867 | ] 868 | }, 869 | "metadata": {}, 870 | "output_type": "display_data" 871 | }, 872 | { 873 | "name": "stdout", 874 | "output_type": "stream", 875 | "text": [ 876 | "\n", 877 | "epoch:30 | loss:0.30, 0.50 | acc:0.90, 0.85 | lr:0.0100\n" 878 | ] 879 | }, 880 | { 881 | "data": { 882 | "application/vnd.jupyter.widget-view+json": { 883 | "model_id": "c3abdc02378442a783791d64cbef693e", 884 | "version_major": 2, 885 | "version_minor": 0 886 | }, 887 | "text/plain": [ 888 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 889 | ] 890 | }, 891 | "metadata": {}, 892 | "output_type": "display_data" 893 | }, 894 | { 895 | "name": "stdout", 896 | "output_type": "stream", 897 | "text": [ 898 | "\n", 899 | "epoch:31 | loss:0.29, 0.51 | acc:0.91, 0.84 | lr:0.0100\n" 900 | ] 901 | }, 902 | { 903 | "data": { 904 | "application/vnd.jupyter.widget-view+json": { 905 | "model_id": "c0e4b7b723b84126a500df28f7460ec2", 906 | "version_major": 2, 907 | "version_minor": 0 908 | }, 909 | "text/plain": [ 910 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 911 | ] 912 | }, 913 | "metadata": {}, 914 | "output_type": "display_data" 915 | }, 916 | { 917 | "name": "stdout", 918 | "output_type": "stream", 919 | "text": [ 920 | "\n", 921 | "epoch:32 | loss:0.29, 0.52 | acc:0.91, 0.84 | lr:0.0100\n" 922 | ] 923 | }, 924 | { 925 | "data": { 926 | "application/vnd.jupyter.widget-view+json": { 927 | "model_id": "b3a09111b6a646c7b5752db10d7b476f", 928 | "version_major": 2, 929 | "version_minor": 0 930 | }, 931 | "text/plain": [ 932 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 933 | ] 934 | }, 935 | "metadata": {}, 936 | "output_type": "display_data" 937 | }, 938 | { 939 | "name": "stdout", 940 | "output_type": "stream", 941 | "text": [ 942 | "\n", 943 | "epoch:33 | loss:0.29, 0.47 | acc:0.91, 0.86 | lr:0.0100\n" 944 | ] 945 | }, 946 | { 947 | "data": { 948 | "application/vnd.jupyter.widget-view+json": { 949 | "model_id": "bbf578e1d5a24434aadcb33c4f594e58", 950 | "version_major": 2, 951 | "version_minor": 0 952 | }, 953 | "text/plain": [ 954 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 955 | ] 956 | }, 957 | "metadata": {}, 958 | "output_type": "display_data" 959 | }, 960 | { 961 | "name": "stdout", 962 | "output_type": "stream", 963 | "text": [ 964 | "\n", 965 | "epoch:34 | loss:0.28, 0.53 | acc:0.91, 0.84 | lr:0.0100\n" 966 | ] 967 | }, 968 | { 969 | "data": { 970 | "application/vnd.jupyter.widget-view+json": { 971 | "model_id": "e7ead3cf366f4290a25e94194496b4df", 972 | "version_major": 2, 973 | "version_minor": 0 974 | }, 975 | "text/plain": [ 976 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 977 | ] 978 | }, 979 | "metadata": {}, 980 | "output_type": "display_data" 981 | }, 982 | { 983 | "name": "stdout", 984 | "output_type": "stream", 985 | "text": [ 986 | "\n", 987 | "epoch:35 | loss:0.29, 0.50 | acc:0.91, 0.85 | lr:0.0100\n" 988 | ] 989 | }, 990 | { 991 | "data": { 992 | "application/vnd.jupyter.widget-view+json": { 993 | "model_id": "28c368e2ab1d448fb6f8cf8d0380eeff", 994 | "version_major": 2, 995 | "version_minor": 0 996 | }, 997 | "text/plain": [ 998 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 999 | ] 1000 | }, 1001 | "metadata": {}, 1002 | "output_type": "display_data" 1003 | }, 1004 | { 1005 | "name": "stdout", 1006 | "output_type": "stream", 1007 | "text": [ 1008 | "\n", 1009 | "epoch:36 | loss:0.28, 0.48 | acc:0.91, 0.85 | lr:0.0100\n" 1010 | ] 1011 | }, 1012 | { 1013 | "data": { 1014 | "application/vnd.jupyter.widget-view+json": { 1015 | "model_id": "df3522d9e2ff41cd9376e106d1aa4a64", 1016 | "version_major": 2, 1017 | "version_minor": 0 1018 | }, 1019 | "text/plain": [ 1020 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1021 | ] 1022 | }, 1023 | "metadata": {}, 1024 | "output_type": "display_data" 1025 | }, 1026 | { 1027 | "name": "stdout", 1028 | "output_type": "stream", 1029 | "text": [ 1030 | "\n", 1031 | "epoch:37 | loss:0.28, 0.52 | acc:0.91, 0.85 | lr:0.0100\n" 1032 | ] 1033 | }, 1034 | { 1035 | "data": { 1036 | "application/vnd.jupyter.widget-view+json": { 1037 | "model_id": "bdd806a84a9f474da25ce5e3be959fc7", 1038 | "version_major": 2, 1039 | "version_minor": 0 1040 | }, 1041 | "text/plain": [ 1042 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1043 | ] 1044 | }, 1045 | "metadata": {}, 1046 | "output_type": "display_data" 1047 | }, 1048 | { 1049 | "name": "stdout", 1050 | "output_type": "stream", 1051 | "text": [ 1052 | "\n", 1053 | "epoch:38 | loss:0.28, 0.51 | acc:0.91, 0.84 | lr:0.0100\n" 1054 | ] 1055 | }, 1056 | { 1057 | "data": { 1058 | "application/vnd.jupyter.widget-view+json": { 1059 | "model_id": "9a2fafc763754a1484e40089f539b87c", 1060 | "version_major": 2, 1061 | "version_minor": 0 1062 | }, 1063 | "text/plain": [ 1064 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1065 | ] 1066 | }, 1067 | "metadata": {}, 1068 | "output_type": "display_data" 1069 | }, 1070 | { 1071 | "name": "stdout", 1072 | "output_type": "stream", 1073 | "text": [ 1074 | "\n", 1075 | "epoch:39 | loss:0.28, 0.50 | acc:0.91, 0.85 | lr:0.0100\n" 1076 | ] 1077 | }, 1078 | { 1079 | "data": { 1080 | "application/vnd.jupyter.widget-view+json": { 1081 | "model_id": "a9cb4d5fcd1241b598fe583d79e6c400", 1082 | "version_major": 2, 1083 | "version_minor": 0 1084 | }, 1085 | "text/plain": [ 1086 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1087 | ] 1088 | }, 1089 | "metadata": {}, 1090 | "output_type": "display_data" 1091 | }, 1092 | { 1093 | "name": "stdout", 1094 | "output_type": "stream", 1095 | "text": [ 1096 | "\n", 1097 | "epoch:40 | loss:0.27, 0.48 | acc:0.91, 0.85 | lr:0.0100\n" 1098 | ] 1099 | }, 1100 | { 1101 | "data": { 1102 | "application/vnd.jupyter.widget-view+json": { 1103 | "model_id": "78b6a5fc726241d496eea4d477b819e3", 1104 | "version_major": 2, 1105 | "version_minor": 0 1106 | }, 1107 | "text/plain": [ 1108 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1109 | ] 1110 | }, 1111 | "metadata": {}, 1112 | "output_type": "display_data" 1113 | }, 1114 | { 1115 | "name": "stdout", 1116 | "output_type": "stream", 1117 | "text": [ 1118 | "\n", 1119 | "epoch:41 | loss:0.27, 0.49 | acc:0.91, 0.85 | lr:0.0100\n" 1120 | ] 1121 | }, 1122 | { 1123 | "data": { 1124 | "application/vnd.jupyter.widget-view+json": { 1125 | "model_id": "ea98f43ae19d482180d72f33675e55fe", 1126 | "version_major": 2, 1127 | "version_minor": 0 1128 | }, 1129 | "text/plain": [ 1130 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1131 | ] 1132 | }, 1133 | "metadata": {}, 1134 | "output_type": "display_data" 1135 | }, 1136 | { 1137 | "name": "stdout", 1138 | "output_type": "stream", 1139 | "text": [ 1140 | "\n", 1141 | "epoch:42 | loss:0.27, 0.48 | acc:0.91, 0.85 | lr:0.0100\n" 1142 | ] 1143 | }, 1144 | { 1145 | "data": { 1146 | "application/vnd.jupyter.widget-view+json": { 1147 | "model_id": "27a42b911c164784b7cf5a27542b30ad", 1148 | "version_major": 2, 1149 | "version_minor": 0 1150 | }, 1151 | "text/plain": [ 1152 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1153 | ] 1154 | }, 1155 | "metadata": {}, 1156 | "output_type": "display_data" 1157 | }, 1158 | { 1159 | "name": "stdout", 1160 | "output_type": "stream", 1161 | "text": [ 1162 | "\n", 1163 | "epoch:43 | loss:0.27, 0.48 | acc:0.91, 0.85 | lr:0.0100\n" 1164 | ] 1165 | }, 1166 | { 1167 | "data": { 1168 | "application/vnd.jupyter.widget-view+json": { 1169 | "model_id": "702c77e38ffc4f5fb2540c80711d32f8", 1170 | "version_major": 2, 1171 | "version_minor": 0 1172 | }, 1173 | "text/plain": [ 1174 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1175 | ] 1176 | }, 1177 | "metadata": {}, 1178 | "output_type": "display_data" 1179 | }, 1180 | { 1181 | "name": "stdout", 1182 | "output_type": "stream", 1183 | "text": [ 1184 | "\n", 1185 | "epoch:44 | loss:0.26, 0.51 | acc:0.92, 0.85 | lr:0.0010\n" 1186 | ] 1187 | }, 1188 | { 1189 | "data": { 1190 | "application/vnd.jupyter.widget-view+json": { 1191 | "model_id": "7f91faa4fd634e30955853bf32ec2989", 1192 | "version_major": 2, 1193 | "version_minor": 0 1194 | }, 1195 | "text/plain": [ 1196 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1197 | ] 1198 | }, 1199 | "metadata": {}, 1200 | "output_type": "display_data" 1201 | }, 1202 | { 1203 | "name": "stdout", 1204 | "output_type": "stream", 1205 | "text": [ 1206 | "\n", 1207 | "epoch:45 | loss:0.22, 0.45 | acc:0.93, 0.86 | lr:0.0010\n" 1208 | ] 1209 | }, 1210 | { 1211 | "data": { 1212 | "application/vnd.jupyter.widget-view+json": { 1213 | "model_id": "ed093d10404a4d56aeb51adcdc599354", 1214 | "version_major": 2, 1215 | "version_minor": 0 1216 | }, 1217 | "text/plain": [ 1218 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1219 | ] 1220 | }, 1221 | "metadata": {}, 1222 | "output_type": "display_data" 1223 | }, 1224 | { 1225 | "name": "stdout", 1226 | "output_type": "stream", 1227 | "text": [ 1228 | "\n", 1229 | "epoch:46 | loss:0.21, 0.44 | acc:0.93, 0.87 | lr:0.0010\n" 1230 | ] 1231 | }, 1232 | { 1233 | "data": { 1234 | "application/vnd.jupyter.widget-view+json": { 1235 | "model_id": "dbc23f1a518f472884e1f2f491134df2", 1236 | "version_major": 2, 1237 | "version_minor": 0 1238 | }, 1239 | "text/plain": [ 1240 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1241 | ] 1242 | }, 1243 | "metadata": {}, 1244 | "output_type": "display_data" 1245 | }, 1246 | { 1247 | "name": "stdout", 1248 | "output_type": "stream", 1249 | "text": [ 1250 | "\n", 1251 | "epoch:47 | loss:0.20, 0.44 | acc:0.93, 0.87 | lr:0.0010\n" 1252 | ] 1253 | }, 1254 | { 1255 | "data": { 1256 | "application/vnd.jupyter.widget-view+json": { 1257 | "model_id": "04e0160608e349878c0c207bcec1c2d7", 1258 | "version_major": 2, 1259 | "version_minor": 0 1260 | }, 1261 | "text/plain": [ 1262 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1263 | ] 1264 | }, 1265 | "metadata": {}, 1266 | "output_type": "display_data" 1267 | }, 1268 | { 1269 | "name": "stdout", 1270 | "output_type": "stream", 1271 | "text": [ 1272 | "\n", 1273 | "epoch:48 | loss:0.19, 0.46 | acc:0.94, 0.87 | lr:0.0010\n" 1274 | ] 1275 | }, 1276 | { 1277 | "data": { 1278 | "application/vnd.jupyter.widget-view+json": { 1279 | "model_id": "a3459be9ad1e4c14b81894ae0032bf2f", 1280 | "version_major": 2, 1281 | "version_minor": 0 1282 | }, 1283 | "text/plain": [ 1284 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1285 | ] 1286 | }, 1287 | "metadata": {}, 1288 | "output_type": "display_data" 1289 | }, 1290 | { 1291 | "name": "stdout", 1292 | "output_type": "stream", 1293 | "text": [ 1294 | "\n", 1295 | "epoch:49 | loss:0.19, 0.45 | acc:0.94, 0.87 | lr:0.0010\n" 1296 | ] 1297 | }, 1298 | { 1299 | "data": { 1300 | "application/vnd.jupyter.widget-view+json": { 1301 | "model_id": "e1c7706999f34875bc6ef1de1b7ec718", 1302 | "version_major": 2, 1303 | "version_minor": 0 1304 | }, 1305 | "text/plain": [ 1306 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1307 | ] 1308 | }, 1309 | "metadata": {}, 1310 | "output_type": "display_data" 1311 | }, 1312 | { 1313 | "name": "stdout", 1314 | "output_type": "stream", 1315 | "text": [ 1316 | "\n", 1317 | "epoch:50 | loss:0.19, 0.45 | acc:0.94, 0.87 | lr:0.0010\n" 1318 | ] 1319 | }, 1320 | { 1321 | "data": { 1322 | "application/vnd.jupyter.widget-view+json": { 1323 | "model_id": "671ea7121858457cba8e04344a2ac77e", 1324 | "version_major": 2, 1325 | "version_minor": 0 1326 | }, 1327 | "text/plain": [ 1328 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1329 | ] 1330 | }, 1331 | "metadata": {}, 1332 | "output_type": "display_data" 1333 | }, 1334 | { 1335 | "name": "stdout", 1336 | "output_type": "stream", 1337 | "text": [ 1338 | "\n", 1339 | "epoch:51 | loss:0.18, 0.45 | acc:0.94, 0.87 | lr:0.0010\n" 1340 | ] 1341 | }, 1342 | { 1343 | "data": { 1344 | "application/vnd.jupyter.widget-view+json": { 1345 | "model_id": "bbb7635692f5446f9d18310f721aab2a", 1346 | "version_major": 2, 1347 | "version_minor": 0 1348 | }, 1349 | "text/plain": [ 1350 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1351 | ] 1352 | }, 1353 | "metadata": {}, 1354 | "output_type": "display_data" 1355 | }, 1356 | { 1357 | "name": "stdout", 1358 | "output_type": "stream", 1359 | "text": [ 1360 | "\n", 1361 | "epoch:52 | loss:0.18, 0.46 | acc:0.94, 0.87 | lr:0.0010\n" 1362 | ] 1363 | }, 1364 | { 1365 | "data": { 1366 | "application/vnd.jupyter.widget-view+json": { 1367 | "model_id": "100b9f36e75742c8ac773420c887fd84", 1368 | "version_major": 2, 1369 | "version_minor": 0 1370 | }, 1371 | "text/plain": [ 1372 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1373 | ] 1374 | }, 1375 | "metadata": {}, 1376 | "output_type": "display_data" 1377 | }, 1378 | { 1379 | "name": "stdout", 1380 | "output_type": "stream", 1381 | "text": [ 1382 | "\n", 1383 | "epoch:53 | loss:0.18, 0.44 | acc:0.94, 0.87 | lr:0.0010\n" 1384 | ] 1385 | }, 1386 | { 1387 | "data": { 1388 | "application/vnd.jupyter.widget-view+json": { 1389 | "model_id": "e66599cac1e24df29d0e4fee29c15841", 1390 | "version_major": 2, 1391 | "version_minor": 0 1392 | }, 1393 | "text/plain": [ 1394 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1395 | ] 1396 | }, 1397 | "metadata": {}, 1398 | "output_type": "display_data" 1399 | }, 1400 | { 1401 | "name": "stdout", 1402 | "output_type": "stream", 1403 | "text": [ 1404 | "\n", 1405 | "epoch:54 | loss:0.18, 0.45 | acc:0.94, 0.87 | lr:0.0010\n" 1406 | ] 1407 | }, 1408 | { 1409 | "data": { 1410 | "application/vnd.jupyter.widget-view+json": { 1411 | "model_id": "660ca7254415426880935af8718b4a3d", 1412 | "version_major": 2, 1413 | "version_minor": 0 1414 | }, 1415 | "text/plain": [ 1416 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1417 | ] 1418 | }, 1419 | "metadata": {}, 1420 | "output_type": "display_data" 1421 | }, 1422 | { 1423 | "name": "stdout", 1424 | "output_type": "stream", 1425 | "text": [ 1426 | "\n", 1427 | "epoch:55 | loss:0.18, 0.46 | acc:0.94, 0.87 | lr:0.0010\n" 1428 | ] 1429 | }, 1430 | { 1431 | "data": { 1432 | "application/vnd.jupyter.widget-view+json": { 1433 | "model_id": "5ba8ab82eecb48b59ce37585deff5ba7", 1434 | "version_major": 2, 1435 | "version_minor": 0 1436 | }, 1437 | "text/plain": [ 1438 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1439 | ] 1440 | }, 1441 | "metadata": {}, 1442 | "output_type": "display_data" 1443 | }, 1444 | { 1445 | "name": "stdout", 1446 | "output_type": "stream", 1447 | "text": [ 1448 | "\n", 1449 | "epoch:56 | loss:0.18, 0.45 | acc:0.94, 0.86 | lr:0.0010\n" 1450 | ] 1451 | }, 1452 | { 1453 | "data": { 1454 | "application/vnd.jupyter.widget-view+json": { 1455 | "model_id": "a5a4bc7324b64c048b6b0e8501ab4f79", 1456 | "version_major": 2, 1457 | "version_minor": 0 1458 | }, 1459 | "text/plain": [ 1460 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1461 | ] 1462 | }, 1463 | "metadata": {}, 1464 | "output_type": "display_data" 1465 | }, 1466 | { 1467 | "name": "stdout", 1468 | "output_type": "stream", 1469 | "text": [ 1470 | "\n", 1471 | "epoch:57 | loss:0.18, 0.45 | acc:0.94, 0.87 | lr:0.0010\n" 1472 | ] 1473 | }, 1474 | { 1475 | "data": { 1476 | "application/vnd.jupyter.widget-view+json": { 1477 | "model_id": "119b33e3d10244c38c70f1b9ad78b5fb", 1478 | "version_major": 2, 1479 | "version_minor": 0 1480 | }, 1481 | "text/plain": [ 1482 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1483 | ] 1484 | }, 1485 | "metadata": {}, 1486 | "output_type": "display_data" 1487 | }, 1488 | { 1489 | "name": "stdout", 1490 | "output_type": "stream", 1491 | "text": [ 1492 | "\n", 1493 | "epoch:58 | loss:0.17, 0.44 | acc:0.94, 0.87 | lr:0.0001\n" 1494 | ] 1495 | }, 1496 | { 1497 | "data": { 1498 | "application/vnd.jupyter.widget-view+json": { 1499 | "model_id": "f8928ab72887401584987526a77cd10b", 1500 | "version_major": 2, 1501 | "version_minor": 0 1502 | }, 1503 | "text/plain": [ 1504 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1505 | ] 1506 | }, 1507 | "metadata": {}, 1508 | "output_type": "display_data" 1509 | }, 1510 | { 1511 | "name": "stdout", 1512 | "output_type": "stream", 1513 | "text": [ 1514 | "\n", 1515 | "epoch:59 | loss:0.17, 0.44 | acc:0.94, 0.87 | lr:0.0001\n" 1516 | ] 1517 | }, 1518 | { 1519 | "data": { 1520 | "application/vnd.jupyter.widget-view+json": { 1521 | "model_id": "5d85af2fa50a4390810fda6828432d3a", 1522 | "version_major": 2, 1523 | "version_minor": 0 1524 | }, 1525 | "text/plain": [ 1526 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1527 | ] 1528 | }, 1529 | "metadata": {}, 1530 | "output_type": "display_data" 1531 | }, 1532 | { 1533 | "name": "stdout", 1534 | "output_type": "stream", 1535 | "text": [ 1536 | "\n", 1537 | "epoch:60 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0001\n" 1538 | ] 1539 | }, 1540 | { 1541 | "data": { 1542 | "application/vnd.jupyter.widget-view+json": { 1543 | "model_id": "b0df41633bd241bfab22d8e607725d68", 1544 | "version_major": 2, 1545 | "version_minor": 0 1546 | }, 1547 | "text/plain": [ 1548 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1549 | ] 1550 | }, 1551 | "metadata": {}, 1552 | "output_type": "display_data" 1553 | }, 1554 | { 1555 | "name": "stdout", 1556 | "output_type": "stream", 1557 | "text": [ 1558 | "\n", 1559 | "epoch:61 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0001\n" 1560 | ] 1561 | }, 1562 | { 1563 | "data": { 1564 | "application/vnd.jupyter.widget-view+json": { 1565 | "model_id": "01437c96a718459cb7b4dbe61645e877", 1566 | "version_major": 2, 1567 | "version_minor": 0 1568 | }, 1569 | "text/plain": [ 1570 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1571 | ] 1572 | }, 1573 | "metadata": {}, 1574 | "output_type": "display_data" 1575 | }, 1576 | { 1577 | "name": "stdout", 1578 | "output_type": "stream", 1579 | "text": [ 1580 | "\n", 1581 | "epoch:62 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0001\n" 1582 | ] 1583 | }, 1584 | { 1585 | "data": { 1586 | "application/vnd.jupyter.widget-view+json": { 1587 | "model_id": "110e901c40d04700b8c045d49e1635cf", 1588 | "version_major": 2, 1589 | "version_minor": 0 1590 | }, 1591 | "text/plain": [ 1592 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1593 | ] 1594 | }, 1595 | "metadata": {}, 1596 | "output_type": "display_data" 1597 | }, 1598 | { 1599 | "name": "stdout", 1600 | "output_type": "stream", 1601 | "text": [ 1602 | "\n", 1603 | "epoch:63 | loss:0.17, 0.45 | acc:0.94, 0.87 | lr:0.0001\n" 1604 | ] 1605 | }, 1606 | { 1607 | "data": { 1608 | "application/vnd.jupyter.widget-view+json": { 1609 | "model_id": "f1e790deffa14f4681bf5165eb969a22", 1610 | "version_major": 2, 1611 | "version_minor": 0 1612 | }, 1613 | "text/plain": [ 1614 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1615 | ] 1616 | }, 1617 | "metadata": {}, 1618 | "output_type": "display_data" 1619 | }, 1620 | { 1621 | "name": "stdout", 1622 | "output_type": "stream", 1623 | "text": [ 1624 | "\n", 1625 | "epoch:64 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0001\n" 1626 | ] 1627 | }, 1628 | { 1629 | "data": { 1630 | "application/vnd.jupyter.widget-view+json": { 1631 | "model_id": "2243ad8de5cc469a90e646af3e76ec25", 1632 | "version_major": 2, 1633 | "version_minor": 0 1634 | }, 1635 | "text/plain": [ 1636 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1637 | ] 1638 | }, 1639 | "metadata": {}, 1640 | "output_type": "display_data" 1641 | }, 1642 | { 1643 | "name": "stdout", 1644 | "output_type": "stream", 1645 | "text": [ 1646 | "\n", 1647 | "epoch:65 | loss:0.17, 0.45 | acc:0.94, 0.87 | lr:0.0001\n" 1648 | ] 1649 | }, 1650 | { 1651 | "data": { 1652 | "application/vnd.jupyter.widget-view+json": { 1653 | "model_id": "4b4af0864b744e19aeabb3e381aa0427", 1654 | "version_major": 2, 1655 | "version_minor": 0 1656 | }, 1657 | "text/plain": [ 1658 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1659 | ] 1660 | }, 1661 | "metadata": {}, 1662 | "output_type": "display_data" 1663 | }, 1664 | { 1665 | "name": "stdout", 1666 | "output_type": "stream", 1667 | "text": [ 1668 | "\n", 1669 | "epoch:66 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0001\n" 1670 | ] 1671 | }, 1672 | { 1673 | "data": { 1674 | "application/vnd.jupyter.widget-view+json": { 1675 | "model_id": "4f4de7e7946448d49a4f720e9160e837", 1676 | "version_major": 2, 1677 | "version_minor": 0 1678 | }, 1679 | "text/plain": [ 1680 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1681 | ] 1682 | }, 1683 | "metadata": {}, 1684 | "output_type": "display_data" 1685 | }, 1686 | { 1687 | "name": "stdout", 1688 | "output_type": "stream", 1689 | "text": [ 1690 | "\n", 1691 | "epoch:67 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0001\n" 1692 | ] 1693 | }, 1694 | { 1695 | "data": { 1696 | "application/vnd.jupyter.widget-view+json": { 1697 | "model_id": "30156d87fdf84ec98c7896388fcbb0f5", 1698 | "version_major": 2, 1699 | "version_minor": 0 1700 | }, 1701 | "text/plain": [ 1702 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1703 | ] 1704 | }, 1705 | "metadata": {}, 1706 | "output_type": "display_data" 1707 | }, 1708 | { 1709 | "name": "stdout", 1710 | "output_type": "stream", 1711 | "text": [ 1712 | "\n", 1713 | "epoch:68 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0001\n" 1714 | ] 1715 | }, 1716 | { 1717 | "data": { 1718 | "application/vnd.jupyter.widget-view+json": { 1719 | "model_id": "17f85ba4b5504d36a9596e578708ac0b", 1720 | "version_major": 2, 1721 | "version_minor": 0 1722 | }, 1723 | "text/plain": [ 1724 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1725 | ] 1726 | }, 1727 | "metadata": {}, 1728 | "output_type": "display_data" 1729 | }, 1730 | { 1731 | "name": "stdout", 1732 | "output_type": "stream", 1733 | "text": [ 1734 | "\n", 1735 | "epoch:69 | loss:0.17, 0.45 | acc:0.94, 0.87 | lr:0.0000\n" 1736 | ] 1737 | }, 1738 | { 1739 | "data": { 1740 | "application/vnd.jupyter.widget-view+json": { 1741 | "model_id": "3abd29f123ee49e2824a8c20cb30c895", 1742 | "version_major": 2, 1743 | "version_minor": 0 1744 | }, 1745 | "text/plain": [ 1746 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1747 | ] 1748 | }, 1749 | "metadata": {}, 1750 | "output_type": "display_data" 1751 | }, 1752 | { 1753 | "name": "stdout", 1754 | "output_type": "stream", 1755 | "text": [ 1756 | "\n", 1757 | "epoch:70 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 1758 | ] 1759 | }, 1760 | { 1761 | "data": { 1762 | "application/vnd.jupyter.widget-view+json": { 1763 | "model_id": "7f0c7dce69824bad827402b11dca427b", 1764 | "version_major": 2, 1765 | "version_minor": 0 1766 | }, 1767 | "text/plain": [ 1768 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1769 | ] 1770 | }, 1771 | "metadata": {}, 1772 | "output_type": "display_data" 1773 | }, 1774 | { 1775 | "name": "stdout", 1776 | "output_type": "stream", 1777 | "text": [ 1778 | "\n", 1779 | "epoch:71 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 1780 | ] 1781 | }, 1782 | { 1783 | "data": { 1784 | "application/vnd.jupyter.widget-view+json": { 1785 | "model_id": "0a955a6e63cd4df3b8360e9ec11a309e", 1786 | "version_major": 2, 1787 | "version_minor": 0 1788 | }, 1789 | "text/plain": [ 1790 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1791 | ] 1792 | }, 1793 | "metadata": {}, 1794 | "output_type": "display_data" 1795 | }, 1796 | { 1797 | "name": "stdout", 1798 | "output_type": "stream", 1799 | "text": [ 1800 | "\n", 1801 | "epoch:72 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 1802 | ] 1803 | }, 1804 | { 1805 | "data": { 1806 | "application/vnd.jupyter.widget-view+json": { 1807 | "model_id": "205c1b4965514f07943ce823ad03927c", 1808 | "version_major": 2, 1809 | "version_minor": 0 1810 | }, 1811 | "text/plain": [ 1812 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1813 | ] 1814 | }, 1815 | "metadata": {}, 1816 | "output_type": "display_data" 1817 | }, 1818 | { 1819 | "name": "stdout", 1820 | "output_type": "stream", 1821 | "text": [ 1822 | "\n", 1823 | "epoch:73 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 1824 | ] 1825 | }, 1826 | { 1827 | "data": { 1828 | "application/vnd.jupyter.widget-view+json": { 1829 | "model_id": "9d25335720fd4441a8994f71c6d5571e", 1830 | "version_major": 2, 1831 | "version_minor": 0 1832 | }, 1833 | "text/plain": [ 1834 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1835 | ] 1836 | }, 1837 | "metadata": {}, 1838 | "output_type": "display_data" 1839 | }, 1840 | { 1841 | "name": "stdout", 1842 | "output_type": "stream", 1843 | "text": [ 1844 | "\n", 1845 | "epoch:74 | loss:0.16, 0.47 | acc:0.95, 0.87 | lr:0.0000\n" 1846 | ] 1847 | }, 1848 | { 1849 | "data": { 1850 | "application/vnd.jupyter.widget-view+json": { 1851 | "model_id": "67a9fdc16f4c4761a58374253a493475", 1852 | "version_major": 2, 1853 | "version_minor": 0 1854 | }, 1855 | "text/plain": [ 1856 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1857 | ] 1858 | }, 1859 | "metadata": {}, 1860 | "output_type": "display_data" 1861 | }, 1862 | { 1863 | "name": "stdout", 1864 | "output_type": "stream", 1865 | "text": [ 1866 | "\n", 1867 | "epoch:75 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 1868 | ] 1869 | }, 1870 | { 1871 | "data": { 1872 | "application/vnd.jupyter.widget-view+json": { 1873 | "model_id": "43c4d24bf3d34a8ca35e6330b870641d", 1874 | "version_major": 2, 1875 | "version_minor": 0 1876 | }, 1877 | "text/plain": [ 1878 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1879 | ] 1880 | }, 1881 | "metadata": {}, 1882 | "output_type": "display_data" 1883 | }, 1884 | { 1885 | "name": "stdout", 1886 | "output_type": "stream", 1887 | "text": [ 1888 | "\n", 1889 | "epoch:76 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 1890 | ] 1891 | }, 1892 | { 1893 | "data": { 1894 | "application/vnd.jupyter.widget-view+json": { 1895 | "model_id": "f604dfbdfe6a4a3e937140557a963d96", 1896 | "version_major": 2, 1897 | "version_minor": 0 1898 | }, 1899 | "text/plain": [ 1900 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1901 | ] 1902 | }, 1903 | "metadata": {}, 1904 | "output_type": "display_data" 1905 | }, 1906 | { 1907 | "name": "stdout", 1908 | "output_type": "stream", 1909 | "text": [ 1910 | "\n", 1911 | "epoch:77 | loss:0.17, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 1912 | ] 1913 | }, 1914 | { 1915 | "data": { 1916 | "application/vnd.jupyter.widget-view+json": { 1917 | "model_id": "cef19b2401fe43bea2d03adfef80009a", 1918 | "version_major": 2, 1919 | "version_minor": 0 1920 | }, 1921 | "text/plain": [ 1922 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1923 | ] 1924 | }, 1925 | "metadata": {}, 1926 | "output_type": "display_data" 1927 | }, 1928 | { 1929 | "name": "stdout", 1930 | "output_type": "stream", 1931 | "text": [ 1932 | "\n", 1933 | "epoch:78 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 1934 | ] 1935 | }, 1936 | { 1937 | "data": { 1938 | "application/vnd.jupyter.widget-view+json": { 1939 | "model_id": "0659a75115294ff1bdac40db80fe0fe9", 1940 | "version_major": 2, 1941 | "version_minor": 0 1942 | }, 1943 | "text/plain": [ 1944 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1945 | ] 1946 | }, 1947 | "metadata": {}, 1948 | "output_type": "display_data" 1949 | }, 1950 | { 1951 | "name": "stdout", 1952 | "output_type": "stream", 1953 | "text": [ 1954 | "\n", 1955 | "epoch:79 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 1956 | ] 1957 | }, 1958 | { 1959 | "data": { 1960 | "application/vnd.jupyter.widget-view+json": { 1961 | "model_id": "ec18d14c9ca74288be866e3b32eaed85", 1962 | "version_major": 2, 1963 | "version_minor": 0 1964 | }, 1965 | "text/plain": [ 1966 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1967 | ] 1968 | }, 1969 | "metadata": {}, 1970 | "output_type": "display_data" 1971 | }, 1972 | { 1973 | "name": "stdout", 1974 | "output_type": "stream", 1975 | "text": [ 1976 | "\n", 1977 | "epoch:80 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 1978 | ] 1979 | }, 1980 | { 1981 | "data": { 1982 | "application/vnd.jupyter.widget-view+json": { 1983 | "model_id": "0c1ed573b87a4d3da1329531a7f06164", 1984 | "version_major": 2, 1985 | "version_minor": 0 1986 | }, 1987 | "text/plain": [ 1988 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 1989 | ] 1990 | }, 1991 | "metadata": {}, 1992 | "output_type": "display_data" 1993 | }, 1994 | { 1995 | "name": "stdout", 1996 | "output_type": "stream", 1997 | "text": [ 1998 | "\n", 1999 | "epoch:81 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2000 | ] 2001 | }, 2002 | { 2003 | "data": { 2004 | "application/vnd.jupyter.widget-view+json": { 2005 | "model_id": "8ab93df9e5da4ba3ae1452c93f6c17dc", 2006 | "version_major": 2, 2007 | "version_minor": 0 2008 | }, 2009 | "text/plain": [ 2010 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2011 | ] 2012 | }, 2013 | "metadata": {}, 2014 | "output_type": "display_data" 2015 | }, 2016 | { 2017 | "name": "stdout", 2018 | "output_type": "stream", 2019 | "text": [ 2020 | "\n", 2021 | "epoch:82 | loss:0.16, 0.46 | acc:0.94, 0.87 | lr:0.0000\n" 2022 | ] 2023 | }, 2024 | { 2025 | "data": { 2026 | "application/vnd.jupyter.widget-view+json": { 2027 | "model_id": "e4b220ced4d0455a9b62e134f28d9d0a", 2028 | "version_major": 2, 2029 | "version_minor": 0 2030 | }, 2031 | "text/plain": [ 2032 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2033 | ] 2034 | }, 2035 | "metadata": {}, 2036 | "output_type": "display_data" 2037 | }, 2038 | { 2039 | "name": "stdout", 2040 | "output_type": "stream", 2041 | "text": [ 2042 | "\n", 2043 | "epoch:83 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2044 | ] 2045 | }, 2046 | { 2047 | "data": { 2048 | "application/vnd.jupyter.widget-view+json": { 2049 | "model_id": "942b529ef24a426cabfa6b8c5c0e2054", 2050 | "version_major": 2, 2051 | "version_minor": 0 2052 | }, 2053 | "text/plain": [ 2054 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2055 | ] 2056 | }, 2057 | "metadata": {}, 2058 | "output_type": "display_data" 2059 | }, 2060 | { 2061 | "name": "stdout", 2062 | "output_type": "stream", 2063 | "text": [ 2064 | "\n", 2065 | "epoch:84 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2066 | ] 2067 | }, 2068 | { 2069 | "data": { 2070 | "application/vnd.jupyter.widget-view+json": { 2071 | "model_id": "f3a500a2796443a6b334c3679c9b606d", 2072 | "version_major": 2, 2073 | "version_minor": 0 2074 | }, 2075 | "text/plain": [ 2076 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2077 | ] 2078 | }, 2079 | "metadata": {}, 2080 | "output_type": "display_data" 2081 | }, 2082 | { 2083 | "name": "stdout", 2084 | "output_type": "stream", 2085 | "text": [ 2086 | "\n", 2087 | "epoch:85 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2088 | ] 2089 | }, 2090 | { 2091 | "data": { 2092 | "application/vnd.jupyter.widget-view+json": { 2093 | "model_id": "5402ac4d1e764c01b08133e9a4ceb45c", 2094 | "version_major": 2, 2095 | "version_minor": 0 2096 | }, 2097 | "text/plain": [ 2098 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2099 | ] 2100 | }, 2101 | "metadata": {}, 2102 | "output_type": "display_data" 2103 | }, 2104 | { 2105 | "name": "stdout", 2106 | "output_type": "stream", 2107 | "text": [ 2108 | "\n", 2109 | "epoch:86 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2110 | ] 2111 | }, 2112 | { 2113 | "data": { 2114 | "application/vnd.jupyter.widget-view+json": { 2115 | "model_id": "5841d3c65f2140d1ae24ed74a960032f", 2116 | "version_major": 2, 2117 | "version_minor": 0 2118 | }, 2119 | "text/plain": [ 2120 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2121 | ] 2122 | }, 2123 | "metadata": {}, 2124 | "output_type": "display_data" 2125 | }, 2126 | { 2127 | "name": "stdout", 2128 | "output_type": "stream", 2129 | "text": [ 2130 | "\n", 2131 | "epoch:87 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2132 | ] 2133 | }, 2134 | { 2135 | "data": { 2136 | "application/vnd.jupyter.widget-view+json": { 2137 | "model_id": "88a4c331c3334c44a0bff96e91e6f4f5", 2138 | "version_major": 2, 2139 | "version_minor": 0 2140 | }, 2141 | "text/plain": [ 2142 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2143 | ] 2144 | }, 2145 | "metadata": {}, 2146 | "output_type": "display_data" 2147 | }, 2148 | { 2149 | "name": "stdout", 2150 | "output_type": "stream", 2151 | "text": [ 2152 | "\n", 2153 | "epoch:88 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2154 | ] 2155 | }, 2156 | { 2157 | "data": { 2158 | "application/vnd.jupyter.widget-view+json": { 2159 | "model_id": "d4384b2d85874b05976144f431650a80", 2160 | "version_major": 2, 2161 | "version_minor": 0 2162 | }, 2163 | "text/plain": [ 2164 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2165 | ] 2166 | }, 2167 | "metadata": {}, 2168 | "output_type": "display_data" 2169 | }, 2170 | { 2171 | "name": "stdout", 2172 | "output_type": "stream", 2173 | "text": [ 2174 | "\n", 2175 | "epoch:89 | loss:0.17, 0.46 | acc:0.94, 0.87 | lr:0.0000\n" 2176 | ] 2177 | }, 2178 | { 2179 | "data": { 2180 | "application/vnd.jupyter.widget-view+json": { 2181 | "model_id": "f87a96578571474db3c471bcebf6c874", 2182 | "version_major": 2, 2183 | "version_minor": 0 2184 | }, 2185 | "text/plain": [ 2186 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2187 | ] 2188 | }, 2189 | "metadata": {}, 2190 | "output_type": "display_data" 2191 | }, 2192 | { 2193 | "name": "stdout", 2194 | "output_type": "stream", 2195 | "text": [ 2196 | "\n", 2197 | "epoch:90 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2198 | ] 2199 | }, 2200 | { 2201 | "data": { 2202 | "application/vnd.jupyter.widget-view+json": { 2203 | "model_id": "929e2273f6dd4924b13ad55d3b2768b2", 2204 | "version_major": 2, 2205 | "version_minor": 0 2206 | }, 2207 | "text/plain": [ 2208 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2209 | ] 2210 | }, 2211 | "metadata": {}, 2212 | "output_type": "display_data" 2213 | }, 2214 | { 2215 | "name": "stdout", 2216 | "output_type": "stream", 2217 | "text": [ 2218 | "\n", 2219 | "epoch:91 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2220 | ] 2221 | }, 2222 | { 2223 | "data": { 2224 | "application/vnd.jupyter.widget-view+json": { 2225 | "model_id": "e5f6abd2c96c4611811a6b87b45a51e1", 2226 | "version_major": 2, 2227 | "version_minor": 0 2228 | }, 2229 | "text/plain": [ 2230 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2231 | ] 2232 | }, 2233 | "metadata": {}, 2234 | "output_type": "display_data" 2235 | }, 2236 | { 2237 | "name": "stdout", 2238 | "output_type": "stream", 2239 | "text": [ 2240 | "\n", 2241 | "epoch:92 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 2242 | ] 2243 | }, 2244 | { 2245 | "data": { 2246 | "application/vnd.jupyter.widget-view+json": { 2247 | "model_id": "a457d9ac307743c0b32f6693aa39e8f0", 2248 | "version_major": 2, 2249 | "version_minor": 0 2250 | }, 2251 | "text/plain": [ 2252 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2253 | ] 2254 | }, 2255 | "metadata": {}, 2256 | "output_type": "display_data" 2257 | }, 2258 | { 2259 | "name": "stdout", 2260 | "output_type": "stream", 2261 | "text": [ 2262 | "\n", 2263 | "epoch:93 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2264 | ] 2265 | }, 2266 | { 2267 | "data": { 2268 | "application/vnd.jupyter.widget-view+json": { 2269 | "model_id": "6d498ab3a1d4446798128727a787c062", 2270 | "version_major": 2, 2271 | "version_minor": 0 2272 | }, 2273 | "text/plain": [ 2274 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2275 | ] 2276 | }, 2277 | "metadata": {}, 2278 | "output_type": "display_data" 2279 | }, 2280 | { 2281 | "name": "stdout", 2282 | "output_type": "stream", 2283 | "text": [ 2284 | "\n", 2285 | "epoch:94 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2286 | ] 2287 | }, 2288 | { 2289 | "data": { 2290 | "application/vnd.jupyter.widget-view+json": { 2291 | "model_id": "5ac9bf1bd47744cf8688df607a798adf", 2292 | "version_major": 2, 2293 | "version_minor": 0 2294 | }, 2295 | "text/plain": [ 2296 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2297 | ] 2298 | }, 2299 | "metadata": {}, 2300 | "output_type": "display_data" 2301 | }, 2302 | { 2303 | "name": "stdout", 2304 | "output_type": "stream", 2305 | "text": [ 2306 | "\n", 2307 | "epoch:95 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2308 | ] 2309 | }, 2310 | { 2311 | "data": { 2312 | "application/vnd.jupyter.widget-view+json": { 2313 | "model_id": "28b19f05f32449b5aeacf48d9ff3caf1", 2314 | "version_major": 2, 2315 | "version_minor": 0 2316 | }, 2317 | "text/plain": [ 2318 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2319 | ] 2320 | }, 2321 | "metadata": {}, 2322 | "output_type": "display_data" 2323 | }, 2324 | { 2325 | "name": "stdout", 2326 | "output_type": "stream", 2327 | "text": [ 2328 | "\n", 2329 | "epoch:96 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2330 | ] 2331 | }, 2332 | { 2333 | "data": { 2334 | "application/vnd.jupyter.widget-view+json": { 2335 | "model_id": "e9d3be5f12f444adb9f758cb56d31f0b", 2336 | "version_major": 2, 2337 | "version_minor": 0 2338 | }, 2339 | "text/plain": [ 2340 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2341 | ] 2342 | }, 2343 | "metadata": {}, 2344 | "output_type": "display_data" 2345 | }, 2346 | { 2347 | "name": "stdout", 2348 | "output_type": "stream", 2349 | "text": [ 2350 | "\n", 2351 | "epoch:97 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2352 | ] 2353 | }, 2354 | { 2355 | "data": { 2356 | "application/vnd.jupyter.widget-view+json": { 2357 | "model_id": "0dfdd92c568d49febe238c47bf0f2498", 2358 | "version_major": 2, 2359 | "version_minor": 0 2360 | }, 2361 | "text/plain": [ 2362 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2363 | ] 2364 | }, 2365 | "metadata": {}, 2366 | "output_type": "display_data" 2367 | }, 2368 | { 2369 | "name": "stdout", 2370 | "output_type": "stream", 2371 | "text": [ 2372 | "\n", 2373 | "epoch:98 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2374 | ] 2375 | }, 2376 | { 2377 | "data": { 2378 | "application/vnd.jupyter.widget-view+json": { 2379 | "model_id": "1d9f24877226419f8531f0ad55baae1a", 2380 | "version_major": 2, 2381 | "version_minor": 0 2382 | }, 2383 | "text/plain": [ 2384 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2385 | ] 2386 | }, 2387 | "metadata": {}, 2388 | "output_type": "display_data" 2389 | }, 2390 | { 2391 | "name": "stdout", 2392 | "output_type": "stream", 2393 | "text": [ 2394 | "\n", 2395 | "epoch:99 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2396 | ] 2397 | }, 2398 | { 2399 | "data": { 2400 | "application/vnd.jupyter.widget-view+json": { 2401 | "model_id": "a3b0113a81e642d490c9896e49c4b251", 2402 | "version_major": 2, 2403 | "version_minor": 0 2404 | }, 2405 | "text/plain": [ 2406 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2407 | ] 2408 | }, 2409 | "metadata": {}, 2410 | "output_type": "display_data" 2411 | }, 2412 | { 2413 | "name": "stdout", 2414 | "output_type": "stream", 2415 | "text": [ 2416 | "\n", 2417 | "epoch:100 | loss:0.16, 0.47 | acc:0.95, 0.87 | lr:0.0000\n" 2418 | ] 2419 | }, 2420 | { 2421 | "data": { 2422 | "application/vnd.jupyter.widget-view+json": { 2423 | "model_id": "ff62a21d68ab42348e8f12e5ba90cb42", 2424 | "version_major": 2, 2425 | "version_minor": 0 2426 | }, 2427 | "text/plain": [ 2428 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2429 | ] 2430 | }, 2431 | "metadata": {}, 2432 | "output_type": "display_data" 2433 | }, 2434 | { 2435 | "name": "stdout", 2436 | "output_type": "stream", 2437 | "text": [ 2438 | "\n", 2439 | "epoch:101 | loss:0.17, 0.45 | acc:0.94, 0.87 | lr:0.0000\n" 2440 | ] 2441 | }, 2442 | { 2443 | "data": { 2444 | "application/vnd.jupyter.widget-view+json": { 2445 | "model_id": "ca0702c03c60466dbdecfb532f65e2ec", 2446 | "version_major": 2, 2447 | "version_minor": 0 2448 | }, 2449 | "text/plain": [ 2450 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2451 | ] 2452 | }, 2453 | "metadata": {}, 2454 | "output_type": "display_data" 2455 | }, 2456 | { 2457 | "name": "stdout", 2458 | "output_type": "stream", 2459 | "text": [ 2460 | "\n", 2461 | "epoch:102 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2462 | ] 2463 | }, 2464 | { 2465 | "data": { 2466 | "application/vnd.jupyter.widget-view+json": { 2467 | "model_id": "62490d87fbd249c98a2334899513b538", 2468 | "version_major": 2, 2469 | "version_minor": 0 2470 | }, 2471 | "text/plain": [ 2472 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2473 | ] 2474 | }, 2475 | "metadata": {}, 2476 | "output_type": "display_data" 2477 | }, 2478 | { 2479 | "name": "stdout", 2480 | "output_type": "stream", 2481 | "text": [ 2482 | "\n", 2483 | "epoch:103 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 2484 | ] 2485 | }, 2486 | { 2487 | "data": { 2488 | "application/vnd.jupyter.widget-view+json": { 2489 | "model_id": "1290d613f66a49e988ec739cb8d0d714", 2490 | "version_major": 2, 2491 | "version_minor": 0 2492 | }, 2493 | "text/plain": [ 2494 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2495 | ] 2496 | }, 2497 | "metadata": {}, 2498 | "output_type": "display_data" 2499 | }, 2500 | { 2501 | "name": "stdout", 2502 | "output_type": "stream", 2503 | "text": [ 2504 | "\n", 2505 | "epoch:104 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 2506 | ] 2507 | }, 2508 | { 2509 | "data": { 2510 | "application/vnd.jupyter.widget-view+json": { 2511 | "model_id": "f976fa21b87f4158a133254b2e5b4cf4", 2512 | "version_major": 2, 2513 | "version_minor": 0 2514 | }, 2515 | "text/plain": [ 2516 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2517 | ] 2518 | }, 2519 | "metadata": {}, 2520 | "output_type": "display_data" 2521 | }, 2522 | { 2523 | "name": "stdout", 2524 | "output_type": "stream", 2525 | "text": [ 2526 | "\n", 2527 | "epoch:105 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 2528 | ] 2529 | }, 2530 | { 2531 | "data": { 2532 | "application/vnd.jupyter.widget-view+json": { 2533 | "model_id": "0a710c61e5424118bafa4d14b32a29a0", 2534 | "version_major": 2, 2535 | "version_minor": 0 2536 | }, 2537 | "text/plain": [ 2538 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2539 | ] 2540 | }, 2541 | "metadata": {}, 2542 | "output_type": "display_data" 2543 | }, 2544 | { 2545 | "name": "stdout", 2546 | "output_type": "stream", 2547 | "text": [ 2548 | "\n", 2549 | "epoch:106 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2550 | ] 2551 | }, 2552 | { 2553 | "data": { 2554 | "application/vnd.jupyter.widget-view+json": { 2555 | "model_id": "b384a86776bf4895b1444f6412b25d19", 2556 | "version_major": 2, 2557 | "version_minor": 0 2558 | }, 2559 | "text/plain": [ 2560 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2561 | ] 2562 | }, 2563 | "metadata": {}, 2564 | "output_type": "display_data" 2565 | }, 2566 | { 2567 | "name": "stdout", 2568 | "output_type": "stream", 2569 | "text": [ 2570 | "\n", 2571 | "epoch:107 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2572 | ] 2573 | }, 2574 | { 2575 | "data": { 2576 | "application/vnd.jupyter.widget-view+json": { 2577 | "model_id": "4fcd315ea11a419786681649ad1d41db", 2578 | "version_major": 2, 2579 | "version_minor": 0 2580 | }, 2581 | "text/plain": [ 2582 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2583 | ] 2584 | }, 2585 | "metadata": {}, 2586 | "output_type": "display_data" 2587 | }, 2588 | { 2589 | "name": "stdout", 2590 | "output_type": "stream", 2591 | "text": [ 2592 | "\n", 2593 | "epoch:108 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2594 | ] 2595 | }, 2596 | { 2597 | "data": { 2598 | "application/vnd.jupyter.widget-view+json": { 2599 | "model_id": "ee0f1d0aec6144d0935566b11cb18d6c", 2600 | "version_major": 2, 2601 | "version_minor": 0 2602 | }, 2603 | "text/plain": [ 2604 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2605 | ] 2606 | }, 2607 | "metadata": {}, 2608 | "output_type": "display_data" 2609 | }, 2610 | { 2611 | "name": "stdout", 2612 | "output_type": "stream", 2613 | "text": [ 2614 | "\n", 2615 | "epoch:109 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2616 | ] 2617 | }, 2618 | { 2619 | "data": { 2620 | "application/vnd.jupyter.widget-view+json": { 2621 | "model_id": "674791f1fbb545cd87536ba6e7db15c5", 2622 | "version_major": 2, 2623 | "version_minor": 0 2624 | }, 2625 | "text/plain": [ 2626 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2627 | ] 2628 | }, 2629 | "metadata": {}, 2630 | "output_type": "display_data" 2631 | }, 2632 | { 2633 | "name": "stdout", 2634 | "output_type": "stream", 2635 | "text": [ 2636 | "\n", 2637 | "epoch:110 | loss:0.16, 0.45 | acc:0.95, 0.88 | lr:0.0000\n" 2638 | ] 2639 | }, 2640 | { 2641 | "data": { 2642 | "application/vnd.jupyter.widget-view+json": { 2643 | "model_id": "9653ad9bafae4eaf9e22a17f35938d44", 2644 | "version_major": 2, 2645 | "version_minor": 0 2646 | }, 2647 | "text/plain": [ 2648 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2649 | ] 2650 | }, 2651 | "metadata": {}, 2652 | "output_type": "display_data" 2653 | }, 2654 | { 2655 | "name": "stdout", 2656 | "output_type": "stream", 2657 | "text": [ 2658 | "\n", 2659 | "epoch:111 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2660 | ] 2661 | }, 2662 | { 2663 | "data": { 2664 | "application/vnd.jupyter.widget-view+json": { 2665 | "model_id": "0060efa8aaea4bcd87625c3977347de7", 2666 | "version_major": 2, 2667 | "version_minor": 0 2668 | }, 2669 | "text/plain": [ 2670 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2671 | ] 2672 | }, 2673 | "metadata": {}, 2674 | "output_type": "display_data" 2675 | }, 2676 | { 2677 | "name": "stdout", 2678 | "output_type": "stream", 2679 | "text": [ 2680 | "\n", 2681 | "epoch:112 | loss:0.17, 0.45 | acc:0.94, 0.87 | lr:0.0000\n" 2682 | ] 2683 | }, 2684 | { 2685 | "data": { 2686 | "application/vnd.jupyter.widget-view+json": { 2687 | "model_id": "27801180e27b4462949bffd078703deb", 2688 | "version_major": 2, 2689 | "version_minor": 0 2690 | }, 2691 | "text/plain": [ 2692 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2693 | ] 2694 | }, 2695 | "metadata": {}, 2696 | "output_type": "display_data" 2697 | }, 2698 | { 2699 | "name": "stdout", 2700 | "output_type": "stream", 2701 | "text": [ 2702 | "\n", 2703 | "epoch:113 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2704 | ] 2705 | }, 2706 | { 2707 | "data": { 2708 | "application/vnd.jupyter.widget-view+json": { 2709 | "model_id": "5d10dc113eae4c338223a79d5987d461", 2710 | "version_major": 2, 2711 | "version_minor": 0 2712 | }, 2713 | "text/plain": [ 2714 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2715 | ] 2716 | }, 2717 | "metadata": {}, 2718 | "output_type": "display_data" 2719 | }, 2720 | { 2721 | "name": "stdout", 2722 | "output_type": "stream", 2723 | "text": [ 2724 | "\n", 2725 | "epoch:114 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2726 | ] 2727 | }, 2728 | { 2729 | "data": { 2730 | "application/vnd.jupyter.widget-view+json": { 2731 | "model_id": "40de1f82b3b546749a3442b4b591cb30", 2732 | "version_major": 2, 2733 | "version_minor": 0 2734 | }, 2735 | "text/plain": [ 2736 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2737 | ] 2738 | }, 2739 | "metadata": {}, 2740 | "output_type": "display_data" 2741 | }, 2742 | { 2743 | "name": "stdout", 2744 | "output_type": "stream", 2745 | "text": [ 2746 | "\n", 2747 | "epoch:115 | loss:0.16, 0.45 | acc:0.95, 0.88 | lr:0.0000\n" 2748 | ] 2749 | }, 2750 | { 2751 | "data": { 2752 | "application/vnd.jupyter.widget-view+json": { 2753 | "model_id": "d123fa1b56794ea995cf9dd0a62b9a6a", 2754 | "version_major": 2, 2755 | "version_minor": 0 2756 | }, 2757 | "text/plain": [ 2758 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2759 | ] 2760 | }, 2761 | "metadata": {}, 2762 | "output_type": "display_data" 2763 | }, 2764 | { 2765 | "name": "stdout", 2766 | "output_type": "stream", 2767 | "text": [ 2768 | "\n", 2769 | "epoch:116 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2770 | ] 2771 | }, 2772 | { 2773 | "data": { 2774 | "application/vnd.jupyter.widget-view+json": { 2775 | "model_id": "12edc2e2edf24c65b8285eb520397db7", 2776 | "version_major": 2, 2777 | "version_minor": 0 2778 | }, 2779 | "text/plain": [ 2780 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2781 | ] 2782 | }, 2783 | "metadata": {}, 2784 | "output_type": "display_data" 2785 | }, 2786 | { 2787 | "name": "stdout", 2788 | "output_type": "stream", 2789 | "text": [ 2790 | "\n", 2791 | "epoch:117 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2792 | ] 2793 | }, 2794 | { 2795 | "data": { 2796 | "application/vnd.jupyter.widget-view+json": { 2797 | "model_id": "8d3535ee494f454a96c4fe9c25269355", 2798 | "version_major": 2, 2799 | "version_minor": 0 2800 | }, 2801 | "text/plain": [ 2802 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2803 | ] 2804 | }, 2805 | "metadata": {}, 2806 | "output_type": "display_data" 2807 | }, 2808 | { 2809 | "name": "stdout", 2810 | "output_type": "stream", 2811 | "text": [ 2812 | "\n", 2813 | "epoch:118 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 2814 | ] 2815 | }, 2816 | { 2817 | "data": { 2818 | "application/vnd.jupyter.widget-view+json": { 2819 | "model_id": "609ee33f3cb042d1909dde1c86b1cad4", 2820 | "version_major": 2, 2821 | "version_minor": 0 2822 | }, 2823 | "text/plain": [ 2824 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2825 | ] 2826 | }, 2827 | "metadata": {}, 2828 | "output_type": "display_data" 2829 | }, 2830 | { 2831 | "name": "stdout", 2832 | "output_type": "stream", 2833 | "text": [ 2834 | "\n", 2835 | "epoch:119 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2836 | ] 2837 | }, 2838 | { 2839 | "data": { 2840 | "application/vnd.jupyter.widget-view+json": { 2841 | "model_id": "07ef1cd869a94022932f02ed3921fe21", 2842 | "version_major": 2, 2843 | "version_minor": 0 2844 | }, 2845 | "text/plain": [ 2846 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2847 | ] 2848 | }, 2849 | "metadata": {}, 2850 | "output_type": "display_data" 2851 | }, 2852 | { 2853 | "name": "stdout", 2854 | "output_type": "stream", 2855 | "text": [ 2856 | "\n", 2857 | "epoch:120 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 2858 | ] 2859 | }, 2860 | { 2861 | "data": { 2862 | "application/vnd.jupyter.widget-view+json": { 2863 | "model_id": "d1129061be0442818d714aee3cf0d85f", 2864 | "version_major": 2, 2865 | "version_minor": 0 2866 | }, 2867 | "text/plain": [ 2868 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2869 | ] 2870 | }, 2871 | "metadata": {}, 2872 | "output_type": "display_data" 2873 | }, 2874 | { 2875 | "name": "stdout", 2876 | "output_type": "stream", 2877 | "text": [ 2878 | "\n", 2879 | "epoch:121 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2880 | ] 2881 | }, 2882 | { 2883 | "data": { 2884 | "application/vnd.jupyter.widget-view+json": { 2885 | "model_id": "66670e41a46d485d838ba410448d2362", 2886 | "version_major": 2, 2887 | "version_minor": 0 2888 | }, 2889 | "text/plain": [ 2890 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2891 | ] 2892 | }, 2893 | "metadata": {}, 2894 | "output_type": "display_data" 2895 | }, 2896 | { 2897 | "name": "stdout", 2898 | "output_type": "stream", 2899 | "text": [ 2900 | "\n", 2901 | "epoch:122 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 2902 | ] 2903 | }, 2904 | { 2905 | "data": { 2906 | "application/vnd.jupyter.widget-view+json": { 2907 | "model_id": "273fb8da4e054b1e8b31e4b869a8a2b3", 2908 | "version_major": 2, 2909 | "version_minor": 0 2910 | }, 2911 | "text/plain": [ 2912 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2913 | ] 2914 | }, 2915 | "metadata": {}, 2916 | "output_type": "display_data" 2917 | }, 2918 | { 2919 | "name": "stdout", 2920 | "output_type": "stream", 2921 | "text": [ 2922 | "\n", 2923 | "epoch:123 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 2924 | ] 2925 | }, 2926 | { 2927 | "data": { 2928 | "application/vnd.jupyter.widget-view+json": { 2929 | "model_id": "10b41c5d090b47c6b8a2e9549b2878ed", 2930 | "version_major": 2, 2931 | "version_minor": 0 2932 | }, 2933 | "text/plain": [ 2934 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2935 | ] 2936 | }, 2937 | "metadata": {}, 2938 | "output_type": "display_data" 2939 | }, 2940 | { 2941 | "name": "stdout", 2942 | "output_type": "stream", 2943 | "text": [ 2944 | "\n", 2945 | "epoch:124 | loss:0.16, 0.47 | acc:0.95, 0.87 | lr:0.0000\n" 2946 | ] 2947 | }, 2948 | { 2949 | "data": { 2950 | "application/vnd.jupyter.widget-view+json": { 2951 | "model_id": "47271dd5893c419e8b94a8972f9a290e", 2952 | "version_major": 2, 2953 | "version_minor": 0 2954 | }, 2955 | "text/plain": [ 2956 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2957 | ] 2958 | }, 2959 | "metadata": {}, 2960 | "output_type": "display_data" 2961 | }, 2962 | { 2963 | "name": "stdout", 2964 | "output_type": "stream", 2965 | "text": [ 2966 | "\n", 2967 | "epoch:125 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2968 | ] 2969 | }, 2970 | { 2971 | "data": { 2972 | "application/vnd.jupyter.widget-view+json": { 2973 | "model_id": "eb88cee118f44e74a4a7e7972db14c26", 2974 | "version_major": 2, 2975 | "version_minor": 0 2976 | }, 2977 | "text/plain": [ 2978 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 2979 | ] 2980 | }, 2981 | "metadata": {}, 2982 | "output_type": "display_data" 2983 | }, 2984 | { 2985 | "name": "stdout", 2986 | "output_type": "stream", 2987 | "text": [ 2988 | "\n", 2989 | "epoch:126 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 2990 | ] 2991 | }, 2992 | { 2993 | "data": { 2994 | "application/vnd.jupyter.widget-view+json": { 2995 | "model_id": "382dfd017b2f427a9054a004155b1b11", 2996 | "version_major": 2, 2997 | "version_minor": 0 2998 | }, 2999 | "text/plain": [ 3000 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3001 | ] 3002 | }, 3003 | "metadata": {}, 3004 | "output_type": "display_data" 3005 | }, 3006 | { 3007 | "name": "stdout", 3008 | "output_type": "stream", 3009 | "text": [ 3010 | "\n", 3011 | "epoch:127 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3012 | ] 3013 | }, 3014 | { 3015 | "data": { 3016 | "application/vnd.jupyter.widget-view+json": { 3017 | "model_id": "b00cac569cc646a987dcdc648a1f0126", 3018 | "version_major": 2, 3019 | "version_minor": 0 3020 | }, 3021 | "text/plain": [ 3022 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3023 | ] 3024 | }, 3025 | "metadata": {}, 3026 | "output_type": "display_data" 3027 | }, 3028 | { 3029 | "name": "stdout", 3030 | "output_type": "stream", 3031 | "text": [ 3032 | "\n", 3033 | "epoch:128 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3034 | ] 3035 | }, 3036 | { 3037 | "data": { 3038 | "application/vnd.jupyter.widget-view+json": { 3039 | "model_id": "f65e8f8681414ce1ac09eae9a2d9b71a", 3040 | "version_major": 2, 3041 | "version_minor": 0 3042 | }, 3043 | "text/plain": [ 3044 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3045 | ] 3046 | }, 3047 | "metadata": {}, 3048 | "output_type": "display_data" 3049 | }, 3050 | { 3051 | "name": "stdout", 3052 | "output_type": "stream", 3053 | "text": [ 3054 | "\n", 3055 | "epoch:129 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3056 | ] 3057 | }, 3058 | { 3059 | "data": { 3060 | "application/vnd.jupyter.widget-view+json": { 3061 | "model_id": "caf24e74e8614e8a9cd1fb1a2cc8caed", 3062 | "version_major": 2, 3063 | "version_minor": 0 3064 | }, 3065 | "text/plain": [ 3066 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3067 | ] 3068 | }, 3069 | "metadata": {}, 3070 | "output_type": "display_data" 3071 | }, 3072 | { 3073 | "name": "stdout", 3074 | "output_type": "stream", 3075 | "text": [ 3076 | "\n", 3077 | "epoch:130 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3078 | ] 3079 | }, 3080 | { 3081 | "data": { 3082 | "application/vnd.jupyter.widget-view+json": { 3083 | "model_id": "34a1dd85453f426f96c4d7660e3108b4", 3084 | "version_major": 2, 3085 | "version_minor": 0 3086 | }, 3087 | "text/plain": [ 3088 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3089 | ] 3090 | }, 3091 | "metadata": {}, 3092 | "output_type": "display_data" 3093 | }, 3094 | { 3095 | "name": "stdout", 3096 | "output_type": "stream", 3097 | "text": [ 3098 | "\n", 3099 | "epoch:131 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3100 | ] 3101 | }, 3102 | { 3103 | "data": { 3104 | "application/vnd.jupyter.widget-view+json": { 3105 | "model_id": "58cf07d4d96f446d9a031a5980209a3a", 3106 | "version_major": 2, 3107 | "version_minor": 0 3108 | }, 3109 | "text/plain": [ 3110 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3111 | ] 3112 | }, 3113 | "metadata": {}, 3114 | "output_type": "display_data" 3115 | }, 3116 | { 3117 | "name": "stdout", 3118 | "output_type": "stream", 3119 | "text": [ 3120 | "\n", 3121 | "epoch:132 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 3122 | ] 3123 | }, 3124 | { 3125 | "data": { 3126 | "application/vnd.jupyter.widget-view+json": { 3127 | "model_id": "a846b32fc0814d31a06357e190da0619", 3128 | "version_major": 2, 3129 | "version_minor": 0 3130 | }, 3131 | "text/plain": [ 3132 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3133 | ] 3134 | }, 3135 | "metadata": {}, 3136 | "output_type": "display_data" 3137 | }, 3138 | { 3139 | "name": "stdout", 3140 | "output_type": "stream", 3141 | "text": [ 3142 | "\n", 3143 | "epoch:133 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3144 | ] 3145 | }, 3146 | { 3147 | "data": { 3148 | "application/vnd.jupyter.widget-view+json": { 3149 | "model_id": "2442ed6539d8401791614b00c031ac03", 3150 | "version_major": 2, 3151 | "version_minor": 0 3152 | }, 3153 | "text/plain": [ 3154 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3155 | ] 3156 | }, 3157 | "metadata": {}, 3158 | "output_type": "display_data" 3159 | }, 3160 | { 3161 | "name": "stdout", 3162 | "output_type": "stream", 3163 | "text": [ 3164 | "\n", 3165 | "epoch:134 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 3166 | ] 3167 | }, 3168 | { 3169 | "data": { 3170 | "application/vnd.jupyter.widget-view+json": { 3171 | "model_id": "b4b56b4508aa471790383fae7ccff1bc", 3172 | "version_major": 2, 3173 | "version_minor": 0 3174 | }, 3175 | "text/plain": [ 3176 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3177 | ] 3178 | }, 3179 | "metadata": {}, 3180 | "output_type": "display_data" 3181 | }, 3182 | { 3183 | "name": "stdout", 3184 | "output_type": "stream", 3185 | "text": [ 3186 | "\n", 3187 | "epoch:135 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3188 | ] 3189 | }, 3190 | { 3191 | "data": { 3192 | "application/vnd.jupyter.widget-view+json": { 3193 | "model_id": "a3a45d2179854476b7bb61063ed367fa", 3194 | "version_major": 2, 3195 | "version_minor": 0 3196 | }, 3197 | "text/plain": [ 3198 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3199 | ] 3200 | }, 3201 | "metadata": {}, 3202 | "output_type": "display_data" 3203 | }, 3204 | { 3205 | "name": "stdout", 3206 | "output_type": "stream", 3207 | "text": [ 3208 | "\n", 3209 | "epoch:136 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3210 | ] 3211 | }, 3212 | { 3213 | "data": { 3214 | "application/vnd.jupyter.widget-view+json": { 3215 | "model_id": "7331e0f7390a4b5bb0a3d5d7b3acdc7a", 3216 | "version_major": 2, 3217 | "version_minor": 0 3218 | }, 3219 | "text/plain": [ 3220 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3221 | ] 3222 | }, 3223 | "metadata": {}, 3224 | "output_type": "display_data" 3225 | }, 3226 | { 3227 | "name": "stdout", 3228 | "output_type": "stream", 3229 | "text": [ 3230 | "\n", 3231 | "epoch:137 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3232 | ] 3233 | }, 3234 | { 3235 | "data": { 3236 | "application/vnd.jupyter.widget-view+json": { 3237 | "model_id": "02f72f2f5e3a428794b6b375bcdc05b2", 3238 | "version_major": 2, 3239 | "version_minor": 0 3240 | }, 3241 | "text/plain": [ 3242 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3243 | ] 3244 | }, 3245 | "metadata": {}, 3246 | "output_type": "display_data" 3247 | }, 3248 | { 3249 | "name": "stdout", 3250 | "output_type": "stream", 3251 | "text": [ 3252 | "\n", 3253 | "epoch:138 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3254 | ] 3255 | }, 3256 | { 3257 | "data": { 3258 | "application/vnd.jupyter.widget-view+json": { 3259 | "model_id": "ffb5d870ce124e5191be5fd791263907", 3260 | "version_major": 2, 3261 | "version_minor": 0 3262 | }, 3263 | "text/plain": [ 3264 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3265 | ] 3266 | }, 3267 | "metadata": {}, 3268 | "output_type": "display_data" 3269 | }, 3270 | { 3271 | "name": "stdout", 3272 | "output_type": "stream", 3273 | "text": [ 3274 | "\n", 3275 | "epoch:139 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3276 | ] 3277 | }, 3278 | { 3279 | "data": { 3280 | "application/vnd.jupyter.widget-view+json": { 3281 | "model_id": "610cb64064524f2cb84d7134e0561d34", 3282 | "version_major": 2, 3283 | "version_minor": 0 3284 | }, 3285 | "text/plain": [ 3286 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3287 | ] 3288 | }, 3289 | "metadata": {}, 3290 | "output_type": "display_data" 3291 | }, 3292 | { 3293 | "name": "stdout", 3294 | "output_type": "stream", 3295 | "text": [ 3296 | "\n", 3297 | "epoch:140 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3298 | ] 3299 | }, 3300 | { 3301 | "data": { 3302 | "application/vnd.jupyter.widget-view+json": { 3303 | "model_id": "6cd384c03071453dbb735377d374756d", 3304 | "version_major": 2, 3305 | "version_minor": 0 3306 | }, 3307 | "text/plain": [ 3308 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3309 | ] 3310 | }, 3311 | "metadata": {}, 3312 | "output_type": "display_data" 3313 | }, 3314 | { 3315 | "name": "stdout", 3316 | "output_type": "stream", 3317 | "text": [ 3318 | "\n", 3319 | "epoch:141 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 3320 | ] 3321 | }, 3322 | { 3323 | "data": { 3324 | "application/vnd.jupyter.widget-view+json": { 3325 | "model_id": "3dd562c8cdd74b6c9384e2845bce07c4", 3326 | "version_major": 2, 3327 | "version_minor": 0 3328 | }, 3329 | "text/plain": [ 3330 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3331 | ] 3332 | }, 3333 | "metadata": {}, 3334 | "output_type": "display_data" 3335 | }, 3336 | { 3337 | "name": "stdout", 3338 | "output_type": "stream", 3339 | "text": [ 3340 | "\n", 3341 | "epoch:142 | loss:0.17, 0.47 | acc:0.95, 0.87 | lr:0.0000\n" 3342 | ] 3343 | }, 3344 | { 3345 | "data": { 3346 | "application/vnd.jupyter.widget-view+json": { 3347 | "model_id": "494577902cd84293840719990aba80e0", 3348 | "version_major": 2, 3349 | "version_minor": 0 3350 | }, 3351 | "text/plain": [ 3352 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3353 | ] 3354 | }, 3355 | "metadata": {}, 3356 | "output_type": "display_data" 3357 | }, 3358 | { 3359 | "name": "stdout", 3360 | "output_type": "stream", 3361 | "text": [ 3362 | "\n", 3363 | "epoch:143 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 3364 | ] 3365 | }, 3366 | { 3367 | "data": { 3368 | "application/vnd.jupyter.widget-view+json": { 3369 | "model_id": "636ad3d13fe74499a26f7c9a8d49e9c4", 3370 | "version_major": 2, 3371 | "version_minor": 0 3372 | }, 3373 | "text/plain": [ 3374 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3375 | ] 3376 | }, 3377 | "metadata": {}, 3378 | "output_type": "display_data" 3379 | }, 3380 | { 3381 | "name": "stdout", 3382 | "output_type": "stream", 3383 | "text": [ 3384 | "\n", 3385 | "epoch:144 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3386 | ] 3387 | }, 3388 | { 3389 | "data": { 3390 | "application/vnd.jupyter.widget-view+json": { 3391 | "model_id": "e23459ea7ee34b18b98614fc47324ad4", 3392 | "version_major": 2, 3393 | "version_minor": 0 3394 | }, 3395 | "text/plain": [ 3396 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3397 | ] 3398 | }, 3399 | "metadata": {}, 3400 | "output_type": "display_data" 3401 | }, 3402 | { 3403 | "name": "stdout", 3404 | "output_type": "stream", 3405 | "text": [ 3406 | "\n", 3407 | "epoch:145 | loss:0.16, 0.47 | acc:0.95, 0.87 | lr:0.0000\n" 3408 | ] 3409 | }, 3410 | { 3411 | "data": { 3412 | "application/vnd.jupyter.widget-view+json": { 3413 | "model_id": "cafd6d1653454eee94e2385ad38a50a9", 3414 | "version_major": 2, 3415 | "version_minor": 0 3416 | }, 3417 | "text/plain": [ 3418 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3419 | ] 3420 | }, 3421 | "metadata": {}, 3422 | "output_type": "display_data" 3423 | }, 3424 | { 3425 | "name": "stdout", 3426 | "output_type": "stream", 3427 | "text": [ 3428 | "\n", 3429 | "epoch:146 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3430 | ] 3431 | }, 3432 | { 3433 | "data": { 3434 | "application/vnd.jupyter.widget-view+json": { 3435 | "model_id": "3a1184fc99ac4243b3a97ec426fa5b9e", 3436 | "version_major": 2, 3437 | "version_minor": 0 3438 | }, 3439 | "text/plain": [ 3440 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3441 | ] 3442 | }, 3443 | "metadata": {}, 3444 | "output_type": "display_data" 3445 | }, 3446 | { 3447 | "name": "stdout", 3448 | "output_type": "stream", 3449 | "text": [ 3450 | "\n", 3451 | "epoch:147 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3452 | ] 3453 | }, 3454 | { 3455 | "data": { 3456 | "application/vnd.jupyter.widget-view+json": { 3457 | "model_id": "9e86e020de8840ceb677d935ec02084f", 3458 | "version_major": 2, 3459 | "version_minor": 0 3460 | }, 3461 | "text/plain": [ 3462 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3463 | ] 3464 | }, 3465 | "metadata": {}, 3466 | "output_type": "display_data" 3467 | }, 3468 | { 3469 | "name": "stdout", 3470 | "output_type": "stream", 3471 | "text": [ 3472 | "\n", 3473 | "epoch:148 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3474 | ] 3475 | }, 3476 | { 3477 | "data": { 3478 | "application/vnd.jupyter.widget-view+json": { 3479 | "model_id": "2d35aa4ec80c41deb574bdaaf4024863", 3480 | "version_major": 2, 3481 | "version_minor": 0 3482 | }, 3483 | "text/plain": [ 3484 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3485 | ] 3486 | }, 3487 | "metadata": {}, 3488 | "output_type": "display_data" 3489 | }, 3490 | { 3491 | "name": "stdout", 3492 | "output_type": "stream", 3493 | "text": [ 3494 | "\n", 3495 | "epoch:149 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3496 | ] 3497 | }, 3498 | { 3499 | "data": { 3500 | "application/vnd.jupyter.widget-view+json": { 3501 | "model_id": "de94624b6e5f400ea89e2eb64c2bf0dc", 3502 | "version_major": 2, 3503 | "version_minor": 0 3504 | }, 3505 | "text/plain": [ 3506 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3507 | ] 3508 | }, 3509 | "metadata": {}, 3510 | "output_type": "display_data" 3511 | }, 3512 | { 3513 | "name": "stdout", 3514 | "output_type": "stream", 3515 | "text": [ 3516 | "\n", 3517 | "epoch:150 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3518 | ] 3519 | }, 3520 | { 3521 | "data": { 3522 | "application/vnd.jupyter.widget-view+json": { 3523 | "model_id": "160ca7db3b6c4546a858a78e5ad5aefb", 3524 | "version_major": 2, 3525 | "version_minor": 0 3526 | }, 3527 | "text/plain": [ 3528 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3529 | ] 3530 | }, 3531 | "metadata": {}, 3532 | "output_type": "display_data" 3533 | }, 3534 | { 3535 | "name": "stdout", 3536 | "output_type": "stream", 3537 | "text": [ 3538 | "\n", 3539 | "epoch:151 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 3540 | ] 3541 | }, 3542 | { 3543 | "data": { 3544 | "application/vnd.jupyter.widget-view+json": { 3545 | "model_id": "82f3153211424617a2f4b11400bc3374", 3546 | "version_major": 2, 3547 | "version_minor": 0 3548 | }, 3549 | "text/plain": [ 3550 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3551 | ] 3552 | }, 3553 | "metadata": {}, 3554 | "output_type": "display_data" 3555 | }, 3556 | { 3557 | "name": "stdout", 3558 | "output_type": "stream", 3559 | "text": [ 3560 | "\n", 3561 | "epoch:152 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3562 | ] 3563 | }, 3564 | { 3565 | "data": { 3566 | "application/vnd.jupyter.widget-view+json": { 3567 | "model_id": "7c8d7638870e48d981e5df537ab2c1a3", 3568 | "version_major": 2, 3569 | "version_minor": 0 3570 | }, 3571 | "text/plain": [ 3572 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3573 | ] 3574 | }, 3575 | "metadata": {}, 3576 | "output_type": "display_data" 3577 | }, 3578 | { 3579 | "name": "stdout", 3580 | "output_type": "stream", 3581 | "text": [ 3582 | "\n", 3583 | "epoch:153 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3584 | ] 3585 | }, 3586 | { 3587 | "data": { 3588 | "application/vnd.jupyter.widget-view+json": { 3589 | "model_id": "1ac75dd14d904ce49de71a990806c566", 3590 | "version_major": 2, 3591 | "version_minor": 0 3592 | }, 3593 | "text/plain": [ 3594 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3595 | ] 3596 | }, 3597 | "metadata": {}, 3598 | "output_type": "display_data" 3599 | }, 3600 | { 3601 | "name": "stdout", 3602 | "output_type": "stream", 3603 | "text": [ 3604 | "\n", 3605 | "epoch:154 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3606 | ] 3607 | }, 3608 | { 3609 | "data": { 3610 | "application/vnd.jupyter.widget-view+json": { 3611 | "model_id": "2afa2d620b224fefbc00147acaa31ebe", 3612 | "version_major": 2, 3613 | "version_minor": 0 3614 | }, 3615 | "text/plain": [ 3616 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3617 | ] 3618 | }, 3619 | "metadata": {}, 3620 | "output_type": "display_data" 3621 | }, 3622 | { 3623 | "name": "stdout", 3624 | "output_type": "stream", 3625 | "text": [ 3626 | "\n", 3627 | "epoch:155 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3628 | ] 3629 | }, 3630 | { 3631 | "data": { 3632 | "application/vnd.jupyter.widget-view+json": { 3633 | "model_id": "1f6633e430c5426fb81d3cd8c23e9826", 3634 | "version_major": 2, 3635 | "version_minor": 0 3636 | }, 3637 | "text/plain": [ 3638 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3639 | ] 3640 | }, 3641 | "metadata": {}, 3642 | "output_type": "display_data" 3643 | }, 3644 | { 3645 | "name": "stdout", 3646 | "output_type": "stream", 3647 | "text": [ 3648 | "\n", 3649 | "epoch:156 | loss:0.16, 0.46 | acc:0.95, 0.86 | lr:0.0000\n" 3650 | ] 3651 | }, 3652 | { 3653 | "data": { 3654 | "application/vnd.jupyter.widget-view+json": { 3655 | "model_id": "7a643f903dc64cedbdaf289dda0d7dac", 3656 | "version_major": 2, 3657 | "version_minor": 0 3658 | }, 3659 | "text/plain": [ 3660 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3661 | ] 3662 | }, 3663 | "metadata": {}, 3664 | "output_type": "display_data" 3665 | }, 3666 | { 3667 | "name": "stdout", 3668 | "output_type": "stream", 3669 | "text": [ 3670 | "\n", 3671 | "epoch:157 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3672 | ] 3673 | }, 3674 | { 3675 | "data": { 3676 | "application/vnd.jupyter.widget-view+json": { 3677 | "model_id": "64434a411b154e339c3a76ca17274004", 3678 | "version_major": 2, 3679 | "version_minor": 0 3680 | }, 3681 | "text/plain": [ 3682 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3683 | ] 3684 | }, 3685 | "metadata": {}, 3686 | "output_type": "display_data" 3687 | }, 3688 | { 3689 | "name": "stdout", 3690 | "output_type": "stream", 3691 | "text": [ 3692 | "\n", 3693 | "epoch:158 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3694 | ] 3695 | }, 3696 | { 3697 | "data": { 3698 | "application/vnd.jupyter.widget-view+json": { 3699 | "model_id": "96cfcbd6880249b48d933584f97de425", 3700 | "version_major": 2, 3701 | "version_minor": 0 3702 | }, 3703 | "text/plain": [ 3704 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3705 | ] 3706 | }, 3707 | "metadata": {}, 3708 | "output_type": "display_data" 3709 | }, 3710 | { 3711 | "name": "stdout", 3712 | "output_type": "stream", 3713 | "text": [ 3714 | "\n", 3715 | "epoch:159 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3716 | ] 3717 | }, 3718 | { 3719 | "data": { 3720 | "application/vnd.jupyter.widget-view+json": { 3721 | "model_id": "53047a1f8ae94c549b7374e9fe30d3ce", 3722 | "version_major": 2, 3723 | "version_minor": 0 3724 | }, 3725 | "text/plain": [ 3726 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3727 | ] 3728 | }, 3729 | "metadata": {}, 3730 | "output_type": "display_data" 3731 | }, 3732 | { 3733 | "name": "stdout", 3734 | "output_type": "stream", 3735 | "text": [ 3736 | "\n", 3737 | "epoch:160 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3738 | ] 3739 | }, 3740 | { 3741 | "data": { 3742 | "application/vnd.jupyter.widget-view+json": { 3743 | "model_id": "a51f56296cc044ed8255715600a2485e", 3744 | "version_major": 2, 3745 | "version_minor": 0 3746 | }, 3747 | "text/plain": [ 3748 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3749 | ] 3750 | }, 3751 | "metadata": {}, 3752 | "output_type": "display_data" 3753 | }, 3754 | { 3755 | "name": "stdout", 3756 | "output_type": "stream", 3757 | "text": [ 3758 | "\n", 3759 | "epoch:161 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3760 | ] 3761 | }, 3762 | { 3763 | "data": { 3764 | "application/vnd.jupyter.widget-view+json": { 3765 | "model_id": "d6780968d5e34ce4aa9804486c9b5e8b", 3766 | "version_major": 2, 3767 | "version_minor": 0 3768 | }, 3769 | "text/plain": [ 3770 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3771 | ] 3772 | }, 3773 | "metadata": {}, 3774 | "output_type": "display_data" 3775 | }, 3776 | { 3777 | "name": "stdout", 3778 | "output_type": "stream", 3779 | "text": [ 3780 | "\n", 3781 | "epoch:162 | loss:0.17, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 3782 | ] 3783 | }, 3784 | { 3785 | "data": { 3786 | "application/vnd.jupyter.widget-view+json": { 3787 | "model_id": "a8fdc37f2ae74b1f9fc77921f021e62f", 3788 | "version_major": 2, 3789 | "version_minor": 0 3790 | }, 3791 | "text/plain": [ 3792 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3793 | ] 3794 | }, 3795 | "metadata": {}, 3796 | "output_type": "display_data" 3797 | }, 3798 | { 3799 | "name": "stdout", 3800 | "output_type": "stream", 3801 | "text": [ 3802 | "\n", 3803 | "epoch:163 | loss:0.17, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 3804 | ] 3805 | }, 3806 | { 3807 | "data": { 3808 | "application/vnd.jupyter.widget-view+json": { 3809 | "model_id": "14bc7578490048f0b54f699837a68039", 3810 | "version_major": 2, 3811 | "version_minor": 0 3812 | }, 3813 | "text/plain": [ 3814 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3815 | ] 3816 | }, 3817 | "metadata": {}, 3818 | "output_type": "display_data" 3819 | }, 3820 | { 3821 | "name": "stdout", 3822 | "output_type": "stream", 3823 | "text": [ 3824 | "\n", 3825 | "epoch:164 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3826 | ] 3827 | }, 3828 | { 3829 | "data": { 3830 | "application/vnd.jupyter.widget-view+json": { 3831 | "model_id": "1cd0f5230e0e4490b50eb2fcae21fa2f", 3832 | "version_major": 2, 3833 | "version_minor": 0 3834 | }, 3835 | "text/plain": [ 3836 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3837 | ] 3838 | }, 3839 | "metadata": {}, 3840 | "output_type": "display_data" 3841 | }, 3842 | { 3843 | "name": "stdout", 3844 | "output_type": "stream", 3845 | "text": [ 3846 | "\n", 3847 | "epoch:165 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3848 | ] 3849 | }, 3850 | { 3851 | "data": { 3852 | "application/vnd.jupyter.widget-view+json": { 3853 | "model_id": "47320a3f534a4af4841eb2e69bd4f133", 3854 | "version_major": 2, 3855 | "version_minor": 0 3856 | }, 3857 | "text/plain": [ 3858 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3859 | ] 3860 | }, 3861 | "metadata": {}, 3862 | "output_type": "display_data" 3863 | }, 3864 | { 3865 | "name": "stdout", 3866 | "output_type": "stream", 3867 | "text": [ 3868 | "\n", 3869 | "epoch:166 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3870 | ] 3871 | }, 3872 | { 3873 | "data": { 3874 | "application/vnd.jupyter.widget-view+json": { 3875 | "model_id": "cdb6fd6c9ccc4b77a164a19edb7df442", 3876 | "version_major": 2, 3877 | "version_minor": 0 3878 | }, 3879 | "text/plain": [ 3880 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3881 | ] 3882 | }, 3883 | "metadata": {}, 3884 | "output_type": "display_data" 3885 | }, 3886 | { 3887 | "name": "stdout", 3888 | "output_type": "stream", 3889 | "text": [ 3890 | "\n", 3891 | "epoch:167 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3892 | ] 3893 | }, 3894 | { 3895 | "data": { 3896 | "application/vnd.jupyter.widget-view+json": { 3897 | "model_id": "904a50fd12634ac5977c92b16ec039c1", 3898 | "version_major": 2, 3899 | "version_minor": 0 3900 | }, 3901 | "text/plain": [ 3902 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3903 | ] 3904 | }, 3905 | "metadata": {}, 3906 | "output_type": "display_data" 3907 | }, 3908 | { 3909 | "name": "stdout", 3910 | "output_type": "stream", 3911 | "text": [ 3912 | "\n", 3913 | "epoch:168 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 3914 | ] 3915 | }, 3916 | { 3917 | "data": { 3918 | "application/vnd.jupyter.widget-view+json": { 3919 | "model_id": "d125086a2d2b4e30af96fd8d76dfa575", 3920 | "version_major": 2, 3921 | "version_minor": 0 3922 | }, 3923 | "text/plain": [ 3924 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3925 | ] 3926 | }, 3927 | "metadata": {}, 3928 | "output_type": "display_data" 3929 | }, 3930 | { 3931 | "name": "stdout", 3932 | "output_type": "stream", 3933 | "text": [ 3934 | "\n", 3935 | "epoch:169 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3936 | ] 3937 | }, 3938 | { 3939 | "data": { 3940 | "application/vnd.jupyter.widget-view+json": { 3941 | "model_id": "5fe5643c49ad4d27be14216e07556d24", 3942 | "version_major": 2, 3943 | "version_minor": 0 3944 | }, 3945 | "text/plain": [ 3946 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3947 | ] 3948 | }, 3949 | "metadata": {}, 3950 | "output_type": "display_data" 3951 | }, 3952 | { 3953 | "name": "stdout", 3954 | "output_type": "stream", 3955 | "text": [ 3956 | "\n", 3957 | "epoch:170 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 3958 | ] 3959 | }, 3960 | { 3961 | "data": { 3962 | "application/vnd.jupyter.widget-view+json": { 3963 | "model_id": "9b8c80848c934053928282a72101c489", 3964 | "version_major": 2, 3965 | "version_minor": 0 3966 | }, 3967 | "text/plain": [ 3968 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3969 | ] 3970 | }, 3971 | "metadata": {}, 3972 | "output_type": "display_data" 3973 | }, 3974 | { 3975 | "name": "stdout", 3976 | "output_type": "stream", 3977 | "text": [ 3978 | "\n", 3979 | "epoch:171 | loss:0.16, 0.45 | acc:0.95, 0.86 | lr:0.0000\n" 3980 | ] 3981 | }, 3982 | { 3983 | "data": { 3984 | "application/vnd.jupyter.widget-view+json": { 3985 | "model_id": "c8e55c43b0e74eab889be2b4a3f077e7", 3986 | "version_major": 2, 3987 | "version_minor": 0 3988 | }, 3989 | "text/plain": [ 3990 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 3991 | ] 3992 | }, 3993 | "metadata": {}, 3994 | "output_type": "display_data" 3995 | }, 3996 | { 3997 | "name": "stdout", 3998 | "output_type": "stream", 3999 | "text": [ 4000 | "\n", 4001 | "epoch:172 | loss:0.16, 0.47 | acc:0.95, 0.87 | lr:0.0000\n" 4002 | ] 4003 | }, 4004 | { 4005 | "data": { 4006 | "application/vnd.jupyter.widget-view+json": { 4007 | "model_id": "fc32ac6b690e4731b6bbb1023fe47dff", 4008 | "version_major": 2, 4009 | "version_minor": 0 4010 | }, 4011 | "text/plain": [ 4012 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4013 | ] 4014 | }, 4015 | "metadata": {}, 4016 | "output_type": "display_data" 4017 | }, 4018 | { 4019 | "name": "stdout", 4020 | "output_type": "stream", 4021 | "text": [ 4022 | "\n", 4023 | "epoch:173 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4024 | ] 4025 | }, 4026 | { 4027 | "data": { 4028 | "application/vnd.jupyter.widget-view+json": { 4029 | "model_id": "486d3d8acd754751a5489396652830fb", 4030 | "version_major": 2, 4031 | "version_minor": 0 4032 | }, 4033 | "text/plain": [ 4034 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4035 | ] 4036 | }, 4037 | "metadata": {}, 4038 | "output_type": "display_data" 4039 | }, 4040 | { 4041 | "name": "stdout", 4042 | "output_type": "stream", 4043 | "text": [ 4044 | "\n", 4045 | "epoch:174 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4046 | ] 4047 | }, 4048 | { 4049 | "data": { 4050 | "application/vnd.jupyter.widget-view+json": { 4051 | "model_id": "e1069d52cd074abb872ba361bb78e754", 4052 | "version_major": 2, 4053 | "version_minor": 0 4054 | }, 4055 | "text/plain": [ 4056 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4057 | ] 4058 | }, 4059 | "metadata": {}, 4060 | "output_type": "display_data" 4061 | }, 4062 | { 4063 | "name": "stdout", 4064 | "output_type": "stream", 4065 | "text": [ 4066 | "\n", 4067 | "epoch:175 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4068 | ] 4069 | }, 4070 | { 4071 | "data": { 4072 | "application/vnd.jupyter.widget-view+json": { 4073 | "model_id": "8fce43f21d6a4233bd00603c0676bbbd", 4074 | "version_major": 2, 4075 | "version_minor": 0 4076 | }, 4077 | "text/plain": [ 4078 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4079 | ] 4080 | }, 4081 | "metadata": {}, 4082 | "output_type": "display_data" 4083 | }, 4084 | { 4085 | "name": "stdout", 4086 | "output_type": "stream", 4087 | "text": [ 4088 | "\n", 4089 | "epoch:176 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4090 | ] 4091 | }, 4092 | { 4093 | "data": { 4094 | "application/vnd.jupyter.widget-view+json": { 4095 | "model_id": "a52804b959f54464ab43f35986eff81c", 4096 | "version_major": 2, 4097 | "version_minor": 0 4098 | }, 4099 | "text/plain": [ 4100 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4101 | ] 4102 | }, 4103 | "metadata": {}, 4104 | "output_type": "display_data" 4105 | }, 4106 | { 4107 | "name": "stdout", 4108 | "output_type": "stream", 4109 | "text": [ 4110 | "\n", 4111 | "epoch:177 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4112 | ] 4113 | }, 4114 | { 4115 | "data": { 4116 | "application/vnd.jupyter.widget-view+json": { 4117 | "model_id": "996eaccfbdcd4ced8d5aef9711bbfc1a", 4118 | "version_major": 2, 4119 | "version_minor": 0 4120 | }, 4121 | "text/plain": [ 4122 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4123 | ] 4124 | }, 4125 | "metadata": {}, 4126 | "output_type": "display_data" 4127 | }, 4128 | { 4129 | "name": "stdout", 4130 | "output_type": "stream", 4131 | "text": [ 4132 | "\n", 4133 | "epoch:178 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4134 | ] 4135 | }, 4136 | { 4137 | "data": { 4138 | "application/vnd.jupyter.widget-view+json": { 4139 | "model_id": "08c8703753604d61bd2075f988ea8e95", 4140 | "version_major": 2, 4141 | "version_minor": 0 4142 | }, 4143 | "text/plain": [ 4144 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4145 | ] 4146 | }, 4147 | "metadata": {}, 4148 | "output_type": "display_data" 4149 | }, 4150 | { 4151 | "name": "stdout", 4152 | "output_type": "stream", 4153 | "text": [ 4154 | "\n", 4155 | "epoch:179 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4156 | ] 4157 | }, 4158 | { 4159 | "data": { 4160 | "application/vnd.jupyter.widget-view+json": { 4161 | "model_id": "4046fcbcb19a45848324b1f2b4a7b9ad", 4162 | "version_major": 2, 4163 | "version_minor": 0 4164 | }, 4165 | "text/plain": [ 4166 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4167 | ] 4168 | }, 4169 | "metadata": {}, 4170 | "output_type": "display_data" 4171 | }, 4172 | { 4173 | "name": "stdout", 4174 | "output_type": "stream", 4175 | "text": [ 4176 | "\n", 4177 | "epoch:180 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4178 | ] 4179 | }, 4180 | { 4181 | "data": { 4182 | "application/vnd.jupyter.widget-view+json": { 4183 | "model_id": "1ee474186131482ab64bc302f35f5bef", 4184 | "version_major": 2, 4185 | "version_minor": 0 4186 | }, 4187 | "text/plain": [ 4188 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4189 | ] 4190 | }, 4191 | "metadata": {}, 4192 | "output_type": "display_data" 4193 | }, 4194 | { 4195 | "name": "stdout", 4196 | "output_type": "stream", 4197 | "text": [ 4198 | "\n", 4199 | "epoch:181 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4200 | ] 4201 | }, 4202 | { 4203 | "data": { 4204 | "application/vnd.jupyter.widget-view+json": { 4205 | "model_id": "8a8758920ac940b8ae9a7300eb3352af", 4206 | "version_major": 2, 4207 | "version_minor": 0 4208 | }, 4209 | "text/plain": [ 4210 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4211 | ] 4212 | }, 4213 | "metadata": {}, 4214 | "output_type": "display_data" 4215 | }, 4216 | { 4217 | "name": "stdout", 4218 | "output_type": "stream", 4219 | "text": [ 4220 | "\n", 4221 | "epoch:182 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4222 | ] 4223 | }, 4224 | { 4225 | "data": { 4226 | "application/vnd.jupyter.widget-view+json": { 4227 | "model_id": "d0016f627b1b49aab62421af3024f932", 4228 | "version_major": 2, 4229 | "version_minor": 0 4230 | }, 4231 | "text/plain": [ 4232 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4233 | ] 4234 | }, 4235 | "metadata": {}, 4236 | "output_type": "display_data" 4237 | }, 4238 | { 4239 | "name": "stdout", 4240 | "output_type": "stream", 4241 | "text": [ 4242 | "\n", 4243 | "epoch:183 | loss:0.16, 0.47 | acc:0.95, 0.87 | lr:0.0000\n" 4244 | ] 4245 | }, 4246 | { 4247 | "data": { 4248 | "application/vnd.jupyter.widget-view+json": { 4249 | "model_id": "972a663ac8df43d39abb2808de621af5", 4250 | "version_major": 2, 4251 | "version_minor": 0 4252 | }, 4253 | "text/plain": [ 4254 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4255 | ] 4256 | }, 4257 | "metadata": {}, 4258 | "output_type": "display_data" 4259 | }, 4260 | { 4261 | "name": "stdout", 4262 | "output_type": "stream", 4263 | "text": [ 4264 | "\n", 4265 | "epoch:184 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 4266 | ] 4267 | }, 4268 | { 4269 | "data": { 4270 | "application/vnd.jupyter.widget-view+json": { 4271 | "model_id": "4910f14c35db42cdbaf2a280612d7bc8", 4272 | "version_major": 2, 4273 | "version_minor": 0 4274 | }, 4275 | "text/plain": [ 4276 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4277 | ] 4278 | }, 4279 | "metadata": {}, 4280 | "output_type": "display_data" 4281 | }, 4282 | { 4283 | "name": "stdout", 4284 | "output_type": "stream", 4285 | "text": [ 4286 | "\n", 4287 | "epoch:185 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4288 | ] 4289 | }, 4290 | { 4291 | "data": { 4292 | "application/vnd.jupyter.widget-view+json": { 4293 | "model_id": "c52da9f488994b4981c46f6eb2a9adab", 4294 | "version_major": 2, 4295 | "version_minor": 0 4296 | }, 4297 | "text/plain": [ 4298 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4299 | ] 4300 | }, 4301 | "metadata": {}, 4302 | "output_type": "display_data" 4303 | }, 4304 | { 4305 | "name": "stdout", 4306 | "output_type": "stream", 4307 | "text": [ 4308 | "\n", 4309 | "epoch:186 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 4310 | ] 4311 | }, 4312 | { 4313 | "data": { 4314 | "application/vnd.jupyter.widget-view+json": { 4315 | "model_id": "a24eb73c836d4c6f8ee416d42585dfd1", 4316 | "version_major": 2, 4317 | "version_minor": 0 4318 | }, 4319 | "text/plain": [ 4320 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4321 | ] 4322 | }, 4323 | "metadata": {}, 4324 | "output_type": "display_data" 4325 | }, 4326 | { 4327 | "name": "stdout", 4328 | "output_type": "stream", 4329 | "text": [ 4330 | "\n", 4331 | "epoch:187 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 4332 | ] 4333 | }, 4334 | { 4335 | "data": { 4336 | "application/vnd.jupyter.widget-view+json": { 4337 | "model_id": "09b1de64b9214cb59b3ea0a25cf52620", 4338 | "version_major": 2, 4339 | "version_minor": 0 4340 | }, 4341 | "text/plain": [ 4342 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4343 | ] 4344 | }, 4345 | "metadata": {}, 4346 | "output_type": "display_data" 4347 | }, 4348 | { 4349 | "name": "stdout", 4350 | "output_type": "stream", 4351 | "text": [ 4352 | "\n", 4353 | "epoch:188 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4354 | ] 4355 | }, 4356 | { 4357 | "data": { 4358 | "application/vnd.jupyter.widget-view+json": { 4359 | "model_id": "c0ec550a9d974f4bbbbe5ffd9be20e51", 4360 | "version_major": 2, 4361 | "version_minor": 0 4362 | }, 4363 | "text/plain": [ 4364 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4365 | ] 4366 | }, 4367 | "metadata": {}, 4368 | "output_type": "display_data" 4369 | }, 4370 | { 4371 | "name": "stdout", 4372 | "output_type": "stream", 4373 | "text": [ 4374 | "\n", 4375 | "epoch:189 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4376 | ] 4377 | }, 4378 | { 4379 | "data": { 4380 | "application/vnd.jupyter.widget-view+json": { 4381 | "model_id": "5236703ae2e741f2aefbf290bdcd1326", 4382 | "version_major": 2, 4383 | "version_minor": 0 4384 | }, 4385 | "text/plain": [ 4386 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4387 | ] 4388 | }, 4389 | "metadata": {}, 4390 | "output_type": "display_data" 4391 | }, 4392 | { 4393 | "name": "stdout", 4394 | "output_type": "stream", 4395 | "text": [ 4396 | "\n", 4397 | "epoch:190 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4398 | ] 4399 | }, 4400 | { 4401 | "data": { 4402 | "application/vnd.jupyter.widget-view+json": { 4403 | "model_id": "6d4e4e2b6e564479b9754a2a78e73218", 4404 | "version_major": 2, 4405 | "version_minor": 0 4406 | }, 4407 | "text/plain": [ 4408 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4409 | ] 4410 | }, 4411 | "metadata": {}, 4412 | "output_type": "display_data" 4413 | }, 4414 | { 4415 | "name": "stdout", 4416 | "output_type": "stream", 4417 | "text": [ 4418 | "\n", 4419 | "epoch:191 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4420 | ] 4421 | }, 4422 | { 4423 | "data": { 4424 | "application/vnd.jupyter.widget-view+json": { 4425 | "model_id": "8a57de2f5be54a2f866291a3e9407dc2", 4426 | "version_major": 2, 4427 | "version_minor": 0 4428 | }, 4429 | "text/plain": [ 4430 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4431 | ] 4432 | }, 4433 | "metadata": {}, 4434 | "output_type": "display_data" 4435 | }, 4436 | { 4437 | "name": "stdout", 4438 | "output_type": "stream", 4439 | "text": [ 4440 | "\n", 4441 | "epoch:192 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4442 | ] 4443 | }, 4444 | { 4445 | "data": { 4446 | "application/vnd.jupyter.widget-view+json": { 4447 | "model_id": "8d44f917820541c4aab247b5f1a34abd", 4448 | "version_major": 2, 4449 | "version_minor": 0 4450 | }, 4451 | "text/plain": [ 4452 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4453 | ] 4454 | }, 4455 | "metadata": {}, 4456 | "output_type": "display_data" 4457 | }, 4458 | { 4459 | "name": "stdout", 4460 | "output_type": "stream", 4461 | "text": [ 4462 | "\n", 4463 | "epoch:193 | loss:0.17, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 4464 | ] 4465 | }, 4466 | { 4467 | "data": { 4468 | "application/vnd.jupyter.widget-view+json": { 4469 | "model_id": "342e744eb8184282881243b11e7d1501", 4470 | "version_major": 2, 4471 | "version_minor": 0 4472 | }, 4473 | "text/plain": [ 4474 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4475 | ] 4476 | }, 4477 | "metadata": {}, 4478 | "output_type": "display_data" 4479 | }, 4480 | { 4481 | "name": "stdout", 4482 | "output_type": "stream", 4483 | "text": [ 4484 | "\n", 4485 | "epoch:194 | loss:0.17, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4486 | ] 4487 | }, 4488 | { 4489 | "data": { 4490 | "application/vnd.jupyter.widget-view+json": { 4491 | "model_id": "89d82aa3b3fb43d48576465f50a1f219", 4492 | "version_major": 2, 4493 | "version_minor": 0 4494 | }, 4495 | "text/plain": [ 4496 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4497 | ] 4498 | }, 4499 | "metadata": {}, 4500 | "output_type": "display_data" 4501 | }, 4502 | { 4503 | "name": "stdout", 4504 | "output_type": "stream", 4505 | "text": [ 4506 | "\n", 4507 | "epoch:195 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 4508 | ] 4509 | }, 4510 | { 4511 | "data": { 4512 | "application/vnd.jupyter.widget-view+json": { 4513 | "model_id": "1030f95aeec141c99753006cb74ba4c5", 4514 | "version_major": 2, 4515 | "version_minor": 0 4516 | }, 4517 | "text/plain": [ 4518 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4519 | ] 4520 | }, 4521 | "metadata": {}, 4522 | "output_type": "display_data" 4523 | }, 4524 | { 4525 | "name": "stdout", 4526 | "output_type": "stream", 4527 | "text": [ 4528 | "\n", 4529 | "epoch:196 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4530 | ] 4531 | }, 4532 | { 4533 | "data": { 4534 | "application/vnd.jupyter.widget-view+json": { 4535 | "model_id": "2592fc3cea8a413094587c9a13892038", 4536 | "version_major": 2, 4537 | "version_minor": 0 4538 | }, 4539 | "text/plain": [ 4540 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4541 | ] 4542 | }, 4543 | "metadata": {}, 4544 | "output_type": "display_data" 4545 | }, 4546 | { 4547 | "name": "stdout", 4548 | "output_type": "stream", 4549 | "text": [ 4550 | "\n", 4551 | "epoch:197 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4552 | ] 4553 | }, 4554 | { 4555 | "data": { 4556 | "application/vnd.jupyter.widget-view+json": { 4557 | "model_id": "3229d0eca5bc4b8f8e32b5c30aed21a1", 4558 | "version_major": 2, 4559 | "version_minor": 0 4560 | }, 4561 | "text/plain": [ 4562 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4563 | ] 4564 | }, 4565 | "metadata": {}, 4566 | "output_type": "display_data" 4567 | }, 4568 | { 4569 | "name": "stdout", 4570 | "output_type": "stream", 4571 | "text": [ 4572 | "\n", 4573 | "epoch:198 | loss:0.17, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 4574 | ] 4575 | }, 4576 | { 4577 | "data": { 4578 | "application/vnd.jupyter.widget-view+json": { 4579 | "model_id": "ca2fe1fc4fe94e068b5fe6b9170553f8", 4580 | "version_major": 2, 4581 | "version_minor": 0 4582 | }, 4583 | "text/plain": [ 4584 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4585 | ] 4586 | }, 4587 | "metadata": {}, 4588 | "output_type": "display_data" 4589 | }, 4590 | { 4591 | "name": "stdout", 4592 | "output_type": "stream", 4593 | "text": [ 4594 | "\n", 4595 | "epoch:199 | loss:0.16, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4596 | ] 4597 | }, 4598 | { 4599 | "data": { 4600 | "application/vnd.jupyter.widget-view+json": { 4601 | "model_id": "d25e9dc3e51f4d5e8a9c867aab1e2faa", 4602 | "version_major": 2, 4603 | "version_minor": 0 4604 | }, 4605 | "text/plain": [ 4606 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4607 | ] 4608 | }, 4609 | "metadata": {}, 4610 | "output_type": "display_data" 4611 | }, 4612 | { 4613 | "name": "stdout", 4614 | "output_type": "stream", 4615 | "text": [ 4616 | "\n", 4617 | "epoch:200 | loss:0.16, 0.44 | acc:0.95, 0.87 | lr:0.0000\n" 4618 | ] 4619 | }, 4620 | { 4621 | "data": { 4622 | "application/vnd.jupyter.widget-view+json": { 4623 | "model_id": "4b5715e12f4f47b09ead6cf0d02152d3", 4624 | "version_major": 2, 4625 | "version_minor": 0 4626 | }, 4627 | "text/plain": [ 4628 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4629 | ] 4630 | }, 4631 | "metadata": {}, 4632 | "output_type": "display_data" 4633 | }, 4634 | { 4635 | "name": "stdout", 4636 | "output_type": "stream", 4637 | "text": [ 4638 | "\n", 4639 | "epoch:201 | loss:0.17, 0.46 | acc:0.95, 0.87 | lr:0.0000\n" 4640 | ] 4641 | }, 4642 | { 4643 | "data": { 4644 | "application/vnd.jupyter.widget-view+json": { 4645 | "model_id": "853575e0574b489a86c6babf3e71838c", 4646 | "version_major": 2, 4647 | "version_minor": 0 4648 | }, 4649 | "text/plain": [ 4650 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4651 | ] 4652 | }, 4653 | "metadata": {}, 4654 | "output_type": "display_data" 4655 | }, 4656 | { 4657 | "name": "stdout", 4658 | "output_type": "stream", 4659 | "text": [ 4660 | "\n", 4661 | "epoch:202 | loss:0.17, 0.47 | acc:0.94, 0.86 | lr:0.0000\n" 4662 | ] 4663 | }, 4664 | { 4665 | "data": { 4666 | "application/vnd.jupyter.widget-view+json": { 4667 | "model_id": "12a7426c7f83466483933249108bbea0", 4668 | "version_major": 2, 4669 | "version_minor": 0 4670 | }, 4671 | "text/plain": [ 4672 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4673 | ] 4674 | }, 4675 | "metadata": {}, 4676 | "output_type": "display_data" 4677 | }, 4678 | { 4679 | "name": "stdout", 4680 | "output_type": "stream", 4681 | "text": [ 4682 | "\n", 4683 | "epoch:203 | loss:0.16, 0.45 | acc:0.95, 0.87 | lr:0.0000\n" 4684 | ] 4685 | }, 4686 | { 4687 | "data": { 4688 | "application/vnd.jupyter.widget-view+json": { 4689 | "model_id": "d4948c4336d34d278134fe8aafcc761b", 4690 | "version_major": 2, 4691 | "version_minor": 0 4692 | }, 4693 | "text/plain": [ 4694 | "HBox(children=(FloatProgress(value=0.0, max=782.0), HTML(value='')))" 4695 | ] 4696 | }, 4697 | "metadata": {}, 4698 | "output_type": "display_data" 4699 | }, 4700 | { 4701 | "ename": "KeyboardInterrupt", 4702 | "evalue": "", 4703 | "output_type": "error", 4704 | "traceback": [ 4705 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", 4706 | "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", 4707 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 81\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msave\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mclf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstate_dict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msave_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 82\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 83\u001b[0;31m \u001b[0mtrain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m300\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", 4708 | "\u001b[0;32m\u001b[0m in \u001b[0;36mtrain\u001b[0;34m(epoch_size)\u001b[0m\n\u001b[1;32m 67\u001b[0m \u001b[0mbest_val_acc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 68\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mepoch\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mepoch_size\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 69\u001b[0;31m \u001b[0mres_train\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtrain_epoch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mclf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0madam\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtrain_loader\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 70\u001b[0m \u001b[0mres_test\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtest_epoch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mclf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtest_loader\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 71\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", 4709 | "\u001b[0;32m\u001b[0m in \u001b[0;36mtrain_epoch\u001b[0;34m(clf, opt, train_loader, epoch_size)\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mprev_param\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mbatch_id\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtqdm\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0menumerate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtrain_loader\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtotal\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtrain_loader\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcuda\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mlabel\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcuda\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4710 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tqdm/notebook.py\u001b[0m in \u001b[0;36m__iter__\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 216\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__iter__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 218\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mobj\u001b[0m \u001b[0;32min\u001b[0m \u001b[0msuper\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtqdm_notebook\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__iter__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 219\u001b[0m \u001b[0;31m# return super(tqdm...) will not catch exception\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 220\u001b[0m \u001b[0;32myield\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4711 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tqdm/std.py\u001b[0m in \u001b[0;36m__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1106\u001b[0m fp_write=getattr(self.fp, 'write', sys.stderr.write))\n\u001b[1;32m 1107\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1108\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mobj\u001b[0m \u001b[0;32min\u001b[0m \u001b[0miterable\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1109\u001b[0m \u001b[0;32myield\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1110\u001b[0m \u001b[0;31m# Update and possibly print the progressbar.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4712 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py\u001b[0m in \u001b[0;36m__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 343\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 344\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__next__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 345\u001b[0;31m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_next_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 346\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_num_yielded\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 347\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_dataset_kind\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0m_DatasetKind\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mIterable\u001b[0m \u001b[0;32mand\u001b[0m\u001b[0;31m \u001b[0m\u001b[0;31m\\\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4713 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py\u001b[0m in \u001b[0;36m_next_data\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 383\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_next_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 384\u001b[0m \u001b[0mindex\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_next_index\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# may raise StopIteration\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 385\u001b[0;31m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_dataset_fetcher\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfetch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mindex\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# may raise StopIteration\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 386\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_pin_memory\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 387\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_utils\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpin_memory\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpin_memory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4714 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py\u001b[0m in \u001b[0;36mfetch\u001b[0;34m(self, possibly_batched_index)\u001b[0m\n\u001b[1;32m 42\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mfetch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpossibly_batched_index\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 43\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mauto_collation\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 44\u001b[0;31m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataset\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0midx\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mpossibly_batched_index\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 45\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 46\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataset\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mpossibly_batched_index\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4715 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py\u001b[0m in \u001b[0;36m\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 42\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mfetch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpossibly_batched_index\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 43\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mauto_collation\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 44\u001b[0;31m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataset\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0midx\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mpossibly_batched_index\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 45\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 46\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataset\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mpossibly_batched_index\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4716 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/torchvision/datasets/cifar.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, index)\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 124\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtransform\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 125\u001b[0;31m \u001b[0mimg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtransform\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mimg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 126\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 127\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtarget_transform\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4717 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/torchvision/transforms/transforms.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, img)\u001b[0m\n\u001b[1;32m 68\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__call__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mimg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 69\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mt\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtransforms\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 70\u001b[0;31m \u001b[0mimg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mimg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 71\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mimg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 72\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", 4718 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/torchvision/transforms/transforms.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, pic)\u001b[0m\n\u001b[1;32m 99\u001b[0m \u001b[0mTensor\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mConverted\u001b[0m \u001b[0mimage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 100\u001b[0m \"\"\"\n\u001b[0;32m--> 101\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mF\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mto_tensor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpic\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 102\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 103\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__repr__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4719 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/torchvision/transforms/functional.py\u001b[0m in \u001b[0;36mto_tensor\u001b[0;34m(pic)\u001b[0m\n\u001b[1;32m 98\u001b[0m \u001b[0mimg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mimg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtranspose\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtranspose\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcontiguous\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 99\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mimg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mByteTensor\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 100\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mimg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfloat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdiv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m255\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 101\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 102\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mimg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 4720 | "\u001b[0;31mKeyboardInterrupt\u001b[0m: " 4721 | ] 4722 | } 4723 | ], 4724 | "source": [ 4725 | "def train_epoch(clf, opt, train_loader, epoch_size:int=500):\n", 4726 | " clf.train()\n", 4727 | " n_samples = 0\n", 4728 | " loss_data = []\n", 4729 | " n_corrects = []\n", 4730 | " \n", 4731 | " prev_param = None\n", 4732 | " for batch_id, (data, label) in tqdm(enumerate(train_loader), total=len(train_loader)):\n", 4733 | " data = data.cuda()\n", 4734 | " label = label.cuda()\n", 4735 | " \n", 4736 | "# if batch_id %100 == 0:\n", 4737 | "# param = torch.Tensor([round(p.mean().item(), 2) for p in clf.parameters()])\n", 4738 | "# if prev_param is not None:\n", 4739 | "# diff = torch.where(prev_param != param)\n", 4740 | "# if len(param[diff]):\n", 4741 | "# print(diff)\n", 4742 | "# prev_param = param\n", 4743 | " \n", 4744 | " # Forward\n", 4745 | " opt.zero_grad()\n", 4746 | " preds = clf(data)\n", 4747 | " pred_probs, pred_idx = preds.max(1)\n", 4748 | "\n", 4749 | " # Loss\n", 4750 | " loss = F.nll_loss(preds, label) # Negative Log Loss\n", 4751 | " loss.backward()\n", 4752 | " adam.step()\n", 4753 | " \n", 4754 | " # Log\n", 4755 | " n_samples += len(label)\n", 4756 | " n_corrects.append((pred_idx == label).sum().item())\n", 4757 | " loss_data.append(loss.item())\n", 4758 | " \n", 4759 | " \n", 4760 | " return {'loss': np.mean(loss_data), \n", 4761 | " 'acc': np.sum(n_corrects)/n_samples}\n", 4762 | "\n", 4763 | "def test_epoch(clf, test_loader):\n", 4764 | " clf.eval() # set model in inference mode (need this because of dropout)\n", 4765 | " n_samples = 0\n", 4766 | " n_corrects = []\n", 4767 | " test_losses = []\n", 4768 | " \n", 4769 | " \n", 4770 | " for data, target in test_loader:\n", 4771 | " data = data.cuda()\n", 4772 | " target = target.cuda()\n", 4773 | " \n", 4774 | " output = clf(data)\n", 4775 | " test_loss = F.nll_loss(output, target)\n", 4776 | " pred_probs, pred_idx = output.max(1)\n", 4777 | " \n", 4778 | " # Log\n", 4779 | " n_samples += len(target)\n", 4780 | " n_corrects.append((pred_idx == target).sum().item())\n", 4781 | " test_losses.append(test_loss.item())\n", 4782 | " \n", 4783 | " return {'loss': np.mean(test_losses), \n", 4784 | " 'acc': np.sum(n_corrects)/n_samples}\n", 4785 | "\n", 4786 | " \n", 4787 | "def train(epoch_size=1000):\n", 4788 | " if not os.path.exists('./checkpoints'):\n", 4789 | " os.makedirs('./checkpoints')\n", 4790 | " \n", 4791 | " best_val_acc = 0\n", 4792 | " for epoch in range(epoch_size):\n", 4793 | " res_train = train_epoch(clf, adam, train_loader) \n", 4794 | " res_test = test_epoch(clf, test_loader)\n", 4795 | " \n", 4796 | " lr_scheduler.step(res_test['loss'])\n", 4797 | " last_lr = lr_scheduler.optimizer.param_groups[0]['lr']\n", 4798 | " print(f'epoch:{epoch:02} | loss:{res_train[\"loss\"]:.2f}, {res_test[\"loss\"]:.2f} | '\n", 4799 | " f'acc:{res_train[\"acc\"]:.2f}, {res_test[\"acc\"]:.2f} | lr:{last_lr:6.4f}')\n", 4800 | " \n", 4801 | " # Save\n", 4802 | " if round(res_test['acc'], 2) >= best_val_acc:\n", 4803 | " best_val_acc = round(res_test['acc'], 2)\n", 4804 | " save_path = os.path.join(f'./checkpoints/checkpoint_{epoch}_{best_val_acc:.2f}.pth')\n", 4805 | " torch.save(clf.state_dict(), save_path)\n", 4806 | " \n", 4807 | "train(300)" 4808 | ] 4809 | } 4810 | ], 4811 | "metadata": { 4812 | "kernelspec": { 4813 | "display_name": "Python 3", 4814 | "language": "python", 4815 | "name": "python3" 4816 | }, 4817 | "language_info": { 4818 | "codemirror_mode": { 4819 | "name": "ipython", 4820 | "version": 3 4821 | }, 4822 | "file_extension": ".py", 4823 | "mimetype": "text/x-python", 4824 | "name": "python", 4825 | "nbconvert_exporter": "python", 4826 | "pygments_lexer": "ipython3", 4827 | "version": "3.6.9" 4828 | }, 4829 | "toc": { 4830 | "base_numbering": 1, 4831 | "nav_menu": {}, 4832 | "number_sections": true, 4833 | "sideBar": true, 4834 | "skip_h1_title": false, 4835 | "title_cell": "Table of Contents", 4836 | "title_sidebar": "Contents", 4837 | "toc_cell": false, 4838 | "toc_position": {}, 4839 | "toc_section_display": true, 4840 | "toc_window_display": false 4841 | } 4842 | }, 4843 | "nbformat": 4, 4844 | "nbformat_minor": 4 4845 | } 4846 | --------------------------------------------------------------------------------