From 3b06ef615a8db67a03927576e0c12fbfb2501f5f Mon Sep 17 00:00:00 2001 From: aktersnurra Date: Mon, 14 Sep 2020 22:15:47 +0200 Subject: Fixed CTC loss. --- src/notebooks/00-testing-stuff-out.ipynb | 357 ++++++++++++++++++++++++++----- 1 file changed, 308 insertions(+), 49 deletions(-) (limited to 'src/notebooks/00-testing-stuff-out.ipynb') diff --git a/src/notebooks/00-testing-stuff-out.ipynb b/src/notebooks/00-testing-stuff-out.ipynb index ff9fb20..9d265ba 100644 --- a/src/notebooks/00-testing-stuff-out.ipynb +++ b/src/notebooks/00-testing-stuff-out.ipynb @@ -191,7 +191,34 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "from text_recognizer.networks import WideResidualNetwork" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "wr = WideResidualNetwork(\n", + " in_channels= 1,\n", + " num_classes= 80,\n", + " depth= 16,\n", + " num_layers= 4,\n", + " width_factor= 2,\n", + " dropout_rate= 0.2,\n", + " activation= \"SELU\",\n", + " use_decoder= False,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -200,67 +227,299 @@ }, { "cell_type": "code", - "execution_count": 70, + "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "----------------------------------------------------------------\n", - " Layer (type) Output Shape Param #\n", - "================================================================\n", - " Conv2d-1 [-1, 96, 16, 16] 864\n", - " BatchNorm2d-2 [-1, 96, 16, 16] 192\n", - " ReLU-3 [-1, 96, 16, 16] 0\n", - " MaxPool2d-4 [-1, 96, 8, 8] 0\n", - " Conv2dAuto-5 [-1, 96, 8, 8] 82,944\n", - " BatchNorm2d-6 [-1, 96, 8, 8] 192\n", - " ReLU-7 [-1, 96, 8, 8] 0\n", - " ReLU-8 [-1, 96, 8, 8] 0\n", - " Conv2dAuto-9 [-1, 96, 8, 8] 82,944\n", - " BatchNorm2d-10 [-1, 96, 8, 8] 192\n", - " ReLU-11 [-1, 96, 8, 8] 0\n", - " ReLU-12 [-1, 96, 8, 8] 0\n", - " BasicBlock-13 [-1, 96, 8, 8] 0\n", - " Conv2dAuto-14 [-1, 96, 8, 8] 82,944\n", - " BatchNorm2d-15 [-1, 96, 8, 8] 192\n", - " ReLU-16 [-1, 96, 8, 8] 0\n", - " ReLU-17 [-1, 96, 8, 8] 0\n", - " Conv2dAuto-18 [-1, 96, 8, 8] 82,944\n", - " BatchNorm2d-19 [-1, 96, 8, 8] 192\n", - " ReLU-20 [-1, 96, 8, 8] 0\n", - " ReLU-21 [-1, 96, 8, 8] 0\n", - " BasicBlock-22 [-1, 96, 8, 8] 0\n", - " ResidualLayer-23 [-1, 96, 8, 8] 0\n", - " Conv2d-24 [-1, 128, 4, 4] 12,288\n", - " BatchNorm2d-25 [-1, 128, 4, 4] 256\n", - " Conv2dAuto-26 [-1, 128, 4, 4] 110,592\n", - " BatchNorm2d-27 [-1, 128, 4, 4] 256\n", - " ReLU-28 [-1, 128, 4, 4] 0\n", - " ReLU-29 [-1, 128, 4, 4] 0\n", - " Conv2dAuto-30 [-1, 128, 4, 4] 147,456\n", - " BatchNorm2d-31 [-1, 128, 4, 4] 256\n", - " ReLU-32 [-1, 128, 4, 4] 0\n", - " ReLU-33 [-1, 128, 4, 4] 0\n", - " BasicBlock-34 [-1, 128, 4, 4] 0\n", - " ResidualLayer-35 [-1, 128, 4, 4] 0\n", - "================================================================\n", - "Total params: 604,704\n", - "Trainable params: 604,704\n", + "===============================================================================================\n", + "Layer (type:depth-idx) Output Shape Param #\n", + "===============================================================================================\n", + "├─Sequential: 1-1 [-1, 256, 4, 2] --\n", + "| └─Conv2d: 2-1 [-1, 16, 28, 14] 144\n", + "| └─Sequential: 2-2 [-1, 32, 28, 14] --\n", + "| | └─WideBlock: 3-1 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4-1 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-1 [-1, 32, 28, 14] 512\n", + "| | | └─Sequential: 4-2 [-1, 32, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-2 [-1, 16, 28, 14] 32\n", + "| | | └─SELU: 4-3 [-1, 16, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-3 [-1, 16, 28, 14] --\n", + "| | | | └─Conv2d: 5-4 [-1, 32, 28, 14] 4,608\n", + "| | | | └─Dropout: 5-5 [-1, 32, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-6 [-1, 32, 28, 14] 64\n", + "| | | └─SELU: 4-4 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-7 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-8 [-1, 32, 28, 14] 9,216\n", + "| | └─WideBlock: 3-2 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4-5 [-1, 32, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-9 [-1, 32, 28, 14] 64\n", + "| | | └─SELU: 4-6 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-10 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-11 [-1, 32, 28, 14] 9,216\n", + "| | | | └─Dropout: 5-12 [-1, 32, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-13 [-1, 32, 28, 14] 64\n", + "| | | └─SELU: 4-7 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-14 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-15 [-1, 32, 28, 14] 9,216\n", + "| └─Sequential: 2-3 [-1, 64, 14, 7] --\n", + "| | └─WideBlock: 3-3 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4-8 [-1, 64, 14, 7] --\n", + "| | | | └─Conv2d: 5-16 [-1, 64, 14, 7] 2,048\n", + "| | | └─Sequential: 4-9 [-1, 64, 14, 7] --\n", + "| | | | └─BatchNorm2d: 5-17 [-1, 32, 28, 14] 64\n", + "| | | └─SELU: 4-10 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-18 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-19 [-1, 64, 28, 14] 18,432\n", + "| | | | └─Dropout: 5-20 [-1, 64, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-21 [-1, 64, 28, 14] 128\n", + "| | | └─SELU: 4-11 [-1, 64, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-22 [-1, 64, 28, 14] --\n", + "| | | | └─Conv2d: 5-23 [-1, 64, 14, 7] 36,864\n", + "| | └─WideBlock: 3-4 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4-12 [-1, 64, 14, 7] --\n", + "| | | | └─BatchNorm2d: 5-24 [-1, 64, 14, 7] 128\n", + "| | | └─SELU: 4-13 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-25 [-1, 64, 14, 7] --\n", + "| | | | └─Conv2d: 5-26 [-1, 64, 14, 7] 36,864\n", + "| | | | └─Dropout: 5-27 [-1, 64, 14, 7] --\n", + "| | | | └─BatchNorm2d: 5-28 [-1, 64, 14, 7] 128\n", + "| | | └─SELU: 4-14 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-29 [-1, 64, 14, 7] --\n", + "| | | | └─Conv2d: 5-30 [-1, 64, 14, 7] 36,864\n", + "| └─Sequential: 2-4 [-1, 128, 7, 4] --\n", + "| | └─WideBlock: 3-5 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4-15 [-1, 128, 7, 4] --\n", + "| | | | └─Conv2d: 5-31 [-1, 128, 7, 4] 8,192\n", + "| | | └─Sequential: 4-16 [-1, 128, 7, 4] --\n", + "| | | | └─BatchNorm2d: 5-32 [-1, 64, 14, 7] 128\n", + "| | | └─SELU: 4-17 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-33 [-1, 64, 14, 7] --\n", + "| | | | └─Conv2d: 5-34 [-1, 128, 14, 7] 73,728\n", + "| | | | └─Dropout: 5-35 [-1, 128, 14, 7] --\n", + "| | | | └─BatchNorm2d: 5-36 [-1, 128, 14, 7] 256\n", + "| | | └─SELU: 4-18 [-1, 128, 14, 7] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-37 [-1, 128, 14, 7] --\n", + "| | | | └─Conv2d: 5-38 [-1, 128, 7, 4] 147,456\n", + "| | └─WideBlock: 3-6 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4-19 [-1, 128, 7, 4] --\n", + "| | | | └─BatchNorm2d: 5-39 [-1, 128, 7, 4] 256\n", + "| | | └─SELU: 4-20 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-40 [-1, 128, 7, 4] --\n", + "| | | | └─Conv2d: 5-41 [-1, 128, 7, 4] 147,456\n", + "| | | | └─Dropout: 5-42 [-1, 128, 7, 4] --\n", + "| | | | └─BatchNorm2d: 5-43 [-1, 128, 7, 4] 256\n", + "| | | └─SELU: 4-21 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-44 [-1, 128, 7, 4] --\n", + "| | | | └─Conv2d: 5-45 [-1, 128, 7, 4] 147,456\n", + "| └─Sequential: 2-5 [-1, 256, 4, 2] --\n", + "| | └─WideBlock: 3-7 [-1, 256, 4, 2] --\n", + "| | | └─Sequential: 4-22 [-1, 256, 4, 2] --\n", + "| | | | └─Conv2d: 5-46 [-1, 256, 4, 2] 32,768\n", + "| | | └─Sequential: 4-23 [-1, 256, 4, 2] --\n", + "| | | | └─BatchNorm2d: 5-47 [-1, 128, 7, 4] 256\n", + "| | | └─SELU: 4-24 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-48 [-1, 128, 7, 4] --\n", + "| | | | └─Conv2d: 5-49 [-1, 256, 7, 4] 294,912\n", + "| | | | └─Dropout: 5-50 [-1, 256, 7, 4] --\n", + "| | | | └─BatchNorm2d: 5-51 [-1, 256, 7, 4] 512\n", + "| | | └─SELU: 4-25 [-1, 256, 7, 4] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-52 [-1, 256, 7, 4] --\n", + "| | | | └─Conv2d: 5-53 [-1, 256, 4, 2] 589,824\n", + "| | └─WideBlock: 3-8 [-1, 256, 4, 2] --\n", + "| | | └─Sequential: 4-26 [-1, 256, 4, 2] --\n", + "| | | | └─BatchNorm2d: 5-54 [-1, 256, 4, 2] 512\n", + "| | | └─SELU: 4-27 [-1, 256, 4, 2] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-55 [-1, 256, 4, 2] --\n", + "| | | | └─Conv2d: 5-56 [-1, 256, 4, 2] 589,824\n", + "| | | | └─Dropout: 5-57 [-1, 256, 4, 2] --\n", + "| | | | └─BatchNorm2d: 5-58 [-1, 256, 4, 2] 512\n", + "| | | └─SELU: 4-28 [-1, 256, 4, 2] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-59 [-1, 256, 4, 2] --\n", + "| | | | └─Conv2d: 5-60 [-1, 256, 4, 2] 589,824\n", + "===============================================================================================\n", + "Total params: 2,788,784\n", + "Trainable params: 2,788,784\n", "Non-trainable params: 0\n", - "----------------------------------------------------------------\n", + "Total mult-adds (M): 84.83\n", + "===============================================================================================\n", "Input size (MB): 0.00\n", - "Forward/backward pass size (MB): 1.69\n", - "Params size (MB): 2.31\n", - "Estimated Total Size (MB): 4.00\n", - "----------------------------------------------------------------\n" + "Forward/backward pass size (MB): 2.26\n", + "Params size (MB): 10.64\n", + "Estimated Total Size (MB): 12.90\n", + "===============================================================================================\n" ] + }, + { + "data": { + "text/plain": [ + "===============================================================================================\n", + "Layer (type:depth-idx) Output Shape Param #\n", + "===============================================================================================\n", + "├─Sequential: 1-1 [-1, 256, 4, 2] --\n", + "| └─Conv2d: 2-1 [-1, 16, 28, 14] 144\n", + "| └─Sequential: 2-2 [-1, 32, 28, 14] --\n", + "| | └─WideBlock: 3-1 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4-1 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-1 [-1, 32, 28, 14] 512\n", + "| | | └─Sequential: 4-2 [-1, 32, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-2 [-1, 16, 28, 14] 32\n", + "| | | └─SELU: 4-3 [-1, 16, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-3 [-1, 16, 28, 14] --\n", + "| | | | └─Conv2d: 5-4 [-1, 32, 28, 14] 4,608\n", + "| | | | └─Dropout: 5-5 [-1, 32, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-6 [-1, 32, 28, 14] 64\n", + "| | | └─SELU: 4-4 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-7 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-8 [-1, 32, 28, 14] 9,216\n", + "| | └─WideBlock: 3-2 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4-5 [-1, 32, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-9 [-1, 32, 28, 14] 64\n", + "| | | └─SELU: 4-6 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-10 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-11 [-1, 32, 28, 14] 9,216\n", + "| | | | └─Dropout: 5-12 [-1, 32, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-13 [-1, 32, 28, 14] 64\n", + "| | | └─SELU: 4-7 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-14 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-15 [-1, 32, 28, 14] 9,216\n", + "| └─Sequential: 2-3 [-1, 64, 14, 7] --\n", + "| | └─WideBlock: 3-3 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4-8 [-1, 64, 14, 7] --\n", + "| | | | └─Conv2d: 5-16 [-1, 64, 14, 7] 2,048\n", + "| | | └─Sequential: 4-9 [-1, 64, 14, 7] --\n", + "| | | | └─BatchNorm2d: 5-17 [-1, 32, 28, 14] 64\n", + "| | | └─SELU: 4-10 [-1, 32, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-18 [-1, 32, 28, 14] --\n", + "| | | | └─Conv2d: 5-19 [-1, 64, 28, 14] 18,432\n", + "| | | | └─Dropout: 5-20 [-1, 64, 28, 14] --\n", + "| | | | └─BatchNorm2d: 5-21 [-1, 64, 28, 14] 128\n", + "| | | └─SELU: 4-11 [-1, 64, 28, 14] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-22 [-1, 64, 28, 14] --\n", + "| | | | └─Conv2d: 5-23 [-1, 64, 14, 7] 36,864\n", + "| | └─WideBlock: 3-4 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4-12 [-1, 64, 14, 7] --\n", + "| | | | └─BatchNorm2d: 5-24 [-1, 64, 14, 7] 128\n", + "| | | └─SELU: 4-13 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-25 [-1, 64, 14, 7] --\n", + "| | | | └─Conv2d: 5-26 [-1, 64, 14, 7] 36,864\n", + "| | | | └─Dropout: 5-27 [-1, 64, 14, 7] --\n", + "| | | | └─BatchNorm2d: 5-28 [-1, 64, 14, 7] 128\n", + "| | | └─SELU: 4-14 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-29 [-1, 64, 14, 7] --\n", + "| | | | └─Conv2d: 5-30 [-1, 64, 14, 7] 36,864\n", + "| └─Sequential: 2-4 [-1, 128, 7, 4] --\n", + "| | └─WideBlock: 3-5 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4-15 [-1, 128, 7, 4] --\n", + "| | | | └─Conv2d: 5-31 [-1, 128, 7, 4] 8,192\n", + "| | | └─Sequential: 4-16 [-1, 128, 7, 4] --\n", + "| | | | └─BatchNorm2d: 5-32 [-1, 64, 14, 7] 128\n", + "| | | └─SELU: 4-17 [-1, 64, 14, 7] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-33 [-1, 64, 14, 7] --\n", + "| | | | └─Conv2d: 5-34 [-1, 128, 14, 7] 73,728\n", + "| | | | └─Dropout: 5-35 [-1, 128, 14, 7] --\n", + "| | | | └─BatchNorm2d: 5-36 [-1, 128, 14, 7] 256\n", + "| | | └─SELU: 4-18 [-1, 128, 14, 7] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-37 [-1, 128, 14, 7] --\n", + "| | | | └─Conv2d: 5-38 [-1, 128, 7, 4] 147,456\n", + "| | └─WideBlock: 3-6 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4-19 [-1, 128, 7, 4] --\n", + "| | | | └─BatchNorm2d: 5-39 [-1, 128, 7, 4] 256\n", + "| | | └─SELU: 4-20 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-40 [-1, 128, 7, 4] --\n", + "| | | | └─Conv2d: 5-41 [-1, 128, 7, 4] 147,456\n", + "| | | | └─Dropout: 5-42 [-1, 128, 7, 4] --\n", + "| | | | └─BatchNorm2d: 5-43 [-1, 128, 7, 4] 256\n", + "| | | └─SELU: 4-21 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-44 [-1, 128, 7, 4] --\n", + "| | | | └─Conv2d: 5-45 [-1, 128, 7, 4] 147,456\n", + "| └─Sequential: 2-5 [-1, 256, 4, 2] --\n", + "| | └─WideBlock: 3-7 [-1, 256, 4, 2] --\n", + "| | | └─Sequential: 4-22 [-1, 256, 4, 2] --\n", + "| | | | └─Conv2d: 5-46 [-1, 256, 4, 2] 32,768\n", + "| | | └─Sequential: 4-23 [-1, 256, 4, 2] --\n", + "| | | | └─BatchNorm2d: 5-47 [-1, 128, 7, 4] 256\n", + "| | | └─SELU: 4-24 [-1, 128, 7, 4] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-48 [-1, 128, 7, 4] --\n", + "| | | | └─Conv2d: 5-49 [-1, 256, 7, 4] 294,912\n", + "| | | | └─Dropout: 5-50 [-1, 256, 7, 4] --\n", + "| | | | └─BatchNorm2d: 5-51 [-1, 256, 7, 4] 512\n", + "| | | └─SELU: 4-25 [-1, 256, 7, 4] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-52 [-1, 256, 7, 4] --\n", + "| | | | └─Conv2d: 5-53 [-1, 256, 4, 2] 589,824\n", + "| | └─WideBlock: 3-8 [-1, 256, 4, 2] --\n", + "| | | └─Sequential: 4-26 [-1, 256, 4, 2] --\n", + "| | | | └─BatchNorm2d: 5-54 [-1, 256, 4, 2] 512\n", + "| | | └─SELU: 4-27 [-1, 256, 4, 2] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-55 [-1, 256, 4, 2] --\n", + "| | | | └─Conv2d: 5-56 [-1, 256, 4, 2] 589,824\n", + "| | | | └─Dropout: 5-57 [-1, 256, 4, 2] --\n", + "| | | | └─BatchNorm2d: 5-58 [-1, 256, 4, 2] 512\n", + "| | | └─SELU: 4-28 [-1, 256, 4, 2] --\n", + "| | | └─Sequential: 4 [] --\n", + "| | | | └─SELU: 5-59 [-1, 256, 4, 2] --\n", + "| | | | └─Conv2d: 5-60 [-1, 256, 4, 2] 589,824\n", + "===============================================================================================\n", + "Total params: 2,788,784\n", + "Trainable params: 2,788,784\n", + "Non-trainable params: 0\n", + "Total mult-adds (M): 84.83\n", + "===============================================================================================\n", + "Input size (MB): 0.00\n", + "Forward/backward pass size (MB): 2.26\n", + "Params size (MB): 10.64\n", + "Estimated Total Size (MB): 12.90\n", + "===============================================================================================" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "summary(e, (1, 28, 28), device=\"cpu\")" + "summary(wr, (1, 28, 14), device=\"cpu\", depth=10)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { -- cgit v1.2.3-70-g09d2