wangshuang233 / DPEC-VM

Low Light Image Enhancement Network Based on Vision Mamba
9 stars 3 forks source link

How to calculate flops and params #1

Open Zzhy2000 opened 1 week ago

Zzhy2000 commented 1 week ago

Hello, I would like to ask how the flops and params of your model are calculated. Looking forward to your reply.

wangshuang233 commented 1 week ago

We referred to the parameters in Retinexformer and reproduced the results from the Retinexformer paper using the following settings. Additionally, we obtained the parameter results for our DPEC: import torch import torchvision from thop import profile

from Best_module.DPEC import net model = net() model = model.cuda() model.eval() dummy_input = torch.randn(1, 3, 256, 256).cuda() flops, params = profile(model, (dummy_input,)) print('flops: ', flops, 'params: ', params) print('flops: %.2f M, params: %.2f ' % (flops / 1000000.0, params))