Skip to content

Commit 28c6723

Browse files
committed
Update docs
1 parent 93a832c commit 28c6723

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/save_load.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ For example:
4040
# Alternatively, load the model directly from the Hugging Face Hub
4141
model = smp.from_pretrained('username/my-model')
4242
43+
Loading pre-trained model with different number of classes for fine-tuning:
44+
45+
.. code:: python
46+
47+
import segmentation_models_pytorch as smp
48+
49+
model = smp.from_pretrained('<path-or-repo-name>', classes=5, strict=False)
50+
4351
Saving model Metrics and Dataset Name
4452
-------------------------------------
4553

0 commit comments

Comments
 (0)