@@ -79,6 +79,23 @@ pub static PREFAB_RESNET_MAP: StaticPreFabMap<ResNetContractConfig> = StaticPreF
7979 ] ,
8080 } ) ,
8181 } ,
82+ & StaticPreFabConfig {
83+ name : "resnet26" ,
84+ description : "ResNet-26 [2, 2, 2, 2] Bottleneck" ,
85+ builder : || ResNetContractConfig :: new ( vec ! [ 2 , 2 , 2 , 2 ] , 1000 ) . with_bottleneck ( true ) ,
86+
87+ weights : Some ( & StaticPretrainedWeightsMap {
88+ items : & [ & StaticPretrainedWeightsDescriptor {
89+ name : "bt_in1k" ,
90+ description : "ResNet-26 pretrained on ImageNet" ,
91+ license : None ,
92+ origin : None ,
93+ urls : & [
94+ "https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet26-9aa10e23.pth" ,
95+ ] ,
96+ } ] ,
97+ } ) ,
98+ } ,
8299 & StaticPreFabConfig {
83100 name : "resnet34" ,
84101 description : "ResNet-34 [3, 4, 6, 3] BasicBlocks" ,
@@ -146,38 +163,38 @@ pub static PREFAB_RESNET_MAP: StaticPreFabMap<ResNetContractConfig> = StaticPreF
146163 builder : || ResNetContractConfig :: new ( vec ! [ 3 , 4 , 6 , 3 ] , 1000 ) . with_bottleneck ( true ) ,
147164
148165 weights : Some ( & StaticPretrainedWeightsMap {
149- items : & [
150- & StaticPretrainedWeightsDescriptor {
151- name : "tv_in1k" ,
152- description : "TorchVision ResNet-50" ,
153- license : Some ( "bsd-3-clause" ) ,
154- origin : Some ( "https://github.com/pytorch/vision" ) ,
155- urls : & [ "https://download.pytorch.org/models/resnet50-0676ba61.pth" ] ,
156- } ,
157- /*
158- // ERROR: Some<Downsample> stub cannot be applied to None
159- &StaticPretrainedWeightsDescriptor {
160- name: "tv_in2k",
161- description: "ResNet-50 pretrained on ImageNet",
162- license: Some("bsd-3-clause"),
163- origin: Some("https://github.com/pytorch/vision"),
164- urls: &["https://download.pytorch.org/models/resnet50-11ad3fa6.pth"],
165- },
166- &StaticPretrainedWeightsDescriptor {
167- name: "a1_in1k",
168- description: "ResNet-50 pretrained on ImageNet",
169- license: Some("bsd-3-clause"),
170- origin: Some(
171- "https://github.com/huggingface/pytorch-image-models/releases",
172- ),
173- urls: &[
174- "https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth",
175- ],
176- },
177- */
178- ] ,
166+ items : & [ & StaticPretrainedWeightsDescriptor {
167+ name : "tv_in1k" ,
168+ description : "TorchVision ResNet-50" ,
169+ license : Some ( "bsd-3-clause" ) ,
170+ origin : Some ( "https://github.com/pytorch/vision" ) ,
171+ urls : & [ "https://download.pytorch.org/models/resnet50-0676ba61.pth" ] ,
172+ } ] ,
179173 } ) ,
180174 } ,
175+ /*
176+ &StaticPreFabConfig {
177+ name: "resnet50_gn",
178+ description: "ResNet-50 [3, 4, 6, 3] Bottleneck with GroupNorm",
179+ builder: || {
180+ ResNetContractConfig::new(vec![3, 4, 6, 3], 1000)
181+ .with_normalization(NormalizationConfig::Group(GroupNormConfig::new(32, 0)))
182+ .with_bottleneck(true)
183+ },
184+
185+ weights: Some(&StaticPretrainedWeightsMap {
186+ items: &[&StaticPretrainedWeightsDescriptor {
187+ name: "a1h_in1k",
188+ description: "ResNet-50 with GroupNorm pretrained on ImageNet",
189+ license: None,
190+ origin: None,
191+ urls: &[
192+ "https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_gn_a1h2-8fe6c4d0.pth",
193+ ],
194+ }],
195+ }),
196+ },
197+ */
181198 & StaticPreFabConfig {
182199 name : "resnet101" ,
183200 description : "ResNet-101 [3, 4, 23, 3] Bottleneck" ,
@@ -205,5 +222,19 @@ pub static PREFAB_RESNET_MAP: StaticPreFabMap<ResNetContractConfig> = StaticPreF
205222 ] ,
206223 } ) ,
207224 } ,
225+ & StaticPreFabConfig {
226+ name : "resnet152" ,
227+ description : "ResNet-152 [3, 8, 36, 3] Bottleneck" ,
228+ builder : || ResNetContractConfig :: new ( vec ! [ 3 , 8 , 36 , 3 ] , 1000 ) . with_bottleneck ( true ) ,
229+ weights : Some ( & StaticPretrainedWeightsMap {
230+ items : & [ & StaticPretrainedWeightsDescriptor {
231+ name : "tv_in1k" ,
232+ description : "TorchVision ResNet-152" ,
233+ license : Some ( "bsd-3-clause" ) ,
234+ origin : Some ( "https://github.com/pytorch/vision" ) ,
235+ urls : & [ "https://download.pytorch.org/models/resnet152-394f9c45.pth" ] ,
236+ } ] ,
237+ } ) ,
238+ } ,
208239 ] ,
209240} ;
0 commit comments