Skip to content

Commit cfdfee8

Browse files
TAO 5.1 Release - PyTorch
1 parent 9611219 commit cfdfee8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+7089
-18
lines changed

docker/requirements-pip-pytorch.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ pytorch-lightning==1.8.5
77
pytorch_metric_learning==1.7.1
88
pytorch-msssim
99
thop
10-
timm==0.6.11
10+
timm>=0.9.6.dev0
1111
torchmetrics==0.10.3
12+
open-clip-torch[training]==2.20.0
13+
ftfy

nvidia_tao_pytorch/core/mmlab/mmclassification/classification_default_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ class BackboneConfig:
265265

266266
type: str = "fan_tiny_8_p4_hybrid"
267267
custom_args: Optional[Dict[Any, Any]] = None
268+
freeze: bool = False
269+
pretrained: Optional[str] = None
268270

269271

270272
@dataclass
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
results_dir: ???
2+
3+
export:
4+
checkpoint: "???"
5+
onnx_file: "???"
6+
verify: true
7+
8+
dataset:
9+
data:
10+
samples_per_gpu: 512
11+
workers_per_gpu: 8
12+
train:
13+
data_prefix: ???
14+
pipeline: # Augmentations alone
15+
- type: RandomResizedCrop
16+
size: 224
17+
- type: RandomFlip
18+
flip_prob: 0.5
19+
direction: "horizontal"
20+
- type: ColorJitter
21+
brightness: 0.4
22+
contrast: 0.4
23+
saturation: 0.4
24+
val:
25+
data_prefix: ???
26+
test:
27+
data_prefix: ???
28+
29+
model:
30+
backbone:
31+
type: "open_clip"
32+
custom_args:
33+
model_name: "ViT-B-32"
34+
freeze: true
35+
pretrained: ???
36+
init_cfg:
37+
checkpoint: ???
38+
head:
39+
type: LinearClsHead
40+
num_classes: 1000
41+
in_channels: 512
42+
loss:
43+
type: CrossEntropyLoss
44+
loss_weight: 1.0
45+
use_soft: False
46+
topk: [1, 5]
47+
48+
train:
49+
train_config:
50+
find_unused_parameters: True
51+
optimizer:
52+
type: AdamW
53+
lr: 1e-3
54+
lr_config:
55+
policy: CosineAnnealing
56+
min_lr: 0
57+
warmup: 'linear'
58+
warmup_iters: 10
59+
warmup_by_epoch: False
60+
optimizer_config:
61+
grad_clip:
62+
max_norm: 5.0
63+
runner:
64+
max_epochs: 10
65+
checkpoint_config:
66+
interval: 1
67+
logging:
68+
interval: 50
69+
validate: True
70+
evaluation:
71+
interval: 1
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
results_dir: ???
2+
3+
export:
4+
checkpoint: "???"
5+
onnx_file: "???"
6+
verify: true
7+
8+
dataset:
9+
data:
10+
samples_per_gpu: 512
11+
workers_per_gpu: 8
12+
train:
13+
data_prefix: ???
14+
pipeline: # Augmentations alone
15+
- type: RandomResizedCrop
16+
size: 224
17+
- type: RandomFlip
18+
flip_prob: 0.5
19+
direction: "horizontal"
20+
- type: ColorJitter
21+
brightness: 0.4
22+
contrast: 0.4
23+
saturation: 0.4
24+
val:
25+
data_prefix: ???
26+
test:
27+
data_prefix: ???
28+
29+
model:
30+
backbone:
31+
type: "vit_large_patch14_dinov2_swiglu"
32+
freeze: true
33+
pretrained: ???
34+
init_cfg:
35+
checkpoint: ???
36+
head:
37+
type: LinearClsHead
38+
num_classes: 1000
39+
in_channels: 1024
40+
loss:
41+
type: CrossEntropyLoss
42+
loss_weight: 1.0
43+
use_soft: False
44+
topk: [1, 5]
45+
46+
train:
47+
train_config:
48+
find_unused_parameters: True
49+
optimizer:
50+
type: AdamW
51+
lr: 1e-3
52+
lr_config:
53+
policy: CosineAnnealing
54+
min_lr: 5e-6
55+
warmup: 'linear'
56+
warmup_iters: 10
57+
warmup_by_epoch: False
58+
optimizer_config:
59+
grad_clip:
60+
max_norm: 5.0
61+
runner:
62+
max_epochs: 10
63+
checkpoint_config:
64+
interval: 1
65+
logging:
66+
interval: 50
67+
validate: True
68+
evaluation:
69+
interval: 1
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
results_dir: ???
2+
3+
inference:
4+
checkpoint: ???
5+
6+
dataset:
7+
data:
8+
samples_per_gpu: 512
9+
workers_per_gpu: 8
10+
train:
11+
data_prefix: ???
12+
pipeline: # Augmentations alone
13+
- type: RandomResizedCrop
14+
size: 224
15+
- type: RandomFlip
16+
flip_prob: 0.5
17+
direction: "horizontal"
18+
- type: ColorJitter
19+
brightness: 0.4
20+
contrast: 0.4
21+
saturation: 0.4
22+
val:
23+
data_prefix: ???
24+
test:
25+
data_prefix: ???
26+
27+
model:
28+
backbone:
29+
type: "open_clip"
30+
custom_args:
31+
model_name: "ViT-B-32"
32+
freeze: true
33+
pretrained: ???
34+
init_cfg:
35+
checkpoint: ???
36+
head:
37+
type: LinearClsHead
38+
num_classes: 1000
39+
in_channels: 512
40+
loss:
41+
type: CrossEntropyLoss
42+
loss_weight: 1.0
43+
use_soft: False
44+
topk: [1, 5]
45+
46+
train:
47+
train_config:
48+
find_unused_parameters: True
49+
optimizer:
50+
type: AdamW
51+
lr: 1e-3
52+
lr_config:
53+
policy: CosineAnnealing
54+
min_lr: 0
55+
warmup: 'linear'
56+
warmup_iters: 10
57+
warmup_by_epoch: False
58+
optimizer_config:
59+
grad_clip:
60+
max_norm: 5.0
61+
runner:
62+
max_epochs: 10
63+
checkpoint_config:
64+
interval: 1
65+
logging:
66+
interval: 50
67+
validate: True
68+
evaluation:
69+
interval: 1
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
results_dir: ???
2+
3+
inference:
4+
checkpoint: ???
5+
6+
dataset:
7+
data:
8+
samples_per_gpu: 512
9+
workers_per_gpu: 8
10+
train:
11+
data_prefix: ???
12+
pipeline: # Augmentations alone
13+
- type: RandomResizedCrop
14+
size: 224
15+
- type: RandomFlip
16+
flip_prob: 0.5
17+
direction: "horizontal"
18+
- type: ColorJitter
19+
brightness: 0.4
20+
contrast: 0.4
21+
saturation: 0.4
22+
val:
23+
data_prefix: ???
24+
test:
25+
data_prefix: ???
26+
27+
model:
28+
backbone:
29+
type: "vit_large_patch14_dinov2_swiglu"
30+
freeze: true
31+
pretrained: ???
32+
init_cfg:
33+
checkpoint: ???
34+
head:
35+
type: LinearClsHead
36+
num_classes: 1000
37+
in_channels: 1024
38+
loss:
39+
type: CrossEntropyLoss
40+
loss_weight: 1.0
41+
use_soft: False
42+
topk: [1, 5]
43+
44+
train:
45+
train_config:
46+
find_unused_parameters: True
47+
optimizer:
48+
type: AdamW
49+
lr: 1e-3
50+
lr_config:
51+
policy: CosineAnnealing
52+
min_lr: 5e-6
53+
warmup: 'linear'
54+
warmup_iters: 10
55+
warmup_by_epoch: False
56+
optimizer_config:
57+
grad_clip:
58+
max_norm: 5.0
59+
runner:
60+
max_epochs: 10
61+
checkpoint_config:
62+
interval: 1
63+
logging:
64+
interval: 50
65+
validate: True
66+
evaluation:
67+
interval: 1
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
results_dir: ???
2+
3+
evaluate:
4+
checkpoint: ???
5+
6+
dataset:
7+
data:
8+
samples_per_gpu: 512
9+
workers_per_gpu: 8
10+
train:
11+
data_prefix: ???
12+
pipeline: # Augmentations alone
13+
- type: RandomResizedCrop
14+
size: 224
15+
- type: RandomFlip
16+
flip_prob: 0.5
17+
direction: "horizontal"
18+
- type: ColorJitter
19+
brightness: 0.4
20+
contrast: 0.4
21+
saturation: 0.4
22+
val:
23+
data_prefix: ???
24+
test:
25+
data_prefix: ???
26+
27+
model:
28+
backbone:
29+
type: "open_clip"
30+
custom_args:
31+
model_name: "ViT-B-32"
32+
freeze: true
33+
pretrained: ???
34+
init_cfg:
35+
checkpoint: ???
36+
head:
37+
type: LinearClsHead
38+
num_classes: 1000
39+
in_channels: 512
40+
loss:
41+
type: CrossEntropyLoss
42+
loss_weight: 1.0
43+
use_soft: False
44+
topk: [1, 5]
45+
46+
train:
47+
train_config:
48+
find_unused_parameters: True
49+
optimizer:
50+
type: AdamW
51+
lr: 1e-3
52+
lr_config:
53+
policy: CosineAnnealing
54+
min_lr: 0
55+
warmup: 'linear'
56+
warmup_iters: 10
57+
warmup_by_epoch: False
58+
optimizer_config:
59+
grad_clip:
60+
max_norm: 5.0
61+
runner:
62+
max_epochs: 10
63+
checkpoint_config:
64+
interval: 1
65+
logging:
66+
interval: 50
67+
validate: True
68+
evaluation:
69+
interval: 1

0 commit comments

Comments
 (0)