A ViT prepends a learnable class token to the patch tokens. The class token's final state is used for classification, so the sequence the transformer sees has one more entry than the patch count.
Implement vit_seq_length(img, p), the number of tokens the transformer processes.
Count the patches, then add one.
No results yet
Run your code to check it against the examples, or submit to run every test.