Closed makhovds closed 11 hours ago
The inference time in the table is calculated on the NYU dataset, while the FLOPs are calculated on the RGB-D-D dataset with a resolution of 512*384. You can use the following code to calculate it:
import torch
from thop import profile
import models.SGNet as Net
model = Net.SGNet(num_feats=40, kernel_size=3, scale=8)
rgb = torch.randn(1, 3, 384, 512)
d = torch.randn(1, 1, 48, 64)
input = (rgb,d)
flops, params = profile(model, (input,))
print('+++++++++++++++++++++++++++++++')
print('params: %.2f M, flops: %.2f G' % (params / 1e6, flops / 1e9))
print('+++++++++++++++++++++++++++++++')
Good day, thank you for sharing the code and the full pipeline for training and testing of your network. I have a question on the calculation of Flops in table 5 in your paper. Using the following simple snippet:
I achieve 7.22 TFLOPs instead of 4623.9 GFLOPs with this snippet. Could you please clarify how did you estimate the FLOPs for your network?