vit-pytorch
vit-pytorch copied to clipboard
add an interpolate_embeddings helper function
This library is awesome. However I want to pretrain on small patches and then transfer learn on larger images. torchvision has a really great helper function for their vision transformer class : interpolate_embeddings.
"""This function helps interpolating positional embeddings during checkpoint loading,
especially when you want to apply a pre-trained model on images with different resolution.
it would be awesome if your library also had something like that :)