Exporting the operator linspace to ONNX opset version 11 is not supported.
torch.linspace貌似不支持转onnx
查阅资料后,用
torch.arange 来代替了,
但需要注意
torch.arange(start=0, end, step=1, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor
arrange返回的是 [start, end)之间步长为
的一维向量。且需要注意,返回的数组是大于等于start,小于end
o u t i + 1 = o u t i + s t e p out_{i+1}=out_i+step outi+1=outi+step