Closed PanYuQi66666666 closed 5 months ago
More importantly, I would like to ask why I found 139.45 when loading your rf_model on Google Cloud Drive on the offline test set for single model Cider 140.4 mentioned in the paper. Is there any problem with me?
Hi,
Regarding the parameters, adding these lines after the model creation in train.py
/ test.py
/ demo.py
should do the trick:
def count_parameters(model):
return sum(p.numel() for p in model.parameters() if p.requires_grad)
print("The model has " + str(count_parameters(model)) + " parameters")
About the second question, there is no problem with your implementation. During the creation of this repository, I found a strange practice with other popular works at that time, of not uploading the checkpoint that appears in the single model configuration. I never quite figured out why and, at that time, I had decided to follow the same practice until I discovered the reason.
However, since it's been a lot and I still have not figured it out, I will just upload also that one to the drive :-)
Check the online drive, it is called rf_model_140.4.pth
Hello, about the parameter test, the result I measured is The model has 233803076 parameters, rf_model, this result looks inconsistent with the paper, is there something wrong with me? @jchenghu
No, your implementation should be fine, they are expected to be different because the paper reports the number of parameters without the backbone, whereas the checkpoint contains the full model.
The following code should give you a closer result:
def count_parameters(model):
return sum(p.numel() for p in model.parameters() if p.requires_grad)
print("The model w/o backbone has " + str(count_parameters(model) - count_parameters(model.swin_transf)) + " parameters")
Hi I'm closing since the initial issue was solved, feel free to open a new one in the future
Best, JIa
Hello, can you provide a code for measuring the number of model parameters?