File size: 17,904 Bytes
a23133d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
CifNetForImageClassification(
  (resnet): CifNetModel(
    (embedder): CifNetEmbeddings(
      (embedder): CifNetConvLayer(
        (convolution): Conv2d(3, 32, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)
        (normalization): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
        (activation): SiLU()
      )
      (pooler): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
    )
    (encoder): CifNetEncoder(
      (stages): ModuleList(
        (0): CifNetStage(
          (layers): Sequential(
            (0): CifNetBasicLayer(
              (shortcut): CifNetShortCut(
                (convolution): Conv2d(32, 64, kernel_size=(1, 1), stride=(2, 2), bias=False)
                (normalization): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              )
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(32, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
          )
        )
        (1): CifNetStage(
          (layers): Sequential(
            (0): CifNetBasicLayer(
              (shortcut): Identity()
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
            (1): CifNetBasicLayer(
              (shortcut): Identity()
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
          )
        )
        (2): CifNetStage(
          (layers): Sequential(
            (0): CifNetBasicLayer(
              (shortcut): CifNetShortCut(
                (convolution): Conv2d(64, 128, kernel_size=(1, 1), stride=(2, 2), bias=False)
                (normalization): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              )
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
            (1): CifNetBasicLayer(
              (shortcut): Identity()
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
            (2): CifNetBasicLayer(
              (shortcut): Identity()
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
            (3): CifNetBasicLayer(
              (shortcut): Identity()
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
          )
        )
        (3): CifNetStage(
          (layers): Sequential(
            (0): CifNetBasicLayer(
              (shortcut): CifNetShortCut(
                (convolution): Conv2d(128, 256, kernel_size=(1, 1), stride=(2, 2), bias=False)
                (normalization): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              )
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
            (1): CifNetBasicLayer(
              (shortcut): Identity()
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
            (2): CifNetBasicLayer(
              (shortcut): Identity()
              (layer): Sequential(
                (0): CifNetConvLayer(
                  (convolution): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
                (1): CifNetConvLayer(
                  (convolution): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  (normalization): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (activation): SiLU()
                )
              )
            )
          )
        )
      )
    )
    (pooler): AdaptiveAvgPool2d(output_size=(1, 1))
  )
  (classifier): Sequential(
    (0): Flatten(start_dim=1, end_dim=-1)
    (1): Linear(in_features=256, out_features=10, bias=True)
  )
)
----------------------------------------------------------------
        Layer (type)               Output Shape         Param #
================================================================
            Conv2d-1          [4, 32, 112, 112]           4,704
       BatchNorm2d-2          [4, 32, 112, 112]              64
              SiLU-3          [4, 32, 112, 112]               0
   CifNetConvLayer-4          [4, 32, 112, 112]               0
         MaxPool2d-5            [4, 32, 56, 56]               0
  CifNetEmbeddings-6            [4, 32, 56, 56]               0
            Conv2d-7            [4, 64, 28, 28]          18,432
       BatchNorm2d-8            [4, 64, 28, 28]             128
              SiLU-9            [4, 64, 28, 28]               0
  CifNetConvLayer-10            [4, 64, 28, 28]               0
           Conv2d-11            [4, 64, 28, 28]          36,864
      BatchNorm2d-12            [4, 64, 28, 28]             128
             SiLU-13            [4, 64, 28, 28]               0
  CifNetConvLayer-14            [4, 64, 28, 28]               0
           Conv2d-15            [4, 64, 28, 28]           2,048
      BatchNorm2d-16            [4, 64, 28, 28]             128
   CifNetShortCut-17            [4, 64, 28, 28]               0
 CifNetBasicLayer-18            [4, 64, 28, 28]               0
      CifNetStage-19            [4, 64, 28, 28]               0
           Conv2d-20            [4, 64, 28, 28]          36,864
      BatchNorm2d-21            [4, 64, 28, 28]             128
             SiLU-22            [4, 64, 28, 28]               0
  CifNetConvLayer-23            [4, 64, 28, 28]               0
           Conv2d-24            [4, 64, 28, 28]          36,864
      BatchNorm2d-25            [4, 64, 28, 28]             128
             SiLU-26            [4, 64, 28, 28]               0
  CifNetConvLayer-27            [4, 64, 28, 28]               0
         Identity-28            [4, 64, 28, 28]               0
 CifNetBasicLayer-29            [4, 64, 28, 28]               0
           Conv2d-30            [4, 64, 28, 28]          36,864
      BatchNorm2d-31            [4, 64, 28, 28]             128
             SiLU-32            [4, 64, 28, 28]               0
  CifNetConvLayer-33            [4, 64, 28, 28]               0
           Conv2d-34            [4, 64, 28, 28]          36,864
      BatchNorm2d-35            [4, 64, 28, 28]             128
             SiLU-36            [4, 64, 28, 28]               0
  CifNetConvLayer-37            [4, 64, 28, 28]               0
         Identity-38            [4, 64, 28, 28]               0
 CifNetBasicLayer-39            [4, 64, 28, 28]               0
      CifNetStage-40            [4, 64, 28, 28]               0
           Conv2d-41           [4, 128, 14, 14]          73,728
      BatchNorm2d-42           [4, 128, 14, 14]             256
             SiLU-43           [4, 128, 14, 14]               0
  CifNetConvLayer-44           [4, 128, 14, 14]               0
           Conv2d-45           [4, 128, 14, 14]         147,456
      BatchNorm2d-46           [4, 128, 14, 14]             256
             SiLU-47           [4, 128, 14, 14]               0
  CifNetConvLayer-48           [4, 128, 14, 14]               0
           Conv2d-49           [4, 128, 14, 14]           8,192
      BatchNorm2d-50           [4, 128, 14, 14]             256
   CifNetShortCut-51           [4, 128, 14, 14]               0
 CifNetBasicLayer-52           [4, 128, 14, 14]               0
           Conv2d-53           [4, 128, 14, 14]         147,456
      BatchNorm2d-54           [4, 128, 14, 14]             256
             SiLU-55           [4, 128, 14, 14]               0
  CifNetConvLayer-56           [4, 128, 14, 14]               0
           Conv2d-57           [4, 128, 14, 14]         147,456
      BatchNorm2d-58           [4, 128, 14, 14]             256
             SiLU-59           [4, 128, 14, 14]               0
  CifNetConvLayer-60           [4, 128, 14, 14]               0
         Identity-61           [4, 128, 14, 14]               0
 CifNetBasicLayer-62           [4, 128, 14, 14]               0
           Conv2d-63           [4, 128, 14, 14]         147,456
      BatchNorm2d-64           [4, 128, 14, 14]             256
             SiLU-65           [4, 128, 14, 14]               0
  CifNetConvLayer-66           [4, 128, 14, 14]               0
           Conv2d-67           [4, 128, 14, 14]         147,456
      BatchNorm2d-68           [4, 128, 14, 14]             256
             SiLU-69           [4, 128, 14, 14]               0
  CifNetConvLayer-70           [4, 128, 14, 14]               0
         Identity-71           [4, 128, 14, 14]               0
 CifNetBasicLayer-72           [4, 128, 14, 14]               0
           Conv2d-73           [4, 128, 14, 14]         147,456
      BatchNorm2d-74           [4, 128, 14, 14]             256
             SiLU-75           [4, 128, 14, 14]               0
  CifNetConvLayer-76           [4, 128, 14, 14]               0
           Conv2d-77           [4, 128, 14, 14]         147,456
      BatchNorm2d-78           [4, 128, 14, 14]             256
             SiLU-79           [4, 128, 14, 14]               0
  CifNetConvLayer-80           [4, 128, 14, 14]               0
         Identity-81           [4, 128, 14, 14]               0
 CifNetBasicLayer-82           [4, 128, 14, 14]               0
      CifNetStage-83           [4, 128, 14, 14]               0
           Conv2d-84             [4, 256, 7, 7]         294,912
      BatchNorm2d-85             [4, 256, 7, 7]             512
             SiLU-86             [4, 256, 7, 7]               0
  CifNetConvLayer-87             [4, 256, 7, 7]               0
           Conv2d-88             [4, 256, 7, 7]         589,824
      BatchNorm2d-89             [4, 256, 7, 7]             512
             SiLU-90             [4, 256, 7, 7]               0
  CifNetConvLayer-91             [4, 256, 7, 7]               0
           Conv2d-92             [4, 256, 7, 7]          32,768
      BatchNorm2d-93             [4, 256, 7, 7]             512
   CifNetShortCut-94             [4, 256, 7, 7]               0
 CifNetBasicLayer-95             [4, 256, 7, 7]               0
           Conv2d-96             [4, 256, 7, 7]         589,824
      BatchNorm2d-97             [4, 256, 7, 7]             512
             SiLU-98             [4, 256, 7, 7]               0
  CifNetConvLayer-99             [4, 256, 7, 7]               0
          Conv2d-100             [4, 256, 7, 7]         589,824
     BatchNorm2d-101             [4, 256, 7, 7]             512
            SiLU-102             [4, 256, 7, 7]               0
 CifNetConvLayer-103             [4, 256, 7, 7]               0
        Identity-104             [4, 256, 7, 7]               0
CifNetBasicLayer-105             [4, 256, 7, 7]               0
          Conv2d-106             [4, 256, 7, 7]         589,824
     BatchNorm2d-107             [4, 256, 7, 7]             512
            SiLU-108             [4, 256, 7, 7]               0
 CifNetConvLayer-109             [4, 256, 7, 7]               0
          Conv2d-110             [4, 256, 7, 7]         589,824
     BatchNorm2d-111             [4, 256, 7, 7]             512
            SiLU-112             [4, 256, 7, 7]               0
 CifNetConvLayer-113             [4, 256, 7, 7]               0
        Identity-114             [4, 256, 7, 7]               0
CifNetBasicLayer-115             [4, 256, 7, 7]               0
     CifNetStage-116             [4, 256, 7, 7]               0
   CifNetEncoder-117          [[-1, 256, 7, 7]]               0
AdaptiveAvgPool2d-118             [4, 256, 1, 1]               0
     CifNetModel-119  [[-1, 256, 7, 7], [-1, 256, 1, 1]]               0
         Flatten-120                   [4, 256]               0
          Linear-121                    [4, 10]           2,570
================================================================
Total params: 4,609,834
Trainable params: 4,609,834
Non-trainable params: 0
----------------------------------------------------------------
Input size (MB): 2.30
Forward/backward pass size (MB): 177.16
Params size (MB): 17.59
Estimated Total Size (MB): 197.04
----------------------------------------------------------------