@@ -63,28 +63,28 @@ def _cfg(url="", **kwargs):
63
63
64
64
default_cfgs : Dict [str , Dict [str , Any ]] = {
65
65
"simplenetv1_small_m1_05" : _cfg (
66
- url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_small_m1_05-a7ec600b .pth"
66
+ url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_small_m1_05-be804903 .pth"
67
67
),
68
68
"simplenetv1_small_m2_05" : _cfg (
69
- url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_small_m2_05-62617ea1 .pth"
69
+ url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_small_m2_05-ca4b3e2b .pth"
70
70
),
71
71
"simplenetv1_small_m1_075" : _cfg (
72
- url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_small_m1_075-8427bf60 .pth"
72
+ url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_small_m1_075-098acbff .pth"
73
73
),
74
74
"simplenetv1_small_m2_075" : _cfg (
75
- url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_small_m2_075-da714eb5 .pth"
75
+ url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_small_m2_075-609ff4da .pth"
76
76
),
77
77
"simplenetv1_5m_m1" : _cfg (
78
- url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_5m_m1-cc6b3ad1 .pth"
78
+ url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_5m_m1-36c4ca4d .pth"
79
79
),
80
80
"simplenetv1_5m_m2" : _cfg (
81
- url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_5m_m2-c35297bf .pth"
81
+ url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_5m_m2-9bd6bb36 .pth"
82
82
),
83
83
"simplenetv1_9m_m1" : _cfg (
84
- url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_9m_m1-8c98a0a5 .pth"
84
+ url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_9m_m1-524f9972 .pth"
85
85
),
86
86
"simplenetv1_9m_m2" : _cfg (
87
- url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_9m_m2-6b01be1e .pth"
87
+ url = "https://github.com/Coderx7/SimpleNet_Pytorch/releases/download/v1.0.0/simplenetv1_9m_m2-59e8733b .pth"
88
88
),
89
89
}
90
90
@@ -241,7 +241,7 @@ def __init__(
241
241
],
242
242
}
243
243
# make sure values are in proper form!
244
- self .dropout_rates = {int (key ):float (value ) for key ,value in drop_rates .items ()}
244
+ self .dropout_rates = {int (key ): float (value ) for key , value in drop_rates .items ()}
245
245
# 15 is the last layer of the network(including two previous pooling layers)
246
246
# basically specifying the dropout rate for the very last layer to be used after the pooling
247
247
self .last_dropout_rate = self .dropout_rates .get (15 , 0.0 )
@@ -296,7 +296,10 @@ def _make_layers(self, scale: float):
296
296
# due to using 0 as dropout value(this applies up to 1.13.1) so here is an explicit
297
297
# check to convert any possible integer value to its decimal counterpart.
298
298
custom_dropout = None if custom_dropout is None else float (custom_dropout )
299
- kernel_size = 3 if layer_type == [] else 1
299
+ kernel_size = 3
300
+ if layer_type == ['k1' ]:
301
+ kernel_size = 1
302
+ padding = 0
300
303
301
304
if layer == "p" :
302
305
layers += [
@@ -307,13 +310,13 @@ def _make_layers(self, scale: float):
307
310
filters = round (layer * scale )
308
311
if custom_dropout is None :
309
312
layers += [
310
- nn .Conv2d (input_channel , filters , kernel_size = kernel_size , stride = stride , padding = 1 ),
313
+ nn .Conv2d (input_channel , filters , kernel_size = kernel_size , stride = stride , padding = padding ),
311
314
nn .BatchNorm2d (filters , eps = 1e-05 , momentum = 0.05 , affine = True ),
312
315
nn .ReLU (inplace = True ),
313
316
]
314
317
else :
315
318
layers += [
316
- nn .Conv2d (input_channel , filters , kernel_size = kernel_size , stride = stride , padding = 1 ),
319
+ nn .Conv2d (input_channel , filters , kernel_size = kernel_size , stride = stride , padding = padding ),
317
320
nn .BatchNorm2d (filters , eps = 1e-05 , momentum = 0.05 , affine = True ),
318
321
nn .ReLU (inplace = True ),
319
322
nn .Dropout2d (p = custom_dropout , inplace = False ),
0 commit comments