MedSegDiff
MedSegDiff copied to clipboard
important code error: losses["loss"].detach() in train_util.py line 246
please check the losses variable
if isinstance(self.schedule_sampler, LossAwareSampler):
self.schedule_sampler.update_with_local_losses(
t, losses["loss"].detach()
)
losses = losses1[0]
sample = losses1[1]
I met the same situation. Do you know how to solve it now?
waiting for the author to reply...
you can simply put line 248 in front of it. actually this block will not be run in the current version
losses["loss"].detach() ---> losses1[0].detach() ?