Closed kido1412y2y closed 3 months ago
I calculate the FLOPs manually. In fact, i don't have a way to compute the FLOPs automatically.
I calculate the FLOPs manually. In fact, i don't have a way to compute the FLOPs automatically.
Thank you for your answer, may I ask if my calculation parameters are correct?
Yes, the way you use to calculate the parameters is correct.
Yes, the way you use to calculate the parameters is correct.
Thank you!
Hello author, I would like to know the parameters and Flops of the model. Therefore, I added code to output the parameter quantity in test_one_video.py. However, I'm unsure about how to output Flops. Do you have any suggestions?Looking forward to receiving your help.
test_one_video.py ....... def count_parameters(model): return sum(p.numel() for p in model.parameters() if p.requires_grad) ......
Define model and load state-dict
model = SLRModel( num_classes=1296, c2d_type='resnet18', conv_type=2, use_bn=1, gloss_dict=gloss_dict, loss_weights={'ConvCTC': 1.0, 'SeqCTC': 1.0, 'Dist': 25.0}, )
num_params = count_parameters(model) print("Model has {} parameters".format(num_params)) ......