diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-06-25 12:47:36 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-06-25 12:47:36 +0200 |
commit | 9c3a8753d95ecb70a84e1eb40933590a510abfc4 (patch) | |
tree | 1405ce0d6e8a1c00fc7036b6e9d2bacd58031e67 | |
parent | 1aa897cd27990e94ae95e1a9f2ebea035b31d7ea (diff) |
Test of efficientnet
-rw-r--r-- | notebooks/00-scratch-pad.ipynb | 183 |
1 files changed, 92 insertions, 91 deletions
diff --git a/notebooks/00-scratch-pad.ipynb b/notebooks/00-scratch-pad.ipynb index 32f96d1..5c4edde 100644 --- a/notebooks/00-scratch-pad.ipynb +++ b/notebooks/00-scratch-pad.ipynb @@ -39,7 +39,7 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 65, "metadata": { "scrolled": false }, @@ -50,7 +50,7 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 68, "metadata": { "scrolled": false }, @@ -62,103 +62,104 @@ "==========================================================================================\n", "Layer (type:depth-idx) Output Shape Param #\n", "==========================================================================================\n", - "├─Sequential: 1-1 [-1, 32, 111, 111] --\n", - "| └─Conv2d: 2-1 [-1, 32, 111, 111] 288\n", - "| └─BatchNorm2d: 2-2 [-1, 32, 111, 111] 64\n", - "| └─Mish: 2-3 [-1, 32, 111, 111] --\n", + "├─Sequential: 1-1 [-1, 32, 112, 112] --\n", + "| └─ZeroPad2d: 2-1 [-1, 1, 225, 225] --\n", + "| └─Conv2d: 2-2 [-1, 32, 112, 112] 288\n", + "| └─BatchNorm2d: 2-3 [-1, 32, 112, 112] 64\n", + "| └─Mish: 2-4 [-1, 32, 112, 112] --\n", "├─ModuleList: 1 [] --\n", - "| └─MBConvBlock: 2-4 [-1, 16, 111, 111] --\n", - "| | └─Sequential: 3-1 [-1, 32, 111, 111] 352\n", - "| | └─Sequential: 3-2 [-1, 32, 111, 111] 552\n", - "| | └─Sequential: 3-3 [-1, 16, 111, 111] 544\n", - "| └─MBConvBlock: 2-5 [-1, 24, 55, 55] --\n", - "| | └─Sequential: 3-4 [-1, 96, 111, 111] 1,728\n", - "| | └─Sequential: 3-5 [-1, 96, 55, 55] 1,056\n", - "| | └─Sequential: 3-6 [-1, 96, 55, 55] 4,728\n", - "| | └─Sequential: 3-7 [-1, 24, 55, 55] 2,352\n", - "| └─MBConvBlock: 2-6 [-1, 24, 55, 55] --\n", - "| | └─Sequential: 3-8 [-1, 144, 55, 55] 3,744\n", - "| | └─Sequential: 3-9 [-1, 144, 55, 55] 1,584\n", - "| | └─Sequential: 3-10 [-1, 144, 55, 55] 10,548\n", - "| | └─Sequential: 3-11 [-1, 24, 55, 55] 3,504\n", - "| └─MBConvBlock: 2-7 [-1, 40, 27, 27] --\n", - "| | └─Sequential: 3-12 [-1, 144, 55, 55] 3,744\n", - "| | └─Sequential: 3-13 [-1, 144, 27, 27] 3,888\n", - "| | └─Sequential: 3-14 [-1, 144, 27, 27] 10,548\n", - "| | └─Sequential: 3-15 [-1, 40, 27, 27] 5,840\n", - "| └─MBConvBlock: 2-8 [-1, 40, 27, 27] --\n", - "| | └─Sequential: 3-16 [-1, 240, 27, 27] 10,080\n", - "| | └─Sequential: 3-17 [-1, 240, 27, 27] 6,480\n", - "| | └─Sequential: 3-18 [-1, 240, 27, 27] 29,100\n", - "| | └─Sequential: 3-19 [-1, 40, 27, 27] 9,680\n", - "| └─MBConvBlock: 2-9 [-1, 80, 13, 13] --\n", - "| | └─Sequential: 3-20 [-1, 240, 27, 27] 10,080\n", - "| | └─Sequential: 3-21 [-1, 240, 13, 13] 2,640\n", - "| | └─Sequential: 3-22 [-1, 240, 13, 13] 29,100\n", - "| | └─Sequential: 3-23 [-1, 80, 13, 13] 19,360\n", - "| └─MBConvBlock: 2-10 [-1, 80, 13, 13] --\n", - "| | └─Sequential: 3-24 [-1, 480, 13, 13] 39,360\n", - "| | └─Sequential: 3-25 [-1, 480, 13, 13] 5,280\n", - "| | └─Sequential: 3-26 [-1, 480, 13, 13] 115,800\n", - "| | └─Sequential: 3-27 [-1, 80, 13, 13] 38,560\n", - "| └─MBConvBlock: 2-11 [-1, 80, 13, 13] --\n", - "| | └─Sequential: 3-28 [-1, 480, 13, 13] 39,360\n", - "| | └─Sequential: 3-29 [-1, 480, 13, 13] 5,280\n", - "| | └─Sequential: 3-30 [-1, 480, 13, 13] 115,800\n", - "| | └─Sequential: 3-31 [-1, 80, 13, 13] 38,560\n", - "| └─MBConvBlock: 2-12 [-1, 112, 13, 13] --\n", - "| | └─Sequential: 3-32 [-1, 480, 13, 13] 39,360\n", - "| | └─Sequential: 3-33 [-1, 480, 13, 13] 12,960\n", - "| | └─Sequential: 3-34 [-1, 480, 13, 13] 115,800\n", - "| | └─Sequential: 3-35 [-1, 112, 13, 13] 53,984\n", - "| └─MBConvBlock: 2-13 [-1, 112, 13, 13] --\n", - "| | └─Sequential: 3-36 [-1, 672, 13, 13] 76,608\n", - "| | └─Sequential: 3-37 [-1, 672, 13, 13] 18,144\n", - "| | └─Sequential: 3-38 [-1, 672, 13, 13] 226,632\n", - "| | └─Sequential: 3-39 [-1, 112, 13, 13] 75,488\n", - "| └─MBConvBlock: 2-14 [-1, 112, 13, 13] --\n", - "| | └─Sequential: 3-40 [-1, 672, 13, 13] 76,608\n", - "| | └─Sequential: 3-41 [-1, 672, 13, 13] 18,144\n", - "| | └─Sequential: 3-42 [-1, 672, 13, 13] 226,632\n", - "| | └─Sequential: 3-43 [-1, 112, 13, 13] 75,488\n", - "| └─MBConvBlock: 2-15 [-1, 192, 6, 6] --\n", - "| | └─Sequential: 3-44 [-1, 672, 13, 13] 76,608\n", - "| | └─Sequential: 3-45 [-1, 672, 6, 6] 18,144\n", - "| | └─Sequential: 3-46 [-1, 672, 6, 6] 226,632\n", - "| | └─Sequential: 3-47 [-1, 192, 6, 6] 129,408\n", - "| └─MBConvBlock: 2-16 [-1, 192, 6, 6] --\n", - "| | └─Sequential: 3-48 [-1, 1152, 6, 6] 223,488\n", - "| | └─Sequential: 3-49 [-1, 1152, 6, 6] 31,104\n", - "| | └─Sequential: 3-50 [-1, 1152, 6, 6] 664,992\n", - "| | └─Sequential: 3-51 [-1, 192, 6, 6] 221,568\n", - "| └─MBConvBlock: 2-17 [-1, 192, 6, 6] --\n", - "| | └─Sequential: 3-52 [-1, 1152, 6, 6] 223,488\n", - "| | └─Sequential: 3-53 [-1, 1152, 6, 6] 31,104\n", - "| | └─Sequential: 3-54 [-1, 1152, 6, 6] 664,992\n", - "| | └─Sequential: 3-55 [-1, 192, 6, 6] 221,568\n", - "| └─MBConvBlock: 2-18 [-1, 192, 6, 6] --\n", - "| | └─Sequential: 3-56 [-1, 1152, 6, 6] 223,488\n", - "| | └─Sequential: 3-57 [-1, 1152, 6, 6] 31,104\n", - "| | └─Sequential: 3-58 [-1, 1152, 6, 6] 664,992\n", - "| | └─Sequential: 3-59 [-1, 192, 6, 6] 221,568\n", - "| └─MBConvBlock: 2-19 [-1, 320, 6, 6] --\n", - "| | └─Sequential: 3-60 [-1, 1152, 6, 6] 223,488\n", - "| | └─Sequential: 3-61 [-1, 1152, 6, 6] 12,672\n", - "| | └─Sequential: 3-62 [-1, 1152, 6, 6] 664,992\n", - "| | └─Sequential: 3-63 [-1, 320, 6, 6] 369,280\n", - "├─Sequential: 1-2 [-1, 1280, 6, 6] --\n", - "| └─Conv2d: 2-20 [-1, 1280, 6, 6] 409,600\n", - "| └─BatchNorm2d: 2-21 [-1, 1280, 6, 6] 2,560\n", + "| └─MBConvBlock: 2-5 [-1, 16, 112, 112] --\n", + "| | └─Sequential: 3-1 [-1, 32, 112, 112] 352\n", + "| | └─Sequential: 3-2 [-1, 32, 112, 112] 552\n", + "| | └─Sequential: 3-3 [-1, 16, 112, 112] 544\n", + "| └─MBConvBlock: 2-6 [-1, 24, 56, 56] --\n", + "| | └─Sequential: 3-4 [-1, 96, 112, 112] 1,728\n", + "| | └─Sequential: 3-5 [-1, 96, 56, 56] 1,056\n", + "| | └─Sequential: 3-6 [-1, 96, 56, 56] 4,728\n", + "| | └─Sequential: 3-7 [-1, 24, 56, 56] 2,352\n", + "| └─MBConvBlock: 2-7 [-1, 24, 56, 56] --\n", + "| | └─Sequential: 3-8 [-1, 144, 56, 56] 3,744\n", + "| | └─Sequential: 3-9 [-1, 144, 56, 56] 1,584\n", + "| | └─Sequential: 3-10 [-1, 144, 56, 56] 10,548\n", + "| | └─Sequential: 3-11 [-1, 24, 56, 56] 3,504\n", + "| └─MBConvBlock: 2-8 [-1, 40, 28, 28] --\n", + "| | └─Sequential: 3-12 [-1, 144, 56, 56] 3,744\n", + "| | └─Sequential: 3-13 [-1, 144, 28, 28] 3,888\n", + "| | └─Sequential: 3-14 [-1, 144, 28, 28] 10,548\n", + "| | └─Sequential: 3-15 [-1, 40, 28, 28] 5,840\n", + "| └─MBConvBlock: 2-9 [-1, 40, 28, 28] --\n", + "| | └─Sequential: 3-16 [-1, 240, 28, 28] 10,080\n", + "| | └─Sequential: 3-17 [-1, 240, 28, 28] 6,480\n", + "| | └─Sequential: 3-18 [-1, 240, 28, 28] 29,100\n", + "| | └─Sequential: 3-19 [-1, 40, 28, 28] 9,680\n", + "| └─MBConvBlock: 2-10 [-1, 80, 14, 14] --\n", + "| | └─Sequential: 3-20 [-1, 240, 28, 28] 10,080\n", + "| | └─Sequential: 3-21 [-1, 240, 14, 14] 2,640\n", + "| | └─Sequential: 3-22 [-1, 240, 14, 14] 29,100\n", + "| | └─Sequential: 3-23 [-1, 80, 14, 14] 19,360\n", + "| └─MBConvBlock: 2-11 [-1, 80, 14, 14] --\n", + "| | └─Sequential: 3-24 [-1, 480, 14, 14] 39,360\n", + "| | └─Sequential: 3-25 [-1, 480, 14, 14] 5,280\n", + "| | └─Sequential: 3-26 [-1, 480, 14, 14] 115,800\n", + "| | └─Sequential: 3-27 [-1, 80, 14, 14] 38,560\n", + "| └─MBConvBlock: 2-12 [-1, 80, 14, 14] --\n", + "| | └─Sequential: 3-28 [-1, 480, 14, 14] 39,360\n", + "| | └─Sequential: 3-29 [-1, 480, 14, 14] 5,280\n", + "| | └─Sequential: 3-30 [-1, 480, 14, 14] 115,800\n", + "| | └─Sequential: 3-31 [-1, 80, 14, 14] 38,560\n", + "| └─MBConvBlock: 2-13 [-1, 112, 14, 14] --\n", + "| | └─Sequential: 3-32 [-1, 480, 14, 14] 39,360\n", + "| | └─Sequential: 3-33 [-1, 480, 14, 14] 12,960\n", + "| | └─Sequential: 3-34 [-1, 480, 14, 14] 115,800\n", + "| | └─Sequential: 3-35 [-1, 112, 14, 14] 53,984\n", + "| └─MBConvBlock: 2-14 [-1, 112, 14, 14] --\n", + "| | └─Sequential: 3-36 [-1, 672, 14, 14] 76,608\n", + "| | └─Sequential: 3-37 [-1, 672, 14, 14] 18,144\n", + "| | └─Sequential: 3-38 [-1, 672, 14, 14] 226,632\n", + "| | └─Sequential: 3-39 [-1, 112, 14, 14] 75,488\n", + "| └─MBConvBlock: 2-15 [-1, 112, 14, 14] --\n", + "| | └─Sequential: 3-40 [-1, 672, 14, 14] 76,608\n", + "| | └─Sequential: 3-41 [-1, 672, 14, 14] 18,144\n", + "| | └─Sequential: 3-42 [-1, 672, 14, 14] 226,632\n", + "| | └─Sequential: 3-43 [-1, 112, 14, 14] 75,488\n", + "| └─MBConvBlock: 2-16 [-1, 192, 7, 7] --\n", + "| | └─Sequential: 3-44 [-1, 672, 14, 14] 76,608\n", + "| | └─Sequential: 3-45 [-1, 672, 7, 7] 18,144\n", + "| | └─Sequential: 3-46 [-1, 672, 7, 7] 226,632\n", + "| | └─Sequential: 3-47 [-1, 192, 7, 7] 129,408\n", + "| └─MBConvBlock: 2-17 [-1, 192, 7, 7] --\n", + "| | └─Sequential: 3-48 [-1, 1152, 7, 7] 223,488\n", + "| | └─Sequential: 3-49 [-1, 1152, 7, 7] 31,104\n", + "| | └─Sequential: 3-50 [-1, 1152, 7, 7] 664,992\n", + "| | └─Sequential: 3-51 [-1, 192, 7, 7] 221,568\n", + "| └─MBConvBlock: 2-18 [-1, 192, 7, 7] --\n", + "| | └─Sequential: 3-52 [-1, 1152, 7, 7] 223,488\n", + "| | └─Sequential: 3-53 [-1, 1152, 7, 7] 31,104\n", + "| | └─Sequential: 3-54 [-1, 1152, 7, 7] 664,992\n", + "| | └─Sequential: 3-55 [-1, 192, 7, 7] 221,568\n", + "| └─MBConvBlock: 2-19 [-1, 192, 7, 7] --\n", + "| | └─Sequential: 3-56 [-1, 1152, 7, 7] 223,488\n", + "| | └─Sequential: 3-57 [-1, 1152, 7, 7] 31,104\n", + "| | └─Sequential: 3-58 [-1, 1152, 7, 7] 664,992\n", + "| | └─Sequential: 3-59 [-1, 192, 7, 7] 221,568\n", + "| └─MBConvBlock: 2-20 [-1, 320, 7, 7] --\n", + "| | └─Sequential: 3-60 [-1, 1152, 7, 7] 223,488\n", + "| | └─Sequential: 3-61 [-1, 1152, 7, 7] 12,672\n", + "| | └─Sequential: 3-62 [-1, 1152, 7, 7] 664,992\n", + "| | └─Sequential: 3-63 [-1, 320, 7, 7] 369,280\n", + "├─Sequential: 1-2 [-1, 1280, 7, 7] --\n", + "| └─Conv2d: 2-21 [-1, 1280, 7, 7] 409,600\n", + "| └─BatchNorm2d: 2-22 [-1, 1280, 7, 7] 2,560\n", "==========================================================================================\n", "Total params: 7,142,272\n", "Trainable params: 7,142,272\n", "Non-trainable params: 0\n", - "Total mult-adds (M): 657.05\n", + "Total mult-adds (M): 777.62\n", "==========================================================================================\n", "Input size (MB): 0.19\n", - "Forward/backward pass size (MB): 115.14\n", + "Forward/backward pass size (MB): 124.81\n", "Params size (MB): 27.25\n", - "Estimated Total Size (MB): 142.58\n", + "Estimated Total Size (MB): 152.24\n", "==========================================================================================\n" ] } |