Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions timm/data/readers/reader_wds.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ def __init__(
self.num_samples = num_samples
else:
self.num_samples = self.split_info.num_samples
if not self.num_samples:
raise RuntimeError(f'Invalid split definition, num_samples not specified.')
if is_training and not self.num_samples:
raise RuntimeError(f'Invalid split definition, num_samples not specified in train mode.')
self.remap_class = False
if class_map:
self.class_to_idx = load_class_map(class_map)
Expand Down
6 changes: 6 additions & 0 deletions timm/models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,9 @@ def _gcfg(url='', **kwargs):
hf_hub_id='timm/',
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet18d_ra2-48a79e06.pth',
first_conv='conv1.0'),
'resnet18d.ra4_e3600_r224_in1k': _rcfg(
hf_hub_id='timm/',
mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5), crop_pct=0.9),
'resnet34.a1_in1k': _rcfg(
hf_hub_id='timm/',
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet34_a1_0-46f8f793.pth'),
Expand All @@ -724,6 +727,9 @@ def _gcfg(url='', **kwargs):
'resnet34.bt_in1k': _ttcfg(
hf_hub_id='timm/',
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet34-43635321.pth'),
'resnet34.ra4_e3600_r224_in1k': _rcfg(
hf_hub_id='timm/',
mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5), crop_pct=0.9),
'resnet34d.ra2_in1k': _ttcfg(
hf_hub_id='timm/',
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet34d_ra2-f8dcfcaf.pth',
Expand Down
22 changes: 14 additions & 8 deletions timm/models/resnetv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,14 +696,20 @@ def _cfg(url='', **kwargs):
hf_hub_id='timm/',
num_classes=21843, custom_load=True),

'resnetv2_18.untrained': _cfg(
interpolation='bicubic', crop_pct=0.95),
'resnetv2_18d.untrained': _cfg(
interpolation='bicubic', crop_pct=0.95, first_conv='stem.conv1'),
'resnetv2_34.untrained': _cfg(
interpolation='bicubic', crop_pct=0.95),
'resnetv2_34d.untrained': _cfg(
interpolation='bicubic', crop_pct=0.95, first_conv='stem.conv1'),
'resnetv2_18.ra4_e3600_r224_in1k': _cfg(
hf_hub_id='timm/',
interpolation='bicubic', crop_pct=0.9, test_input_size=(3, 288, 288), test_crop_pct=1.0),
'resnetv2_18d.ra4_e3600_r224_in1k': _cfg(
hf_hub_id='timm/',
interpolation='bicubic', crop_pct=0.9, test_input_size=(3, 288, 288), test_crop_pct=1.0,
first_conv='stem.conv1'),
'resnetv2_34.ra4_e3600_r224_in1k': _cfg(
hf_hub_id='timm/',
interpolation='bicubic', crop_pct=0.9, test_input_size=(3, 288, 288), test_crop_pct=1.0),
'resnetv2_34d.ra4_e3600_r224_in1k': _cfg(
hf_hub_id='timm/',
interpolation='bicubic', crop_pct=0.9, test_input_size=(3, 288, 288), test_crop_pct=1.0,
first_conv='stem.conv1'),
'resnetv2_50.a1h_in1k': _cfg(
hf_hub_id='timm/',
interpolation='bicubic', crop_pct=0.95, test_input_size=(3, 288, 288), test_crop_pct=1.0),
Expand Down
Loading