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
got error when I turn on mpp (Masked Patch Prediction) #18
Comments
Hi @GewelsJI I've removed MPP-related features from the model code, and the left MPP-related codes are legacies. If you want to test MPP, adding the following code at https://github.com/dandelin/ViLT/blob/master/vilt/modules/vision_transformer.py#L507 might solve the problem. if config is not None and config["loss_names"]["mpp"] > 0:
self.mask_token = nn.Parameter(torch.zeros(1, 1, embed_dim))
trunc_normal_(self.mask_token, std=0.02) |
Yes. It works. Thank you for your help. |
Hi @dandelin, Sorry to bother you again. Could you please illustrate the usage of parameters in this line:
I have no idea to adjust the Thank you again. Best regards, |
Hi @GewelsJI The The training script automatically uses gradient accumulation when it is not able to run full batch size at once. And the actual batch size per single iteration is calculated here: So the |
Ok, I get it. Thank you again. Best, |
Hi, @GewelsJI Those two objectives are also legacies like MPP. |
Get it! Thank you! |
Hi, @dandelin
When I turn on the mpp (Masked Patch Prediction), I get this error:
AttributeError: 'VisionTransformer' object has no attribute 'mask_token'
The above error is appear in vision_transformer.py. Could you please tell me how to address it?
Thank you for your help.
Best regards,
Ge-Peng.
The text was updated successfully, but these errors were encountered: