【torch.use_deterministic_algorithms运行报错解决办法】

YOLO训练时torch.use_deterministic_algorithms运行报错解决办法

    • YOLO训练时出现如下错误
    • 解决办法:在torch中(路径为:home/用户名/anaconda3/envs/py38/lib/python3.8/site-packages/torch)找到_init_.py,将以下Warn_only=True改为False.
    • 完美解决,开始训练

YOLO训练时出现如下错误

// Error
RuntimeError: upsample_bilinear2d_backward_out_cuda does not have a deterministic implementation, but you set 'torch.use_deterministic_algorithms(True)'. You can turn off determinism just for this operation, or you can use the 'warn_only=True' option, if that's acceptable for your application. You can also file an issue at https://github.com/pytorch/pytorch/issues to help us prioritize adding deterministic support for this operation.

解决办法:在torch中(路径为:home/用户名/anaconda3/envs/py38/lib/python3.8/site-packages/torch)找到_init_.py,将以下Warn_only=True改为False.

def use_deterministic_algorithms(mode, *, warn_only=True):

完美解决,开始训练

poch    GPU_mem   box_loss   obj_loss   cls_loss  Instances       Size
      0/399      3.64G    0.07086    0.02843    0.02626         14        640: 100%|██████████| 361/361 01:09
                 Class     Images  Instances          P          R      mAP50   mAP50-95: 100%|██████████| 40/40 00:27
                   all        626        721   5.53e-05    0.00797   2.82e-05    5.8e-06
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值