Pytorch的Reproducibility(可复现性)

对于Pytorch的结果复现,在不同版本的pytorch或者不同的硬件平台之间,不能够保证结果是完全一致的,即使在CPU和GPU上采用相同的随机数种子。

关于torch.backend.cudnn.benchmark, (CuDNN backend是什么

torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False

是相对来说确定性的模式。

包括Conv2d这样的函数,In some circumstances when using the CUDA backend with CuDNN, this operator may select a nondeterministic algorithm to increase performance. If this is undesirable, you can try to make the operation deterministic (potentially at a performance cost) by setting torch.backends.cudnn.deterministic = True.

转载于:https://www.cnblogs.com/yanxingang/p/10640878.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值