@@ -116,7 +116,7 @@ function downsample_identity(inplanes::Integer, outplanes::Integer; kwargs...)
116
116
end
117
117
118
118
# Shortcut configurations for the ResNet models
119
- const SHORTCUT_DICT = Dict (:A => (downsample_identity, downsample_identity),
119
+ const RESNET_SHORTCUTS = Dict (:A => (downsample_identity, downsample_identity),
120
120
:B => (downsample_conv, downsample_identity),
121
121
:C => (downsample_conv, downsample_conv),
122
122
:D => (downsample_pool, downsample_identity))
@@ -342,7 +342,7 @@ function resnet(block_type::Symbol, block_repeats::AbstractVector{<:Integer},
342
342
connection$ activation, classifier_fn)
343
343
end
344
344
function resnet (block_fn, block_repeats, downsample_opt:: Symbol = :B ; kwargs... )
345
- return resnet (block_fn, block_repeats, SHORTCUT_DICT [downsample_opt]; kwargs... )
345
+ return resnet (block_fn, block_repeats, RESNET_SHORTCUTS [downsample_opt]; kwargs... )
346
346
end
347
347
348
348
# block-layer configurations for ResNet-like models
@@ -351,3 +351,7 @@ const RESNET_CONFIGS = Dict(18 => (:basicblock, [2, 2, 2, 2]),
351
351
50 => (:bottleneck , [3 , 4 , 6 , 3 ]),
352
352
101 => (:bottleneck , [3 , 4 , 23 , 3 ]),
353
353
152 => (:bottleneck , [3 , 8 , 36 , 3 ]))
354
+
355
+ const LRESNET_CONFIGS = Dict (50 => (:bottleneck , [3 , 4 , 6 , 3 ]),
356
+ 101 => (:bottleneck , [3 , 4 , 23 , 3 ]),
357
+ 152 => (:bottleneck , [3 , 8 , 36 , 3 ]))
0 commit comments