From e3be830e9115e2508f68c209947b644dd983176d Mon Sep 17 00:00:00 2001 From: ShawnXuan Date: Wed, 1 Nov 2023 15:51:41 +0800 Subject: [PATCH 1/2] add two more pretrained models for shufflenet --- flowvision/models/shufflenet_v2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flowvision/models/shufflenet_v2.py b/flowvision/models/shufflenet_v2.py index fd2c3fce..a5a674a1 100644 --- a/flowvision/models/shufflenet_v2.py +++ b/flowvision/models/shufflenet_v2.py @@ -22,8 +22,8 @@ model_urls = { "shufflenet_v2_x0_5": "https://oneflow-public.oss-cn-beijing.aliyuncs.com/model_zoo/flowvision/classification/ShuffleNetV2/shufflenet_v2_x0_5.zip", "shufflenet_v2_x1_0": "https://oneflow-public.oss-cn-beijing.aliyuncs.com/model_zoo/flowvision/classification/ShuffleNetV2/shufflenet_v2_x1_0.zip", - "shufflenet_v2_x1_5": None, - "shufflenet_v2_x2_0": None, + "shufflenet_v2_x1_5": "https://oneflow-public.oss-cn-beijing.aliyuncs.com/model_zoo/flowvision/classification/ShuffleNetV2/shufflenet_v2_x1_5.zip", + "shufflenet_v2_x2_0": "https://oneflow-public.oss-cn-beijing.aliyuncs.com/model_zoo/flowvision/classification/ShuffleNetV2/shufflenet_v2_x2_0.zip", } From c25c5d944e01b7b999b1ddf5c573eb65a2675619 Mon Sep 17 00:00:00 2001 From: ShawnXuan Date: Wed, 1 Nov 2023 15:52:24 +0800 Subject: [PATCH 2/2] fix unzip single file --- flowvision/models/utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/flowvision/models/utils.py b/flowvision/models/utils.py index cc18dd82..e1a4c267 100644 --- a/flowvision/models/utils.py +++ b/flowvision/models/utils.py @@ -73,8 +73,6 @@ def _legacy_zip_load(filename, model_dir, map_location, delete_zip_file=True): members = f.infolist() extracted_name = members[0].filename extracted_file = os.path.join(model_dir, extracted_name) - if not os.path.exists(extracted_file): - os.mkdir(extracted_file) f.extractall(model_dir) if delete_zip_file and os.path.exists(filename): os.remove(filename)