Skip to content

Commit 74fcd4c

Browse files
committed
Update finetune detail, rerun model doc gen.
1 parent e6f5617 commit 74fcd4c

Some content is hidden

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

66 files changed

+66
-66
lines changed

docs/models/.templates/code_snippets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To extract image features with this model, follow the [timm feature extraction e
5656
## How do I finetune this model?
5757
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
5858
```python
59-
model = timm.create_model('{{ model_name }}', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
59+
model = timm.create_model('{{ model_name }}', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6060
```
6161
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6262
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/adversarial-inception-v3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To extract image features with this model, follow the [timm feature extraction e
6464
## How do I finetune this model?
6565
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6666
```python
67-
model = timm.create_model('adv_inception_v3', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
67+
model = timm.create_model('adv_inception_v3', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6868
```
6969
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
7070
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/advprop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('tf_efficientnet_b0_ap', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('tf_efficientnet_b0_ap', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/big-transfer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('resnetv2_101x1_bitm', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('resnetv2_101x1_bitm', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/csp-darknet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('cspdarknet53', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('cspdarknet53', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/csp-resnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('cspresnet50', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('cspresnet50', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/csp-resnext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('cspresnext50', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('cspresnext50', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/densenet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('densenet121', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('densenet121', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/dla.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('dla102', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('dla102', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/dpn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('dpn107', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('dpn107', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/ecaresnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('ecaresnet101d', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('ecaresnet101d', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/efficientnet-pruned.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ To extract image features with this model, follow the [timm feature extraction e
6666
## How do I finetune this model?
6767
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6868
```python
69-
model = timm.create_model('efficientnet_b1_pruned', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
69+
model = timm.create_model('efficientnet_b1_pruned', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
7070
```
7171
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
7272
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/efficientnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To extract image features with this model, follow the [timm feature extraction e
6464
## How do I finetune this model?
6565
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6666
```python
67-
model = timm.create_model('efficientnet_b0', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
67+
model = timm.create_model('efficientnet_b0', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6868
```
6969
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
7070
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/ensemble-adversarial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To extract image features with this model, follow the [timm feature extraction e
6464
## How do I finetune this model?
6565
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6666
```python
67-
model = timm.create_model('ens_adv_inception_resnet_v2', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
67+
model = timm.create_model('ens_adv_inception_resnet_v2', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6868
```
6969
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
7070
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/ese-vovnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('ese_vovnet19b_dw', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('ese_vovnet19b_dw', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/fbnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('fbnetc_100', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('fbnetc_100', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/gloun-inception-v3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('gluon_inception_v3', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('gluon_inception_v3', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/gloun-resnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('gluon_resnet101_v1b', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('gluon_resnet101_v1b', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/gloun-resnext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('gluon_resnext101_32x4d', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('gluon_resnext101_32x4d', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/gloun-senet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('gluon_senet154', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('gluon_senet154', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/gloun-seresnext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('gluon_seresnext101_32x4d', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('gluon_seresnext101_32x4d', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/gloun-xception.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('gluon_xception65', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('gluon_xception65', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/hrnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('hrnet_w18', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('hrnet_w18', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/ig-resnext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To extract image features with this model, follow the [timm feature extraction e
6464
## How do I finetune this model?
6565
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6666
```python
67-
model = timm.create_model('ig_resnext101_32x16d', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
67+
model = timm.create_model('ig_resnext101_32x16d', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6868
```
6969
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
7070
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/inception-resnet-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('inception_resnet_v2', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('inception_resnet_v2', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/inception-v3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('inception_v3', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('inception_v3', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/inception-v4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To extract image features with this model, follow the [timm feature extraction e
5959
## How do I finetune this model?
6060
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6161
```python
62-
model = timm.create_model('inception_v4', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
62+
model = timm.create_model('inception_v4', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6363
```
6464
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6565
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/legacy-se-resnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('legacy_seresnet101', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('legacy_seresnet101', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/legacy-se-resnext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('legacy_seresnext101_32x4d', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('legacy_seresnext101_32x4d', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/legacy-senet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To extract image features with this model, follow the [timm feature extraction e
6262
## How do I finetune this model?
6363
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6464
```python
65-
model = timm.create_model('legacy_senet154', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
65+
model = timm.create_model('legacy_senet154', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6666
```
6767
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6868
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

docs/models/mixnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To extract image features with this model, follow the [timm feature extraction e
6060
## How do I finetune this model?
6161
You can finetune any of the pre-trained models just by changing the classifier (the last layer).
6262
```python
63-
model = timm.create_model('mixnet_l', pretrained=True).reset_classifier(NUM_FINETUNE_CLASSES)
63+
model = timm.create_model('mixnet_l', pretrained=True, num_classes=NUM_FINETUNE_CLASSES)
6464
```
6565
To finetune on your own dataset, you have to write a training loop or adapt [timm's training
6666
script](https://github.com/rwightman/pytorch-image-models/blob/master/train.py) to use your dataset.

0 commit comments

Comments
 (0)