A class for creating a custom Vision Transformer (ViT) model for visual recognition
Let's see if this class is working well :
vis_rec_ob = VisRecTrans('vit_small_patch16_224', 10, False)
model_test = vis_rec_ob.create_model()
vis_rec_ob.initialize(model_test)
assert isinstance(model_test, nn.Sequential)
As we see, the model is a sequential list of layers, and can be used with the Learner
class of fastai, as we use any other model.
The list of models supported by the VisRecTrans
class :
VisRecTrans.models_list