通过我介绍大家可以知道使用的时候
in_data = http://www.kingceram.com/post/torch.randint(low=0,high=2,size=(1,3,50,50))label= torch.randint(low=0,high=2,size=(1,3,50,50))dice_loss = DiceLoss(include_background=False, to_onehot_y=False, softmax=False, reduction="mean")print(in_data.shape)print(dice_loss(in_data,label))