Skip to content

Commit 6c5ce53

Browse files
author
Roman Donchenko
authored
Merge pull request #2192 from IRDonch/regnet-download-config
regnetx-3.2gf: don't download anything at conversion time
2 parents 44d1e5d + 845f614 commit 6c5ce53

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

models/public/regnetx-3.2gf/model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import pycls.core.checkpoint
1616
import pycls.models.model_zoo
1717

18-
def regnetx_32gf(weights_path):
19-
model = pycls.models.model_zoo.regnetx("RegNetX-3.2GF")
18+
def regnet(config_path, weights_path):
19+
pycls.core.config.cfg.merge_from_file(config_path)
20+
model = pycls.models.model_zoo.RegNet()
2021
pycls.core.checkpoint.load_checkpoint(weights_path, model)
2122
return model

models/public/regnetx-3.2gf/model.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ description: >-
2121
Codebase for Image Classification Research <https://github.com/facebookresearch/pycls>.
2222
task_type: classification
2323
files:
24+
- name: configs/dds_baselines/regnetx/RegNetX-3.2GF_dds_8gpu.yaml
25+
size: 362
26+
sha256: 166491e53c668ecc181692dde27221b4358f1b889e7726396690c24547e53f5f
27+
source: https://raw.githubusercontent.com/facebookresearch/pycls/ca89a79161e437deca8f39f31ceaef3b05873f30/configs/dds_baselines/regnetx/RegNetX-3.2GF_dds_8gpu.yaml
2428
- name: pycls/__init__.py
2529
size: 0
2630
sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@@ -89,8 +93,9 @@ postprocessing:
8993
conversion_to_onnx_args:
9094
- --model-path=$config_dir
9195
- --model-path=$dl_dir
92-
- --model-name=regnetx_32gf
96+
- --model-name=regnet
9397
- --import-module=model
98+
- --model-param=config_path=r"$dl_dir/configs/dds_baselines/regnetx/RegNetX-3.2GF_dds_8gpu.yaml"
9499
- --model-param=weights_path=r"$dl_dir/ckpt/regnetx-3.2gf.pyth"
95100
- --input-shape=1,3,224,224
96101
- --input-names=data

0 commit comments

Comments
 (0)