* FLAVR: its 3D layers as 2D ones over the four frames — 31 times faster, on the GPU too
Browse files- README.md +7 -4
- flavr/body.bin +1 -1
- flavr/body.param +443 -111
- tools/flavr/export.py +74 -15
README.md
CHANGED
|
@@ -116,11 +116,13 @@ the weights loaded as tensors only. About 84 MB, weights as half floats:
|
|
| 116 |
| `body` | 4D: 3 channels x 4 frames x H x W, in 0..1, each channel's mean over the frames taken away | 64 x 4 x H x W |
|
| 117 |
| `head` | 256 x H x W: body's four times folded into channels, time major | 3 x H x W, the mean still away |
|
| 118 |
|
| 119 |
-
H and W multiples of 8. The in-between is that of the middle two frames.
|
| 120 |
-
|
| 121 |
-
|
|
|
|
|
|
|
| 122 |
|
| 123 |
-
Changes (Apache-2.0, 4b): converted to ncnn as above, weights as half floats. Licence: `LICENSE-FLAVR`.
|
| 124 |
|
| 125 |
## Other models used by MediaDroid
|
| 126 |
|
|
@@ -136,3 +138,4 @@ Bao), `LICENSE-dain-ncnn-vulkan` (Copyright (c) 2020 nihui). XVFI for research a
|
|
| 136 |
|
| 137 |
|
| 138 |
|
|
|
|
|
|
| 116 |
| `body` | 4D: 3 channels x 4 frames x H x W, in 0..1, each channel's mean over the frames taken away | 64 x 4 x H x W |
|
| 117 |
| `head` | 256 x H x W: body's four times folded into channels, time major | 3 x H x W, the mean still away |
|
| 118 |
|
| 119 |
+
H and W multiples of 8. The in-between is that of the middle two frames. The 3D layers are written as 2D ones over the
|
| 120 |
+
four frames — the frames either side of each stacked into its channels, the four frames one below the other with zero
|
| 121 |
+
rows between, one ordinary 2D layer, the weights stored once — so ncnn runs them on its fast 2D paths and on the GPU.
|
| 122 |
+
On the self-test's frames the in-between is off by 5.23 per value from the frame truly halfway (the PyTorch network
|
| 123 |
+
5.25, a blend 29.95); 1.5 s at 128 x 128 on a desktop CPU (46 s as ncnn's own 3D layers).
|
| 124 |
|
| 125 |
+
Changes (Apache-2.0, 4b): converted to ncnn as above — the 3D layers as 2D ones, their kernels' times as channels — weights as half floats. Licence: `LICENSE-FLAVR`.
|
| 126 |
|
| 127 |
## Other models used by MediaDroid
|
| 128 |
|
|
|
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
+
|
flavr/body.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 84077848
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c09b1938d55530e65aaec54f4c54022c38d52a2340b1bc40b8fa751f2b56350
|
| 3 |
size 84077848
|
flavr/body.param
CHANGED
|
@@ -1,113 +1,445 @@
|
|
| 1 |
7767517
|
| 2 |
-
|
| 3 |
Input in0 0 1 in0 0=0
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
BinaryOp
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
BinaryOp
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
BinaryOp
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
BinaryOp
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
Split
|
| 89 |
-
|
| 90 |
-
InnerProduct
|
| 91 |
-
BinaryOp
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
Split
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
BinaryOp
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
7767517
|
| 2 |
+
443 556
|
| 3 |
Input in0 0 1 in0 0=0
|
| 4 |
+
Split split_in0 1 5 in0 in0_0 in0_1 in0_2 in0_3 in0_4
|
| 5 |
+
Crop crop1 1 1 in0_0 b1 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 6 |
+
BinaryOp binaryop2 1 1 b1 b2 0=2 1=1 2=0.000000e+00
|
| 7 |
+
Crop crop3 1 1 in0_1 b3 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 8 |
+
Concat concat4 2 1 b2 b3 b4 0=1
|
| 9 |
+
Crop crop5 1 1 in0_2 b5 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 10 |
+
BinaryOp binaryop6 1 1 b5 b6 0=2 1=1 2=0.000000e+00
|
| 11 |
+
Crop crop7 1 1 in0_3 b7 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 12 |
+
Concat concat8 2 1 b7 b6 b8 0=1
|
| 13 |
+
Concat concat9 3 1 b4 in0_4 b8 b9 0=0
|
| 14 |
+
Padding padding10 1 1 b9 b10 0=0 1=4 2=0 3=0 4=0
|
| 15 |
+
Reshape reshape11 1 1 b10 b11 0=0 1=-1 2=9
|
| 16 |
+
Convolution convolution12 1 1 b11 b12 0=64 1=7 11=7 3=2 13=2 4=3 14=3 5=0 6=28224 9=1
|
| 17 |
+
Reshape reshape13 1 1 b12 b13 0=0 1=-1 11=4 2=64
|
| 18 |
+
Crop crop14 1 1 b13 b14 7=2 3=-233 4=-233 14=-233 5=-233
|
| 19 |
+
Split split_b14 1 7 b14 b14_0 b14_1 b14_2 b14_3 b14_4 b14_5 b14_6
|
| 20 |
+
Crop crop15 1 1 b14_0 b15 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 21 |
+
BinaryOp binaryop16 1 1 b15 b16 0=2 1=1 2=0.000000e+00
|
| 22 |
+
Crop crop17 1 1 b14_1 b17 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 23 |
+
Concat concat18 2 1 b16 b17 b18 0=1
|
| 24 |
+
Crop crop19 1 1 b14_2 b19 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 25 |
+
BinaryOp binaryop20 1 1 b19 b20 0=2 1=1 2=0.000000e+00
|
| 26 |
+
Crop crop21 1 1 b14_3 b21 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 27 |
+
Concat concat22 2 1 b21 b20 b22 0=1
|
| 28 |
+
Concat concat23 3 1 b18 b14_4 b22 b23 0=0
|
| 29 |
+
Padding padding24 1 1 b23 b24 0=0 1=1 2=0 3=0 4=0
|
| 30 |
+
Reshape reshape25 1 1 b24 b25 0=0 1=-1 2=192
|
| 31 |
+
Convolution convolution26 1 1 b25 b26 0=64 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=110592 9=1
|
| 32 |
+
Reshape reshape27 1 1 b26 b27 0=0 1=-1 11=4 2=64
|
| 33 |
+
Crop crop28 1 1 b27 b28 7=1 3=-233 4=-233 14=-233 5=-233
|
| 34 |
+
Split split_b28 1 5 b28 b28_0 b28_1 b28_2 b28_3 b28_4
|
| 35 |
+
Crop crop29 1 1 b28_0 b29 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 36 |
+
BinaryOp binaryop30 1 1 b29 b30 0=2 1=1 2=0.000000e+00
|
| 37 |
+
Crop crop31 1 1 b28_1 b31 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 38 |
+
Concat concat32 2 1 b30 b31 b32 0=1
|
| 39 |
+
Crop crop33 1 1 b28_2 b33 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 40 |
+
BinaryOp binaryop34 1 1 b33 b34 0=2 1=1 2=0.000000e+00
|
| 41 |
+
Crop crop35 1 1 b28_3 b35 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 42 |
+
Concat concat36 2 1 b35 b34 b36 0=1
|
| 43 |
+
Concat concat37 3 1 b32 b28_4 b36 b37 0=0
|
| 44 |
+
Padding padding38 1 1 b37 b38 0=0 1=1 2=0 3=0 4=0
|
| 45 |
+
Reshape reshape39 1 1 b38 b39 0=0 1=-1 2=192
|
| 46 |
+
Convolution convolution40 1 1 b39 b40 0=64 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=110592
|
| 47 |
+
Reshape reshape41 1 1 b40 b41 0=0 1=-1 11=4 2=64
|
| 48 |
+
Crop crop42 1 1 b41 b42 7=1 3=-233 4=-233 14=-233 5=-233
|
| 49 |
+
Reshape reshape43 1 1 b42 b43 0=0 1=-1 2=64
|
| 50 |
+
Split split_b43 1 2 b43 b43_0 b43_1
|
| 51 |
+
Pooling pooling44 1 1 b43_0 b44 0=1 4=1
|
| 52 |
+
InnerProduct innerproduct45 1 1 b44 b45 0=64 1=1 2=4096 9=4
|
| 53 |
+
BinaryOp binaryop46 2 1 b43_1 b45 b46 0=2
|
| 54 |
+
Reshape reshape47 1 1 b46 b47 0=0 1=-1 11=4 2=64
|
| 55 |
+
BinaryOp binaryop48 2 1 b47 b14_5 b48 0=0
|
| 56 |
+
ReLU relu49 1 1 b48 b49
|
| 57 |
+
Split split_b49 1 6 b49 b49_0 b49_1 b49_2 b49_3 b49_4 b49_5
|
| 58 |
+
Crop crop50 1 1 b49_0 b50 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 59 |
+
BinaryOp binaryop51 1 1 b50 b51 0=2 1=1 2=0.000000e+00
|
| 60 |
+
Crop crop52 1 1 b49_1 b52 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 61 |
+
Concat concat53 2 1 b51 b52 b53 0=1
|
| 62 |
+
Crop crop54 1 1 b49_2 b54 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 63 |
+
BinaryOp binaryop55 1 1 b54 b55 0=2 1=1 2=0.000000e+00
|
| 64 |
+
Crop crop56 1 1 b49_3 b56 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 65 |
+
Concat concat57 2 1 b56 b55 b57 0=1
|
| 66 |
+
Concat concat58 3 1 b53 b49_4 b57 b58 0=0
|
| 67 |
+
Padding padding59 1 1 b58 b59 0=0 1=1 2=0 3=0 4=0
|
| 68 |
+
Reshape reshape60 1 1 b59 b60 0=0 1=-1 2=192
|
| 69 |
+
Convolution convolution61 1 1 b60 b61 0=64 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=110592 9=1
|
| 70 |
+
Reshape reshape62 1 1 b61 b62 0=0 1=-1 11=4 2=64
|
| 71 |
+
Crop crop63 1 1 b62 b63 7=1 3=-233 4=-233 14=-233 5=-233
|
| 72 |
+
Split split_b63 1 5 b63 b63_0 b63_1 b63_2 b63_3 b63_4
|
| 73 |
+
Crop crop64 1 1 b63_0 b64 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 74 |
+
BinaryOp binaryop65 1 1 b64 b65 0=2 1=1 2=0.000000e+00
|
| 75 |
+
Crop crop66 1 1 b63_1 b66 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 76 |
+
Concat concat67 2 1 b65 b66 b67 0=1
|
| 77 |
+
Crop crop68 1 1 b63_2 b68 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 78 |
+
BinaryOp binaryop69 1 1 b68 b69 0=2 1=1 2=0.000000e+00
|
| 79 |
+
Crop crop70 1 1 b63_3 b70 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 80 |
+
Concat concat71 2 1 b70 b69 b71 0=1
|
| 81 |
+
Concat concat72 3 1 b67 b63_4 b71 b72 0=0
|
| 82 |
+
Padding padding73 1 1 b72 b73 0=0 1=1 2=0 3=0 4=0
|
| 83 |
+
Reshape reshape74 1 1 b73 b74 0=0 1=-1 2=192
|
| 84 |
+
Convolution convolution75 1 1 b74 b75 0=64 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=110592
|
| 85 |
+
Reshape reshape76 1 1 b75 b76 0=0 1=-1 11=4 2=64
|
| 86 |
+
Crop crop77 1 1 b76 b77 7=1 3=-233 4=-233 14=-233 5=-233
|
| 87 |
+
Reshape reshape78 1 1 b77 b78 0=0 1=-1 2=64
|
| 88 |
+
Split split_b78 1 2 b78 b78_0 b78_1
|
| 89 |
+
Pooling pooling79 1 1 b78_0 b79 0=1 4=1
|
| 90 |
+
InnerProduct innerproduct80 1 1 b79 b80 0=64 1=1 2=4096 9=4
|
| 91 |
+
BinaryOp binaryop81 2 1 b78_1 b80 b81 0=2
|
| 92 |
+
Reshape reshape82 1 1 b81 b82 0=0 1=-1 11=4 2=64
|
| 93 |
+
BinaryOp binaryop83 2 1 b82 b49_5 b83 0=0
|
| 94 |
+
ReLU relu84 1 1 b83 b84
|
| 95 |
+
Split split_b84 1 7 b84 b84_0 b84_1 b84_2 b84_3 b84_4 b84_5 b84_6
|
| 96 |
+
Crop crop85 1 1 b84_0 b85 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 97 |
+
BinaryOp binaryop86 1 1 b85 b86 0=2 1=1 2=0.000000e+00
|
| 98 |
+
Crop crop87 1 1 b84_1 b87 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 99 |
+
Concat concat88 2 1 b86 b87 b88 0=1
|
| 100 |
+
Crop crop89 1 1 b84_2 b89 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 101 |
+
BinaryOp binaryop90 1 1 b89 b90 0=2 1=1 2=0.000000e+00
|
| 102 |
+
Crop crop91 1 1 b84_3 b91 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 103 |
+
Concat concat92 2 1 b91 b90 b92 0=1
|
| 104 |
+
Concat concat93 3 1 b88 b84_4 b92 b93 0=0
|
| 105 |
+
Padding padding94 1 1 b93 b94 0=0 1=2 2=0 3=0 4=0
|
| 106 |
+
Reshape reshape95 1 1 b94 b95 0=0 1=-1 2=192
|
| 107 |
+
Convolution convolution96 1 1 b95 b96 0=128 1=3 11=3 3=2 13=2 4=1 14=1 5=0 6=221184 9=1
|
| 108 |
+
Reshape reshape97 1 1 b96 b97 0=0 1=-1 11=4 2=128
|
| 109 |
+
Crop crop98 1 1 b97 b98 7=1 3=-233 4=-233 14=-233 5=-233
|
| 110 |
+
Split split_b98 1 5 b98 b98_0 b98_1 b98_2 b98_3 b98_4
|
| 111 |
+
Crop crop99 1 1 b98_0 b99 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 112 |
+
BinaryOp binaryop100 1 1 b99 b100 0=2 1=1 2=0.000000e+00
|
| 113 |
+
Crop crop101 1 1 b98_1 b101 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 114 |
+
Concat concat102 2 1 b100 b101 b102 0=1
|
| 115 |
+
Crop crop103 1 1 b98_2 b103 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 116 |
+
BinaryOp binaryop104 1 1 b103 b104 0=2 1=1 2=0.000000e+00
|
| 117 |
+
Crop crop105 1 1 b98_3 b105 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 118 |
+
Concat concat106 2 1 b105 b104 b106 0=1
|
| 119 |
+
Concat concat107 3 1 b102 b98_4 b106 b107 0=0
|
| 120 |
+
Padding padding108 1 1 b107 b108 0=0 1=1 2=0 3=0 4=0
|
| 121 |
+
Reshape reshape109 1 1 b108 b109 0=0 1=-1 2=384
|
| 122 |
+
Convolution convolution110 1 1 b109 b110 0=128 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=442368
|
| 123 |
+
Reshape reshape111 1 1 b110 b111 0=0 1=-1 11=4 2=128
|
| 124 |
+
Crop crop112 1 1 b111 b112 7=1 3=-233 4=-233 14=-233 5=-233
|
| 125 |
+
Reshape reshape113 1 1 b112 b113 0=0 1=-1 2=128
|
| 126 |
+
Split split_b113 1 2 b113 b113_0 b113_1
|
| 127 |
+
Pooling pooling114 1 1 b113_0 b114 0=1 4=1
|
| 128 |
+
InnerProduct innerproduct115 1 1 b114 b115 0=128 1=1 2=16384 9=4
|
| 129 |
+
BinaryOp binaryop116 2 1 b113_1 b115 b116 0=2
|
| 130 |
+
Reshape reshape117 1 1 b116 b117 0=0 1=-1 11=4 2=128
|
| 131 |
+
Reshape reshape118 1 1 b84_5 b118 0=0 1=-1 2=64
|
| 132 |
+
Convolution convolution119 1 1 b118 b119 0=128 1=1 11=1 3=2 13=2 4=0 14=0 5=0 6=8192
|
| 133 |
+
Reshape reshape120 1 1 b119 b120 0=0 1=-1 11=4 2=128
|
| 134 |
+
BinaryOp binaryop121 2 1 b117 b120 b121 0=0
|
| 135 |
+
ReLU relu122 1 1 b121 b122
|
| 136 |
+
Split split_b122 1 6 b122 b122_0 b122_1 b122_2 b122_3 b122_4 b122_5
|
| 137 |
+
Crop crop123 1 1 b122_0 b123 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 138 |
+
BinaryOp binaryop124 1 1 b123 b124 0=2 1=1 2=0.000000e+00
|
| 139 |
+
Crop crop125 1 1 b122_1 b125 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 140 |
+
Concat concat126 2 1 b124 b125 b126 0=1
|
| 141 |
+
Crop crop127 1 1 b122_2 b127 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 142 |
+
BinaryOp binaryop128 1 1 b127 b128 0=2 1=1 2=0.000000e+00
|
| 143 |
+
Crop crop129 1 1 b122_3 b129 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 144 |
+
Concat concat130 2 1 b129 b128 b130 0=1
|
| 145 |
+
Concat concat131 3 1 b126 b122_4 b130 b131 0=0
|
| 146 |
+
Padding padding132 1 1 b131 b132 0=0 1=1 2=0 3=0 4=0
|
| 147 |
+
Reshape reshape133 1 1 b132 b133 0=0 1=-1 2=384
|
| 148 |
+
Convolution convolution134 1 1 b133 b134 0=128 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=442368 9=1
|
| 149 |
+
Reshape reshape135 1 1 b134 b135 0=0 1=-1 11=4 2=128
|
| 150 |
+
Crop crop136 1 1 b135 b136 7=1 3=-233 4=-233 14=-233 5=-233
|
| 151 |
+
Split split_b136 1 5 b136 b136_0 b136_1 b136_2 b136_3 b136_4
|
| 152 |
+
Crop crop137 1 1 b136_0 b137 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 153 |
+
BinaryOp binaryop138 1 1 b137 b138 0=2 1=1 2=0.000000e+00
|
| 154 |
+
Crop crop139 1 1 b136_1 b139 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 155 |
+
Concat concat140 2 1 b138 b139 b140 0=1
|
| 156 |
+
Crop crop141 1 1 b136_2 b141 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 157 |
+
BinaryOp binaryop142 1 1 b141 b142 0=2 1=1 2=0.000000e+00
|
| 158 |
+
Crop crop143 1 1 b136_3 b143 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 159 |
+
Concat concat144 2 1 b143 b142 b144 0=1
|
| 160 |
+
Concat concat145 3 1 b140 b136_4 b144 b145 0=0
|
| 161 |
+
Padding padding146 1 1 b145 b146 0=0 1=1 2=0 3=0 4=0
|
| 162 |
+
Reshape reshape147 1 1 b146 b147 0=0 1=-1 2=384
|
| 163 |
+
Convolution convolution148 1 1 b147 b148 0=128 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=442368
|
| 164 |
+
Reshape reshape149 1 1 b148 b149 0=0 1=-1 11=4 2=128
|
| 165 |
+
Crop crop150 1 1 b149 b150 7=1 3=-233 4=-233 14=-233 5=-233
|
| 166 |
+
Reshape reshape151 1 1 b150 b151 0=0 1=-1 2=128
|
| 167 |
+
Split split_b151 1 2 b151 b151_0 b151_1
|
| 168 |
+
Pooling pooling152 1 1 b151_0 b152 0=1 4=1
|
| 169 |
+
InnerProduct innerproduct153 1 1 b152 b153 0=128 1=1 2=16384 9=4
|
| 170 |
+
BinaryOp binaryop154 2 1 b151_1 b153 b154 0=2
|
| 171 |
+
Reshape reshape155 1 1 b154 b155 0=0 1=-1 11=4 2=128
|
| 172 |
+
BinaryOp binaryop156 2 1 b155 b122_5 b156 0=0
|
| 173 |
+
ReLU relu157 1 1 b156 b157
|
| 174 |
+
Split split_b157 1 7 b157 b157_0 b157_1 b157_2 b157_3 b157_4 b157_5 b157_6
|
| 175 |
+
Crop crop158 1 1 b157_0 b158 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 176 |
+
BinaryOp binaryop159 1 1 b158 b159 0=2 1=1 2=0.000000e+00
|
| 177 |
+
Crop crop160 1 1 b157_1 b160 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 178 |
+
Concat concat161 2 1 b159 b160 b161 0=1
|
| 179 |
+
Crop crop162 1 1 b157_2 b162 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 180 |
+
BinaryOp binaryop163 1 1 b162 b163 0=2 1=1 2=0.000000e+00
|
| 181 |
+
Crop crop164 1 1 b157_3 b164 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 182 |
+
Concat concat165 2 1 b164 b163 b165 0=1
|
| 183 |
+
Concat concat166 3 1 b161 b157_4 b165 b166 0=0
|
| 184 |
+
Padding padding167 1 1 b166 b167 0=0 1=2 2=0 3=0 4=0
|
| 185 |
+
Reshape reshape168 1 1 b167 b168 0=0 1=-1 2=384
|
| 186 |
+
Convolution convolution169 1 1 b168 b169 0=256 1=3 11=3 3=2 13=2 4=1 14=1 5=0 6=884736 9=1
|
| 187 |
+
Reshape reshape170 1 1 b169 b170 0=0 1=-1 11=4 2=256
|
| 188 |
+
Crop crop171 1 1 b170 b171 7=1 3=-233 4=-233 14=-233 5=-233
|
| 189 |
+
Split split_b171 1 5 b171 b171_0 b171_1 b171_2 b171_3 b171_4
|
| 190 |
+
Crop crop172 1 1 b171_0 b172 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 191 |
+
BinaryOp binaryop173 1 1 b172 b173 0=2 1=1 2=0.000000e+00
|
| 192 |
+
Crop crop174 1 1 b171_1 b174 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 193 |
+
Concat concat175 2 1 b173 b174 b175 0=1
|
| 194 |
+
Crop crop176 1 1 b171_2 b176 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 195 |
+
BinaryOp binaryop177 1 1 b176 b177 0=2 1=1 2=0.000000e+00
|
| 196 |
+
Crop crop178 1 1 b171_3 b178 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 197 |
+
Concat concat179 2 1 b178 b177 b179 0=1
|
| 198 |
+
Concat concat180 3 1 b175 b171_4 b179 b180 0=0
|
| 199 |
+
Padding padding181 1 1 b180 b181 0=0 1=1 2=0 3=0 4=0
|
| 200 |
+
Reshape reshape182 1 1 b181 b182 0=0 1=-1 2=768
|
| 201 |
+
Convolution convolution183 1 1 b182 b183 0=256 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=1769472
|
| 202 |
+
Reshape reshape184 1 1 b183 b184 0=0 1=-1 11=4 2=256
|
| 203 |
+
Crop crop185 1 1 b184 b185 7=1 3=-233 4=-233 14=-233 5=-233
|
| 204 |
+
Reshape reshape186 1 1 b185 b186 0=0 1=-1 2=256
|
| 205 |
+
Split split_b186 1 2 b186 b186_0 b186_1
|
| 206 |
+
Pooling pooling187 1 1 b186_0 b187 0=1 4=1
|
| 207 |
+
InnerProduct innerproduct188 1 1 b187 b188 0=256 1=1 2=65536 9=4
|
| 208 |
+
BinaryOp binaryop189 2 1 b186_1 b188 b189 0=2
|
| 209 |
+
Reshape reshape190 1 1 b189 b190 0=0 1=-1 11=4 2=256
|
| 210 |
+
Reshape reshape191 1 1 b157_5 b191 0=0 1=-1 2=128
|
| 211 |
+
Convolution convolution192 1 1 b191 b192 0=256 1=1 11=1 3=2 13=2 4=0 14=0 5=0 6=32768
|
| 212 |
+
Reshape reshape193 1 1 b192 b193 0=0 1=-1 11=4 2=256
|
| 213 |
+
BinaryOp binaryop194 2 1 b190 b193 b194 0=0
|
| 214 |
+
ReLU relu195 1 1 b194 b195
|
| 215 |
+
Split split_b195 1 6 b195 b195_0 b195_1 b195_2 b195_3 b195_4 b195_5
|
| 216 |
+
Crop crop196 1 1 b195_0 b196 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 217 |
+
BinaryOp binaryop197 1 1 b196 b197 0=2 1=1 2=0.000000e+00
|
| 218 |
+
Crop crop198 1 1 b195_1 b198 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 219 |
+
Concat concat199 2 1 b197 b198 b199 0=1
|
| 220 |
+
Crop crop200 1 1 b195_2 b200 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 221 |
+
BinaryOp binaryop201 1 1 b200 b201 0=2 1=1 2=0.000000e+00
|
| 222 |
+
Crop crop202 1 1 b195_3 b202 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 223 |
+
Concat concat203 2 1 b202 b201 b203 0=1
|
| 224 |
+
Concat concat204 3 1 b199 b195_4 b203 b204 0=0
|
| 225 |
+
Padding padding205 1 1 b204 b205 0=0 1=1 2=0 3=0 4=0
|
| 226 |
+
Reshape reshape206 1 1 b205 b206 0=0 1=-1 2=768
|
| 227 |
+
Convolution convolution207 1 1 b206 b207 0=256 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=1769472 9=1
|
| 228 |
+
Reshape reshape208 1 1 b207 b208 0=0 1=-1 11=4 2=256
|
| 229 |
+
Crop crop209 1 1 b208 b209 7=1 3=-233 4=-233 14=-233 5=-233
|
| 230 |
+
Split split_b209 1 5 b209 b209_0 b209_1 b209_2 b209_3 b209_4
|
| 231 |
+
Crop crop210 1 1 b209_0 b210 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 232 |
+
BinaryOp binaryop211 1 1 b210 b211 0=2 1=1 2=0.000000e+00
|
| 233 |
+
Crop crop212 1 1 b209_1 b212 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 234 |
+
Concat concat213 2 1 b211 b212 b213 0=1
|
| 235 |
+
Crop crop214 1 1 b209_2 b214 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 236 |
+
BinaryOp binaryop215 1 1 b214 b215 0=2 1=1 2=0.000000e+00
|
| 237 |
+
Crop crop216 1 1 b209_3 b216 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 238 |
+
Concat concat217 2 1 b216 b215 b217 0=1
|
| 239 |
+
Concat concat218 3 1 b213 b209_4 b217 b218 0=0
|
| 240 |
+
Padding padding219 1 1 b218 b219 0=0 1=1 2=0 3=0 4=0
|
| 241 |
+
Reshape reshape220 1 1 b219 b220 0=0 1=-1 2=768
|
| 242 |
+
Convolution convolution221 1 1 b220 b221 0=256 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=1769472
|
| 243 |
+
Reshape reshape222 1 1 b221 b222 0=0 1=-1 11=4 2=256
|
| 244 |
+
Crop crop223 1 1 b222 b223 7=1 3=-233 4=-233 14=-233 5=-233
|
| 245 |
+
Reshape reshape224 1 1 b223 b224 0=0 1=-1 2=256
|
| 246 |
+
Split split_b224 1 2 b224 b224_0 b224_1
|
| 247 |
+
Pooling pooling225 1 1 b224_0 b225 0=1 4=1
|
| 248 |
+
InnerProduct innerproduct226 1 1 b225 b226 0=256 1=1 2=65536 9=4
|
| 249 |
+
BinaryOp binaryop227 2 1 b224_1 b226 b227 0=2
|
| 250 |
+
Reshape reshape228 1 1 b227 b228 0=0 1=-1 11=4 2=256
|
| 251 |
+
BinaryOp binaryop229 2 1 b228 b195_5 b229 0=0
|
| 252 |
+
ReLU relu230 1 1 b229 b230
|
| 253 |
+
Split split_b230 1 7 b230 b230_0 b230_1 b230_2 b230_3 b230_4 b230_5 b230_6
|
| 254 |
+
Crop crop231 1 1 b230_0 b231 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 255 |
+
BinaryOp binaryop232 1 1 b231 b232 0=2 1=1 2=0.000000e+00
|
| 256 |
+
Crop crop233 1 1 b230_1 b233 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 257 |
+
Concat concat234 2 1 b232 b233 b234 0=1
|
| 258 |
+
Crop crop235 1 1 b230_2 b235 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 259 |
+
BinaryOp binaryop236 1 1 b235 b236 0=2 1=1 2=0.000000e+00
|
| 260 |
+
Crop crop237 1 1 b230_3 b237 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 261 |
+
Concat concat238 2 1 b237 b236 b238 0=1
|
| 262 |
+
Concat concat239 3 1 b234 b230_4 b238 b239 0=0
|
| 263 |
+
Padding padding240 1 1 b239 b240 0=0 1=1 2=0 3=0 4=0
|
| 264 |
+
Reshape reshape241 1 1 b240 b241 0=0 1=-1 2=768
|
| 265 |
+
Convolution convolution242 1 1 b241 b242 0=512 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=3538944 9=1
|
| 266 |
+
Reshape reshape243 1 1 b242 b243 0=0 1=-1 11=4 2=512
|
| 267 |
+
Crop crop244 1 1 b243 b244 7=1 3=-233 4=-233 14=-233 5=-233
|
| 268 |
+
Split split_b244 1 5 b244 b244_0 b244_1 b244_2 b244_3 b244_4
|
| 269 |
+
Crop crop245 1 1 b244_0 b245 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 270 |
+
BinaryOp binaryop246 1 1 b245 b246 0=2 1=1 2=0.000000e+00
|
| 271 |
+
Crop crop247 1 1 b244_1 b247 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 272 |
+
Concat concat248 2 1 b246 b247 b248 0=1
|
| 273 |
+
Crop crop249 1 1 b244_2 b249 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 274 |
+
BinaryOp binaryop250 1 1 b249 b250 0=2 1=1 2=0.000000e+00
|
| 275 |
+
Crop crop251 1 1 b244_3 b251 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 276 |
+
Concat concat252 2 1 b251 b250 b252 0=1
|
| 277 |
+
Concat concat253 3 1 b248 b244_4 b252 b253 0=0
|
| 278 |
+
Padding padding254 1 1 b253 b254 0=0 1=1 2=0 3=0 4=0
|
| 279 |
+
Reshape reshape255 1 1 b254 b255 0=0 1=-1 2=1536
|
| 280 |
+
Convolution convolution256 1 1 b255 b256 0=512 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=7077888
|
| 281 |
+
Reshape reshape257 1 1 b256 b257 0=0 1=-1 11=4 2=512
|
| 282 |
+
Crop crop258 1 1 b257 b258 7=1 3=-233 4=-233 14=-233 5=-233
|
| 283 |
+
Reshape reshape259 1 1 b258 b259 0=0 1=-1 2=512
|
| 284 |
+
Split split_b259 1 2 b259 b259_0 b259_1
|
| 285 |
+
Pooling pooling260 1 1 b259_0 b260 0=1 4=1
|
| 286 |
+
InnerProduct innerproduct261 1 1 b260 b261 0=512 1=1 2=262144 9=4
|
| 287 |
+
BinaryOp binaryop262 2 1 b259_1 b261 b262 0=2
|
| 288 |
+
Reshape reshape263 1 1 b262 b263 0=0 1=-1 11=4 2=512
|
| 289 |
+
Reshape reshape264 1 1 b230_5 b264 0=0 1=-1 2=256
|
| 290 |
+
Convolution convolution265 1 1 b264 b265 0=512 1=1 11=1 3=1 13=1 4=0 14=0 5=0 6=131072
|
| 291 |
+
Reshape reshape266 1 1 b265 b266 0=0 1=-1 11=4 2=512
|
| 292 |
+
BinaryOp binaryop267 2 1 b263 b266 b267 0=0
|
| 293 |
+
ReLU relu268 1 1 b267 b268
|
| 294 |
+
Split split_b268 1 6 b268 b268_0 b268_1 b268_2 b268_3 b268_4 b268_5
|
| 295 |
+
Crop crop269 1 1 b268_0 b269 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 296 |
+
BinaryOp binaryop270 1 1 b269 b270 0=2 1=1 2=0.000000e+00
|
| 297 |
+
Crop crop271 1 1 b268_1 b271 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 298 |
+
Concat concat272 2 1 b270 b271 b272 0=1
|
| 299 |
+
Crop crop273 1 1 b268_2 b273 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 300 |
+
BinaryOp binaryop274 1 1 b273 b274 0=2 1=1 2=0.000000e+00
|
| 301 |
+
Crop crop275 1 1 b268_3 b275 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 302 |
+
Concat concat276 2 1 b275 b274 b276 0=1
|
| 303 |
+
Concat concat277 3 1 b272 b268_4 b276 b277 0=0
|
| 304 |
+
Padding padding278 1 1 b277 b278 0=0 1=1 2=0 3=0 4=0
|
| 305 |
+
Reshape reshape279 1 1 b278 b279 0=0 1=-1 2=1536
|
| 306 |
+
Convolution convolution280 1 1 b279 b280 0=512 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=7077888 9=1
|
| 307 |
+
Reshape reshape281 1 1 b280 b281 0=0 1=-1 11=4 2=512
|
| 308 |
+
Crop crop282 1 1 b281 b282 7=1 3=-233 4=-233 14=-233 5=-233
|
| 309 |
+
Split split_b282 1 5 b282 b282_0 b282_1 b282_2 b282_3 b282_4
|
| 310 |
+
Crop crop283 1 1 b282_0 b283 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 311 |
+
BinaryOp binaryop284 1 1 b283 b284 0=2 1=1 2=0.000000e+00
|
| 312 |
+
Crop crop285 1 1 b282_1 b285 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 313 |
+
Concat concat286 2 1 b284 b285 b286 0=1
|
| 314 |
+
Crop crop287 1 1 b282_2 b287 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 315 |
+
BinaryOp binaryop288 1 1 b287 b288 0=2 1=1 2=0.000000e+00
|
| 316 |
+
Crop crop289 1 1 b282_3 b289 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 317 |
+
Concat concat290 2 1 b289 b288 b290 0=1
|
| 318 |
+
Concat concat291 3 1 b286 b282_4 b290 b291 0=0
|
| 319 |
+
Padding padding292 1 1 b291 b292 0=0 1=1 2=0 3=0 4=0
|
| 320 |
+
Reshape reshape293 1 1 b292 b293 0=0 1=-1 2=1536
|
| 321 |
+
Convolution convolution294 1 1 b293 b294 0=512 1=3 11=3 3=1 13=1 4=1 14=1 5=0 6=7077888
|
| 322 |
+
Reshape reshape295 1 1 b294 b295 0=0 1=-1 11=4 2=512
|
| 323 |
+
Crop crop296 1 1 b295 b296 7=1 3=-233 4=-233 14=-233 5=-233
|
| 324 |
+
Reshape reshape297 1 1 b296 b297 0=0 1=-1 2=512
|
| 325 |
+
Split split_b297 1 2 b297 b297_0 b297_1
|
| 326 |
+
Pooling pooling298 1 1 b297_0 b298 0=1 4=1
|
| 327 |
+
InnerProduct innerproduct299 1 1 b298 b299 0=512 1=1 2=262144 9=4
|
| 328 |
+
BinaryOp binaryop300 2 1 b297_1 b299 b300 0=2
|
| 329 |
+
Reshape reshape301 1 1 b300 b301 0=0 1=-1 11=4 2=512
|
| 330 |
+
BinaryOp binaryop302 2 1 b301 b268_5 b302 0=0
|
| 331 |
+
ReLU relu303 1 1 b302 b303
|
| 332 |
+
Split split_b303 1 5 b303 b303_0 b303_1 b303_2 b303_3 b303_4
|
| 333 |
+
Crop crop304 1 1 b303_0 b304 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 334 |
+
BinaryOp binaryop305 1 1 b304 b305 0=2 1=1 2=0.000000e+00
|
| 335 |
+
Crop crop306 1 1 b303_1 b306 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 336 |
+
Concat concat307 2 1 b305 b306 b307 0=1
|
| 337 |
+
Crop crop308 1 1 b303_2 b308 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 338 |
+
BinaryOp binaryop309 1 1 b308 b309 0=2 1=1 2=0.000000e+00
|
| 339 |
+
Crop crop310 1 1 b303_3 b310 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 340 |
+
Concat concat311 2 1 b310 b309 b311 0=1
|
| 341 |
+
Concat concat312 3 1 b307 b303_4 b311 b312 0=0
|
| 342 |
+
Padding padding313 1 1 b312 b313 0=0 1=1 2=0 3=0 4=0
|
| 343 |
+
Reshape reshape314 1 1 b313 b314 0=0 1=-1 2=1536
|
| 344 |
+
Convolution convolution315 1 1 b314 b315 0=256 1=3 11=3 3=1 13=1 4=1 14=1 5=1 6=3538944
|
| 345 |
+
Reshape reshape316 1 1 b315 b316 0=0 1=-1 11=4 2=256
|
| 346 |
+
Crop crop317 1 1 b316 b317 7=1 3=-233 4=-233 14=-233 5=-233
|
| 347 |
+
Reshape reshape318 1 1 b317 b318 0=0 1=-1 2=256
|
| 348 |
+
Split split_b318 1 2 b318 b318_0 b318_1
|
| 349 |
+
Pooling pooling319 1 1 b318_0 b319 0=1 4=1
|
| 350 |
+
InnerProduct innerproduct320 1 1 b319 b320 0=256 1=1 2=65536 9=4
|
| 351 |
+
BinaryOp binaryop321 2 1 b318_1 b320 b321 0=2
|
| 352 |
+
Reshape reshape322 1 1 b321 b322 0=0 1=-1 11=4 2=256
|
| 353 |
+
ReLU relu323 1 1 b322 b323 0=2.000000e-01
|
| 354 |
+
Concat concat324 2 1 b323 b230_6 b324 0=0
|
| 355 |
+
Split split_b324 1 5 b324 b324_0 b324_1 b324_2 b324_3 b324_4
|
| 356 |
+
Crop crop325 1 1 b324_0 b325 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 357 |
+
BinaryOp binaryop326 1 1 b325 b326 0=2 1=1 2=0.000000e+00
|
| 358 |
+
Crop crop327 1 1 b324_1 b327 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 359 |
+
Concat concat328 2 1 b326 b327 b328 0=1
|
| 360 |
+
Crop crop329 1 1 b324_2 b329 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 361 |
+
BinaryOp binaryop330 1 1 b329 b330 0=2 1=1 2=0.000000e+00
|
| 362 |
+
Crop crop331 1 1 b324_3 b331 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 363 |
+
Concat concat332 2 1 b331 b330 b332 0=1
|
| 364 |
+
Concat concat333 3 1 b332 b324_4 b328 b333 0=0
|
| 365 |
+
Padding padding334 1 1 b333 b334 0=0 1=1 2=0 3=0 4=0
|
| 366 |
+
Reshape reshape335 1 1 b334 b335 0=0 1=-1 2=1536
|
| 367 |
+
Deconvolution deconvolution336 1 1 b335 b336 0=128 1=4 11=4 3=2 13=2 4=1 14=1 5=1 6=3145728
|
| 368 |
+
Reshape reshape337 1 1 b336 b337 0=0 1=-1 11=4 2=128
|
| 369 |
+
Crop crop338 1 1 b337 b338 7=2 3=-233 4=-233 14=-233 5=-233
|
| 370 |
+
Reshape reshape339 1 1 b338 b339 0=0 1=-1 2=128
|
| 371 |
+
Split split_b339 1 2 b339 b339_0 b339_1
|
| 372 |
+
Pooling pooling340 1 1 b339_0 b340 0=1 4=1
|
| 373 |
+
InnerProduct innerproduct341 1 1 b340 b341 0=128 1=1 2=16384 9=4
|
| 374 |
+
BinaryOp binaryop342 2 1 b339_1 b341 b342 0=2
|
| 375 |
+
Reshape reshape343 1 1 b342 b343 0=0 1=-1 11=4 2=128
|
| 376 |
+
ReLU relu344 1 1 b343 b344 0=2.000000e-01
|
| 377 |
+
Concat concat345 2 1 b344 b157_6 b345 0=0
|
| 378 |
+
Split split_b345 1 5 b345 b345_0 b345_1 b345_2 b345_3 b345_4
|
| 379 |
+
Crop crop346 1 1 b345_0 b346 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 380 |
+
BinaryOp binaryop347 1 1 b346 b347 0=2 1=1 2=0.000000e+00
|
| 381 |
+
Crop crop348 1 1 b345_1 b348 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 382 |
+
Concat concat349 2 1 b347 b348 b349 0=1
|
| 383 |
+
Crop crop350 1 1 b345_2 b350 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 384 |
+
BinaryOp binaryop351 1 1 b350 b351 0=2 1=1 2=0.000000e+00
|
| 385 |
+
Crop crop352 1 1 b345_3 b352 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 386 |
+
Concat concat353 2 1 b352 b351 b353 0=1
|
| 387 |
+
Concat concat354 3 1 b353 b345_4 b349 b354 0=0
|
| 388 |
+
Padding padding355 1 1 b354 b355 0=0 1=1 2=0 3=0 4=0
|
| 389 |
+
Reshape reshape356 1 1 b355 b356 0=0 1=-1 2=768
|
| 390 |
+
Deconvolution deconvolution357 1 1 b356 b357 0=64 1=4 11=4 3=2 13=2 4=1 14=1 5=1 6=786432
|
| 391 |
+
Reshape reshape358 1 1 b357 b358 0=0 1=-1 11=4 2=64
|
| 392 |
+
Crop crop359 1 1 b358 b359 7=2 3=-233 4=-233 14=-233 5=-233
|
| 393 |
+
Reshape reshape360 1 1 b359 b360 0=0 1=-1 2=64
|
| 394 |
+
Split split_b360 1 2 b360 b360_0 b360_1
|
| 395 |
+
Pooling pooling361 1 1 b360_0 b361 0=1 4=1
|
| 396 |
+
InnerProduct innerproduct362 1 1 b361 b362 0=64 1=1 2=4096 9=4
|
| 397 |
+
BinaryOp binaryop363 2 1 b360_1 b362 b363 0=2
|
| 398 |
+
Reshape reshape364 1 1 b363 b364 0=0 1=-1 11=4 2=64
|
| 399 |
+
ReLU relu365 1 1 b364 b365 0=2.000000e-01
|
| 400 |
+
Concat concat366 2 1 b365 b84_6 b366 0=0
|
| 401 |
+
Split split_b366 1 5 b366 b366_0 b366_1 b366_2 b366_3 b366_4
|
| 402 |
+
Crop crop367 1 1 b366_0 b367 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 403 |
+
BinaryOp binaryop368 1 1 b367 b368 0=2 1=1 2=0.000000e+00
|
| 404 |
+
Crop crop369 1 1 b366_1 b369 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 405 |
+
Concat concat370 2 1 b368 b369 b370 0=1
|
| 406 |
+
Crop crop371 1 1 b366_2 b371 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 407 |
+
BinaryOp binaryop372 1 1 b371 b372 0=2 1=1 2=0.000000e+00
|
| 408 |
+
Crop crop373 1 1 b366_3 b373 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 409 |
+
Concat concat374 2 1 b373 b372 b374 0=1
|
| 410 |
+
Concat concat375 3 1 b370 b366_4 b374 b375 0=0
|
| 411 |
+
Padding padding376 1 1 b375 b376 0=0 1=1 2=0 3=0 4=0
|
| 412 |
+
Reshape reshape377 1 1 b376 b377 0=0 1=-1 2=384
|
| 413 |
+
Convolution convolution378 1 1 b377 b378 0=64 1=3 11=3 3=1 13=1 4=1 14=1 5=1 6=221184
|
| 414 |
+
Reshape reshape379 1 1 b378 b379 0=0 1=-1 11=4 2=64
|
| 415 |
+
Crop crop380 1 1 b379 b380 7=1 3=-233 4=-233 14=-233 5=-233
|
| 416 |
+
Reshape reshape381 1 1 b380 b381 0=0 1=-1 2=64
|
| 417 |
+
Split split_b381 1 2 b381 b381_0 b381_1
|
| 418 |
+
Pooling pooling382 1 1 b381_0 b382 0=1 4=1
|
| 419 |
+
InnerProduct innerproduct383 1 1 b382 b383 0=64 1=1 2=4096 9=4
|
| 420 |
+
BinaryOp binaryop384 2 1 b381_1 b383 b384 0=2
|
| 421 |
+
Reshape reshape385 1 1 b384 b385 0=0 1=-1 11=4 2=64
|
| 422 |
+
ReLU relu386 1 1 b385 b386 0=2.000000e-01
|
| 423 |
+
Concat concat387 2 1 b386 b14_6 b387 0=0
|
| 424 |
+
Split split_b387 1 5 b387 b387_0 b387_1 b387_2 b387_3 b387_4
|
| 425 |
+
Crop crop388 1 1 b387_0 b388 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 426 |
+
BinaryOp binaryop389 1 1 b388 b389 0=2 1=1 2=0.000000e+00
|
| 427 |
+
Crop crop390 1 1 b387_1 b390 13=0 15=1 3=-233 4=-233 14=-233 5=-233
|
| 428 |
+
Concat concat391 2 1 b389 b390 b391 0=1
|
| 429 |
+
Crop crop392 1 1 b387_2 b392 13=0 15=3 3=-233 4=-233 14=-233 5=-233
|
| 430 |
+
BinaryOp binaryop393 1 1 b392 b393 0=2 1=1 2=0.000000e+00
|
| 431 |
+
Crop crop394 1 1 b387_3 b394 13=1 15=0 3=-233 4=-233 14=-233 5=-233
|
| 432 |
+
Concat concat395 2 1 b394 b393 b395 0=1
|
| 433 |
+
Concat concat396 3 1 b395 b387_4 b391 b396 0=0
|
| 434 |
+
Padding padding397 1 1 b396 b397 0=0 1=1 2=0 3=0 4=0
|
| 435 |
+
Reshape reshape398 1 1 b397 b398 0=0 1=-1 2=384
|
| 436 |
+
Deconvolution deconvolution399 1 1 b398 b399 0=64 1=4 11=4 3=2 13=2 4=1 14=1 5=1 6=393216
|
| 437 |
+
Reshape reshape400 1 1 b399 b400 0=0 1=-1 11=4 2=64
|
| 438 |
+
Crop crop401 1 1 b400 b401 7=2 3=-233 4=-233 14=-233 5=-233
|
| 439 |
+
Reshape reshape402 1 1 b401 b402 0=0 1=-1 2=64
|
| 440 |
+
Split split_b402 1 2 b402 b402_0 b402_1
|
| 441 |
+
Pooling pooling403 1 1 b402_0 b403 0=1 4=1
|
| 442 |
+
InnerProduct innerproduct404 1 1 b403 b404 0=64 1=1 2=4096 9=4
|
| 443 |
+
BinaryOp binaryop405 2 1 b402_1 b404 b405 0=2
|
| 444 |
+
Reshape reshape406 1 1 b405 b406 0=0 1=-1 11=4 2=64
|
| 445 |
+
ReLU relu407 1 1 b406 out 0=2.000000e-01
|
tools/flavr/export.py
CHANGED
|
@@ -4,8 +4,9 @@
|
|
| 4 |
body in0 (4D: 3 channels x 4 frames x H x W, their mean taken away) -> out (64 x 4 x H x W)
|
| 5 |
head in0 (256 x H x W: body's four times folded into channels, time major) -> out (3 x H x W, mean still away)
|
| 6 |
|
| 7 |
-
The 3D layers are
|
| 8 |
-
|
|
|
|
| 9 |
"""
|
| 10 |
import os
|
| 11 |
import struct
|
|
@@ -17,6 +18,8 @@ import torch.nn as nn
|
|
| 17 |
|
| 18 |
from flavr_net import BasicBlock, SEGating, load
|
| 19 |
|
|
|
|
|
|
|
| 20 |
|
| 21 |
class Graph:
|
| 22 |
"""An ncnn network written layer by layer: a Split added where a blob feeds more than one layer."""
|
|
@@ -47,41 +50,97 @@ class Graph:
|
|
| 47 |
def floats(self, b):
|
| 48 |
self.weights += b.detach().float().numpy().astype("<f4").tobytes()
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
def conv3d(self, x, conv, act=0):
|
| 51 |
out_c, in_c, kd, kh, kw = conv.weight.shape
|
| 52 |
sd, sh, sw = conv.stride
|
| 53 |
pd, ph, pw = conv.padding
|
|
|
|
| 54 |
bias = conv.bias is not None
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
if act == 1:
|
| 58 |
p += " 9=1"
|
| 59 |
-
y = self.layer("
|
| 60 |
-
self.half(
|
| 61 |
if bias:
|
| 62 |
self.floats(conv.bias)
|
| 63 |
-
return y
|
| 64 |
|
| 65 |
def deconv3d(self, x, conv):
|
| 66 |
in_c, out_c, kd, kh, kw = conv.weight.shape
|
| 67 |
sd, sh, sw = conv.stride
|
| 68 |
pd, ph, pw = conv.padding
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
# ncnn takes a transposed
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
self.floats(conv.bias)
|
| 75 |
-
return y
|
| 76 |
|
| 77 |
def se(self, x, gating):
|
| 78 |
conv = gating.attn_layer[0]
|
| 79 |
c = conv.weight.shape[0]
|
| 80 |
-
|
|
|
|
|
|
|
| 81 |
attention = self.layer("InnerProduct", [pooled], f"0={c} 1=1 2={c * c} 9=4")
|
| 82 |
self.half(conv.weight.reshape(c, c))
|
| 83 |
self.floats(conv.bias)
|
| 84 |
-
return self.layer("BinaryOp", [
|
| 85 |
|
| 86 |
def relu(self, x, slope=0.0):
|
| 87 |
return self.layer("ReLU", [x], f"0={slope:.6e}" if slope else "")
|
|
|
|
| 4 |
body in0 (4D: 3 channels x 4 frames x H x W, their mean taken away) -> out (64 x 4 x H x W)
|
| 5 |
head in0 (256 x H x W: body's four times folded into channels, time major) -> out (3 x H x W, mean still away)
|
| 6 |
|
| 7 |
+
The 3D layers are written as 2D ones over the four frames (see Graph.conv3d), so ncnn runs them on its fast 2D paths
|
| 8 |
+
and its GPU, the weights stored once; SE gating is a global average, an InnerProduct with a sigmoid and a per-channel
|
| 9 |
+
multiplication. The weights load as tensors only.
|
| 10 |
"""
|
| 11 |
import os
|
| 12 |
import struct
|
|
|
|
| 18 |
|
| 19 |
from flavr_net import BasicBlock, SEGating, load
|
| 20 |
|
| 21 |
+
FRAMES = 4
|
| 22 |
+
|
| 23 |
|
| 24 |
class Graph:
|
| 25 |
"""An ncnn network written layer by layer: a Split added where a blob feeds more than one layer."""
|
|
|
|
| 50 |
def floats(self, b):
|
| 51 |
self.weights += b.detach().float().numpy().astype("<f4").tobytes()
|
| 52 |
|
| 53 |
+
# Crop's sizes not limited (its default, 0, would leave nothing): only the offsets cut.
|
| 54 |
+
WHOLE = "3=-233 4=-233 14=-233 5=-233"
|
| 55 |
+
|
| 56 |
+
# The 3D layers as 2D ones. A blob is 4D — width, height, the four frames (ncnn's depth), channels. For a layer
|
| 57 |
+
# with a temporal kernel of 3, the frames before and after each are stacked into its channels (zeros beyond the
|
| 58 |
+
# first and the last), so the time part of the kernel becomes channels of a 2D one; each frame gets zero rows below
|
| 59 |
+
# it, enough that the 2D kernel cannot reach from one frame into the next; the four frames are put one below the
|
| 60 |
+
# other as one tall picture for an ordinary 2D layer — ncnn's fast paths, its GPU among them, the weights stored
|
| 61 |
+
# once — and the result put back into frames, the rows added cut away.
|
| 62 |
+
|
| 63 |
+
def frames(self, x, first, count):
|
| 64 |
+
"""Frames [first, first + count) of the 4D blob [x]."""
|
| 65 |
+
return self.layer("Crop", [x], f"13={first} 15={FRAMES - first - count} {Graph.WHOLE}")
|
| 66 |
+
|
| 67 |
+
def stacked(self, x, order):
|
| 68 |
+
"""[x] with the frame before and after each in its channels: (prev, cur, next) or (next, cur, prev)."""
|
| 69 |
+
zero = self.layer("BinaryOp", [self.frames(x, 0, 1)], "0=2 1=1 2=0.000000e+00")
|
| 70 |
+
prev = self.layer("Concat", [zero, self.frames(x, 0, FRAMES - 1)], "0=1")
|
| 71 |
+
zero2 = self.layer("BinaryOp", [self.frames(x, 0, 1)], "0=2 1=1 2=0.000000e+00")
|
| 72 |
+
nxt = self.layer("Concat", [self.frames(x, 1, FRAMES - 1), zero2], "0=1")
|
| 73 |
+
parts = [prev, x, nxt] if order == "forward" else [nxt, x, prev]
|
| 74 |
+
return self.layer("Concat", parts, "0=0")
|
| 75 |
+
|
| 76 |
+
def tall(self, x, gap, channels):
|
| 77 |
+
"""The 4D blob [x] ([channels] deep) as one tall 2D picture, [gap] zero rows below each frame."""
|
| 78 |
+
if gap:
|
| 79 |
+
x = self.layer("Padding", [x], f"0=0 1={gap} 2=0 3=0 4=0")
|
| 80 |
+
return self.layer("Reshape", [x], f"0=0 1=-1 2={channels}")
|
| 81 |
+
|
| 82 |
+
def untall(self, x, gap, channels):
|
| 83 |
+
"""A tall 2D picture ([channels] deep) back into the four frames, the [gap] rows below each cut away."""
|
| 84 |
+
y = self.layer("Reshape", [x], f"0=0 1=-1 11={FRAMES} 2={channels}")
|
| 85 |
+
return self.layer("Crop", [y], f"7={gap} {Graph.WHOLE}") if gap else y
|
| 86 |
+
|
| 87 |
+
@staticmethod
|
| 88 |
+
def gap(pad, stride):
|
| 89 |
+
"""Rows enough below each frame for a kernel reaching [pad] rows, a multiple of [stride]."""
|
| 90 |
+
g = pad
|
| 91 |
+
while g % stride:
|
| 92 |
+
g += 1
|
| 93 |
+
return g
|
| 94 |
+
|
| 95 |
def conv3d(self, x, conv, act=0):
|
| 96 |
out_c, in_c, kd, kh, kw = conv.weight.shape
|
| 97 |
sd, sh, sw = conv.stride
|
| 98 |
pd, ph, pw = conv.padding
|
| 99 |
+
assert sd == 1 and sh == sw and ph == pw and (kd, pd) in ((1, 0), (3, 1))
|
| 100 |
bias = conv.bias is not None
|
| 101 |
+
w = conv.weight
|
| 102 |
+
if kd == 3:
|
| 103 |
+
x = self.stacked(x, "forward")
|
| 104 |
+
# Channel block k of the 2D kernel is time k of the 3D one: (out, 3, in, kh, kw).
|
| 105 |
+
w = w.permute(0, 2, 1, 3, 4).reshape(out_c, 3 * in_c, kh, kw)
|
| 106 |
+
else:
|
| 107 |
+
w = w.reshape(out_c, in_c, kh, kw)
|
| 108 |
+
gap = self.gap(ph, sh)
|
| 109 |
+
p = f"0={out_c} 1={kw} 11={kh} 3={sw} 13={sh} 4={pw} 14={ph} 5={int(bias)} 6={w.numel()}"
|
| 110 |
if act == 1:
|
| 111 |
p += " 9=1"
|
| 112 |
+
y = self.layer("Convolution", [self.tall(x, gap, w.shape[1])], p)
|
| 113 |
+
self.half(w)
|
| 114 |
if bias:
|
| 115 |
self.floats(conv.bias)
|
| 116 |
+
return self.untall(y, gap // sh, out_c)
|
| 117 |
|
| 118 |
def deconv3d(self, x, conv):
|
| 119 |
in_c, out_c, kd, kh, kw = conv.weight.shape
|
| 120 |
sd, sh, sw = conv.stride
|
| 121 |
pd, ph, pw = conv.padding
|
| 122 |
+
assert (kd, sd, pd) == (3, 1, 1) and sh == sw and ph == pw
|
| 123 |
+
# A transposed kernel takes frame t + 1 - k at time k: (next, cur, prev), channel block k of the 2D kernel.
|
| 124 |
+
x = self.stacked(x, "backward")
|
| 125 |
+
# ncnn takes a transposed kernel as out x in x kh x kw; PyTorch keeps it in x out x kernel.
|
| 126 |
+
w = conv.weight.permute(1, 2, 0, 3, 4).reshape(out_c, 3 * in_c, kh, kw)
|
| 127 |
+
gap = 1
|
| 128 |
+
p = f"0={out_c} 1={kw} 11={kh} 3={sw} 13={sh} 4={pw} 14={ph} 5=1 6={w.numel()}"
|
| 129 |
+
y = self.layer("Deconvolution", [self.tall(x, gap, 3 * in_c)], p)
|
| 130 |
+
self.half(w)
|
| 131 |
self.floats(conv.bias)
|
| 132 |
+
return self.untall(y, gap * sh, out_c)
|
| 133 |
|
| 134 |
def se(self, x, gating):
|
| 135 |
conv = gating.attn_layer[0]
|
| 136 |
c = conv.weight.shape[0]
|
| 137 |
+
# All frames are the same size, so the average over the tall picture is the average over the frames.
|
| 138 |
+
t = self.tall(x, 0, c)
|
| 139 |
+
pooled = self.layer("Pooling", [t], "0=1 4=1")
|
| 140 |
attention = self.layer("InnerProduct", [pooled], f"0={c} 1=1 2={c * c} 9=4")
|
| 141 |
self.half(conv.weight.reshape(c, c))
|
| 142 |
self.floats(conv.bias)
|
| 143 |
+
return self.untall(self.layer("BinaryOp", [t, attention], "0=2"), 0, c)
|
| 144 |
|
| 145 |
def relu(self, x, slope=0.0):
|
| 146 |
return self.layer("ReLU", [x], f"0={slope:.6e}" if slope else "")
|