-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A quesiton about load_state_dict #7
Comments
you may use lightvit.load_state_dict(pretrained_state_dict["state_dict"]) |
Can you provide more detailed error logs? |
Thank you! I successfully loaded the pre-trained model, but this error occurs when I use the following code: to see the form of the tensor output before the pooling layer: |
You cannot simply wrap the children to nn.Sequential since some blocks require |
I see in the diagram of the paper that the average pooling layer is in the HEAD section, does looking at this code mean that the pooling operation is not necessarily performed? |
pretrained_weights_path = 'lightvit_tiny_78.7.ckpt'
pretrained_state_dict = torch.load(pretrained_weights_path)
lightvit = lightvit_tiny(pretrained=False)
lightvit.load_state_dict(pretrained_state_dict)
I use about code to use pretrained lightvit_tiny model, but it's useless, how can i pretrained lightvit_tiny model correctly?
The text was updated successfully, but these errors were encountered: