You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run HSAN on cpu ( args.device is "cpu") but an exception was raised.
I noticed that .cuda() methods are called on the pytorch tensors pos_weight/pos_neg_weight when creating HardSampleAwareNetwork instance. All tensors should respect the args.device and all model parameters should be moved as a whole between CPU and GPU. PyTorch would move all registered parameters when .to(device) is called on a module. So I think maybe we should treat pos_weight/pos_neg_weight as parameters of the HSAN module.
The text was updated successfully, but these errors were encountered:
I tried to run HSAN on cpu ( args.device is "cpu") but an exception was raised.
I noticed that
.cuda()
methods are called on the pytorch tensorspos_weight
/pos_neg_weight
when creatingHardSampleAwareNetwork
instance. All tensors should respect theargs.device
and all model parameters should be moved as a whole between CPU and GPU. PyTorch would move all registered parameters when.to(device)
is called on a module. So I think maybe we should treatpos_weight
/pos_neg_weight
as parameters of the HSAN module.The text was updated successfully, but these errors were encountered: