I downloaded the model:
wget https://storage.googleapis.com/vit_models/imagenet21k+imagenet2012/ViT-B_16.npz -O ViT-B_16_imagenet2012.npz
And I use the following code to load the model:
model_name = 'ViT-L_16'
model_config = models_config.MODEL_CONFIGS[model_name]
model = models.VisionTransformer(num_classes=1000, **model_config)
params = checkpoint.load(f'./test_result/{model_name}_imagenet2012.npz')
An error occurred while running:
ValueError: Cannot load file containing pickled data when allow_pickle=False
Please help me, how do I load a trained model?
I downloaded the model:
wget https://storage.googleapis.com/vit_models/imagenet21k+imagenet2012/ViT-B_16.npz -O ViT-B_16_imagenet2012.npzAnd I use the following code to load the model:
An error occurred while running:
ValueError: Cannot load file containing pickled data when allow_pickle=FalsePlease help me, how do I load a trained model?