Is that ok to change variable‘s type in a custom loss function?
it seems work, but i am not sure if it can back propagate correctly
score =torch.sum(seg*gt).type(torch.FloatTensor)*2 /(torch.sum(seg) + torch.sum(gt)).type(torch.FloatTensor)
both seg and gt are longtesnsor type