-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[20230525 v0.5.0] Support datasets: Flowers102 and Stanford Cars; Sup…
…port models: DeiT, PVT, TNT and Twins; Add some practical module wrappers; Update demo config; etc
- Loading branch information
1 parent
eca94b2
commit 44151e9
Showing
39 changed files
with
1,864 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,36 @@ | ||
from torch import nn | ||
|
||
device = 'cuda' | ||
seed = 42 | ||
batch_size = 256 | ||
epochs = 12 | ||
epochs = 300 | ||
eval_interval = 1 | ||
num_workers = 2 | ||
num_workers = None # auto | ||
pin_memory = True | ||
sync_bn = True | ||
data_root = './data' | ||
dataset = 'mnist' | ||
no_pretrain = True | ||
model_lib = 'torchvision-ex' | ||
model = 'resnet18' | ||
optimizer = 'sgd' | ||
lr = 2e-3 | ||
momentum = 0.9 | ||
find_unused_params = False | ||
dist_url = 'env://' | ||
need_targets = False | ||
model_lib = 'default' | ||
criterion = 'ce' | ||
optimizer = 'adamw' | ||
weight_decay = 5e-2 | ||
scheduler = 'cosine' | ||
save_interval = 1 | ||
|
||
output_dir = './runs/resnet18_baseline-cifar10' | ||
note = "using the demo config in configs/_demo_.py" | ||
|
||
print_freq = 10 | ||
clip_max_norm = 5.0 | ||
|
||
warmup_epochs = 2 | ||
min_lr = 1e-6 | ||
warmup_epochs = 20 | ||
warmup_lr = 1e-06 | ||
min_lr = 1e-05 | ||
evaluator = 'default' | ||
no_pretrain = True | ||
save_interval = 5 | ||
clip_max_norm = 1.0 | ||
amp = True | ||
|
||
model_kwargs = dict(in_chans=1, groups=1, width_per_group=64) # Do NOT set 'num_classes' in 'model_kwargs'. | ||
image_size = 32 | ||
batch_size = 256 | ||
lr = 0.0005 * (batch_size / 512) | ||
data_root = './data' | ||
dataset = 'cifar10' | ||
model = 'vit_tiny_patch4_32' | ||
model_kwargs = dict(in_chans=3, act_layer=nn.GELU, drop_path_rate=0.1) # Do NOT set 'num_classes' in 'model_kwargs'. | ||
output_dir = f'./runs/{model}-{dataset}' | ||
note = f"Using the demo config in 'configs/_demo_.py'. | dataset: {dataset} | model: {model} | output_dir: {output_dir}" | ||
print_freq = 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.