Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Fixed classificationhead typo and leave out some of the guesswork for the first example (#1354)

Oskar Flordal2e558a0c61ca
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 83b3e0e50..a09be37fe 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -17,10 +17,11 @@ Ready to use with state-of-the art Deep Learning models:
.. code:: python
+ >>> import torch.nn as nn
>>> import kornia.contrib as K
>>> classifier = nn.Sequential(
... K.VisionTransformer(image_size=224, patch_size=16),
- ... K.ClassficationHead(num_classes=1000),
+ ... K.ClassificationHead(num_classes=1000),
... )
>>> logits = classifier(img) # BxN
>>> scores = logits.argmax(-1) # B
diff --git a/docs/source/models/vit.rst b/docs/source/models/vit.rst
index 2cf01693c..9b8c0a806 100644
--- a/docs/source/models/vit.rst
+++ b/docs/source/models/vit.rst
@@ -69,8 +69,8 @@ class with two different classification heads:
super().__init__()
self.transformer = K.VisionTransformer(
image_size=224, patch_size=16)
- self.head1 = K.ClassficationHead(num_classes=10)
- self.head2 = K.ClassficationHead(num_classes=50)
+ self.head1 = K.ClassificationHead(num_classes=10)
+ self.head2 = K.ClassificationHead(num_classes=50)
def forward(self, x: torch.Tensor):
out = self.transformer(x)