-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I calculate the model flops as below. And the result is FLOPs = 114.511724544G Params = 27.327015M. But the provided flops for
DRCT-L is 11.07G. Is there something wrong ?
from thop import profile
import torch
model = DRCT(upscale=4, in_chans=3, img_size= 64, window_size= 16, compress_ratio= 3,squeeze_factor= 30,
conv_scale= 0.01, overlap_ratio= 0.5, img_range= 1., depths= [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
embed_dim= 180, num_heads= [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], gc= 32,
mlp_ratio= 2, upsampler= 'pixelshuffle', resi_connection= '1conv').cuda()
img = torch.randn((1,3,64,64)).requires_grad_(True).cuda()
flops, params = profile(model, inputs=(img,))
print('FLOPs = ' + str(flops/1000**3) + 'G')
print('Params = ' + str(params/1000**2) + 'M')`
Metadata
Metadata
Assignees
Labels
No labels