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.

0 commit comments

Comments
 (0)