RepSurf icon indicating copy to clipboard operation
RepSurf copied to clipboard

about flops and params

Open mmiku1 opened this issue 1 year ago • 2 comments

My training settings are consistent with the code you provided, batch_ Choose size 8, but the floats I measured differ significantly from the data in your article. Can you provide your testing method? this is my method : flops, params = profile(model.module, ([coord, feat, offset],)) print('flops: %.2fG' % (flops / 1e9), 'params: %.2fM' % (params / 1e6)) result : flops: 96.04G params: 0.98M

Module : repsurf.repsurf_umb_ssg

mmiku1 avatar Jul 29 '23 03:07 mmiku1

Do you perform the code for segmentation task? It needs a slight change as the input point num varies after grid sampling (FLOPs changes accordingly).

hancyran avatar Jul 29 '23 08:07 hancyran

Yes, I am testing the floats for segmentation tasks. May I know what to do.

for i, (coord, feat, target, offset) in enumerate(train_loader):  # [N, 3], [N, C], [N], [B]
    data_time.update(time.time() - end)
    coord, target, feat, offset = \
        coord.cuda(non_blocking=True), target.cuda(non_blocking=True), feat.cuda(non_blocking=True), \
        offset.cuda(non_blocking=True)

    output = model([coord, feat, offset])
    # flops, params = profile(model.module, ([coord, feat, offset],))
    # print('flops: %.2fG' % (flops / 1e9), 'params: %.2fM' % (params / 1e6))
    
    I added the code for testing floats here.
    If possible, I hope you can know how to conduct the correct testing.
    thx

mmiku1 avatar Jul 29 '23 09:07 mmiku1