Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about flops and params #27

Open
mmiku1 opened this issue Jul 29, 2023 · 2 comments
Open

about flops and params #27

mmiku1 opened this issue Jul 29, 2023 · 2 comments

Comments

@mmiku1
Copy link

mmiku1 commented Jul 29, 2023

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

@hancyran
Copy link
Owner

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).

@mmiku1
Copy link
Author

mmiku1 commented Jul 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants