Skip to content

Commit

Permalink
Shufflenet v2 pretrained (#277)
Browse files Browse the repository at this point in the history
* add two more pretrained models for shufflenet

* fix unzip single file
  • Loading branch information
ShawnXuan committed Nov 2, 2023
1 parent adab8ca commit af65737
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flowvision/models/shufflenet_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}


Expand Down
2 changes: 0 additions & 2 deletions flowvision/models/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit af65737

Please sign in to comment.