Skip to content

Fix two small typos in vision_transformers.md #570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tutorials/vision_transformers.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Since the final classification is done on the class token computed in the last a
the output will not be affected by the 14x14 channels in the last layer.
The gradient of the output with respect to them, will be 0!

We should chose any layer before the final attention block, for example:
We should choose any layer before the final attention block, for example:
```python
target_layers = [model.blocks[-1].norm1]
```
Expand Down Expand Up @@ -69,7 +69,7 @@ def reshape_transform(tensor, height=7, width=7):
Since the swin transformer is different from ViT, it does not contains `cls_token` as present in ViT,
therefore we will use all the 7x7 images we get from the last block of the last layer.

We should chose any layer before the final attention block, for example:
We should choose any layer before the final attention block, for example:
```python
target_layers = [model.layers[-1].blocks[-1].norm1]
```