Giter Club home page Giter Club logo

Comments (6)

SkeletonOne avatar SkeletonOne commented on June 8, 2024 5

I have figured it out. The thing is for the inputs of torch.max, one is float and the other is double.
Solution: In ./centermask/modeling/centermask/mask_head.py, change
value_eps = 1e-10 * torch.ones(gt_masks.shape[0], device=gt_masks.device)
to
value_eps = 1e-10 * torch.ones(gt_masks.shape[0], device=gt_masks.device).double()
and also change
value_1 = torch.ones(pred_masks.shape[0], device=gt_masks.device)
to
value_1 = torch.ones(pred_masks.shape[0], device=gt_masks.device).double().

from centermask2.

SkeletonOne avatar SkeletonOne commented on June 8, 2024

Have you solved it? I meet the same problem.

from centermask2.

VladKatsman avatar VladKatsman commented on June 8, 2024

Now it evokes a new problem.

{'loss_mask': tensor(0.6932, device='cuda:1', grad_fn=),
'loss_maskiou': tensor(0.5323, device='cuda:1', dtype=torch.float64, grad_fn=),
'loss_fcos_cls': tensor(1.0558, device='cuda:1', grad_fn=),
'loss_fcos_loc': tensor(0.8615, device='cuda:1', grad_fn=),
'loss_fcos_ctr': tensor(0.5908, device='cuda:1', grad_fn=)}

loss_maskiou is of type double now instead of float

next change of line 167 helps
return mask_loss, selected_mask, gt_classes, maskiou_targets.float().detach()

from centermask2.

youngwanLEE avatar youngwanLEE commented on June 8, 2024

@VladKatsman

Could you send the PR?

from centermask2.

ArtificialNotImbecile avatar ArtificialNotImbecile commented on June 8, 2024

Is this issue related to pytorch version? Since with pytorch==1.40, I have to comment .double() to make training work.

from centermask2.

ChristofferEdlund avatar ChristofferEdlund commented on June 8, 2024

Heads up, this update will only work with pytorch > 1.5 , and will break build with pytorch versions less then that.

from centermask2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.