报错信息:
UserWarning: torch.range is deprecated in favor of torch.arange and will be removed in 0.5. Note that arange generates values in [start; end), not [start; end].
就是说,我们现在用的
torch.range(0,m)
得到的结果是:0,1,2,.....m!
有点不符合大众化,左区右开!
所以改成下面这样即可!
torch.arange(0,m)
得到的结果:0,1,2....m-1
博客提到当前使用的内容有点不符合大众化,呈现左区右开的情况,指出改成特定方式即可,但未明确具体修改内容。
1254

被折叠的 条评论
为什么被折叠?



