scenic
scenic copied to clipboard
ViT ImageNet Pretrained Model Problem with ViViT
Hey,
I download the pretrained ImageNet21k ViT b_16 model from the urls mentioned in the configuration files, and replace the path in the config file, but for both scenic and bigvision versions I face some problems.
When I put the path to scenic pretrained version, it gives the following error:
raise ValueError('No checkpoint for the pretrained model is found in: '
ValueError: No checkpoint for the pretrained model is found in: /content/ViT_B_16_ImageNet21k
When I put the path to bigvision pretrained version, this happens:
File "/usr/local/lib/python3.7/dist-packages/scenic/train_lib/pretrain_utils.py", line 269, in convert_bigvision_to_scenic_checkpoint
restored_params = tree['opt']['target']
KeyError: 'opt'
Can you please tell me what should I do?
Thanks in advance.
** ** commented on 17 Dec 2021 Hi, I have the same question. Do you have the solution?
We'll look into this soon and send a fix, but in the meantime, I think replacing restored_params = tree['opt']['target']
with restored_params = tree['target']
would solve the issue.
We'll look into this soon and send a fix, but in the meantime, I think replacing
restored_params = tree['opt']['target']
withrestored_params = tree['target']
would solve the issue.
Thanks for your answer. When I choose bigvision version, I download it through https://storage.googleapis.com/vit_models/imagenet21k/ViT-B_16.npz
Then this happens restored_params = tree['opt']['target'] KeyError: 'opt'
Then I replacing restored_params = tree['opt']['target'] with restored_params = tree['target']
. Another problem comes.
restored_params = tree['target'] KeyError: 'target'
We'll look into this soon and send a fix, but in the meantime, I think replacing
restored_params = tree['opt']['target']
withrestored_params = tree['target']
would solve the issue.Thanks for your answer. When I choose bigvision version, I download it through https://storage.googleapis.com/vit_models/imagenet21k/ViT-B_16.npz Then this happens
restored_params = tree['opt']['target'] KeyError: 'opt'
Then I replacingrestored_params = tree['opt']['target'] with restored_params = tree['target']
. Another problem comes.restored_params = tree['target'] KeyError: 'target'
Have the same issue, which version of the model should I use? Which one works?
tree
has these attributes only ['Transformer', 'cls', 'embedding', 'head', 'pre_logits']
I have a similar issue, have you known that which version of the model works?
I have a similar issue
did anyone find a solution?
@MostafaDehghani
I am facing similar issues. Can someone help me, What should I do, or What should I be looking at?
What do those "opt" and "target" refer to? Because I could not find those key-value pairs in the pre-train weight downloaded from
https://console.cloud.google.com/storage/browser/vit_models/augreg/