You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you can try to add following code in your test script:
from mmcv.cnn.utils.flops_counter import add_flops_counting_methods
flops_model = add_flops_counting_methods(model)
for i, data in enumerate(data_loader):
flops_model.start_flops_count()
with torch.no_grad():
result = flops_model(return_loss=False, rescale=True, **data)
flops, params = flops_model.compute_average_flops_cost()
flops_model.stop_flops_count()
print('flops: ', flops)
print('params', params)
Hello, may I ask if you can provide the script of calculating FLOPS
The text was updated successfully, but these errors were encountered: