创建pytorch(1.0)张量时:
import torch
W = torch.tensor(([1.0]))
Pycharm(2018.3.1)给我以下警告:
'tensor' is not callable less... (Ctrl+F1)
Inspection info: This inspection highlights attempts to call objects which are not callable, like, for example, tuples
我的代码工作正常(tensor()是可调用的),但我想理解并摆脱此警告。
答案 0 :(得分:0)
This has been a known issue to them 。主持人回答:
我们将在下一版本中修复此问题。正在https://github.com/pytorch/pytorch/issues/7318
进行跟踪
但是,报告的问题是在PyTorch v0.4.1