UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead.
解决方法:
1.忽略warning
import warnings
warnings.filterwarnings("ignore", category=UserWarning)
2.将模型中非布尔变量进行转换
mask_resp = mask[:, :, :, 0:96:6]
mask_joint = mask[:, :, :, 1:96:6]
mask_limb = mask[:, :, :, 96:]
mask_resp=mask_resp.bool()
mask_joint=mask_joint.bool()
mask_limb=mask_limb.bool()