RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future rel
程序员文章站
2022-03-04 14:10:21
...
RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future release div will perform true division as in Python 3. Use true_divide or floor_divide (// in Python) instead.
对于tensor A和整数n之间的除法:
result = A / n # not supported in torch 1.6.0
solution
result = torch.true_divide(A, n)
上一篇: 使用easyExcel导入大批量数据
下一篇: npm源管理
推荐阅读
-
【pytorch】RuntimeError: Integer division of tensors using div or / is no longer supported
-
【pytorch】RuntimeError: Integer division of tensors using div or / is no longer supported【解决】
-
【pytorch】【解决】RuntimeError: Integer division of tensors using div or / is no longer supported
-
RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future rel
-
RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future rel