Closed akashpalrecha closed 3 years ago
@akashpalrecha Thanks for the report.
If the parameters type mismatch, I would recommend call double()
on a module level, not in the __init__
call, as float32 is the default type for PyTorch.
net = NMF(cube.shape, rank=7).double().cuda()
Reproduce the error using:
where
cube
andH
are both torch.float64 types. Whenever beta is2.0
, a floating type mismatch occurs at theloss.backward()
part of the optimization.This PR solves that issue.