th> a=torch.range(1,5) [0.0001s] th> a 1 2 3 4 5 [torch.DoubleTensor of size 5] [0.0002s] th> a=torch.range(1,5,2) [0.0001s] th> a 1 3 5 [torch.DoubleTensor of size 3]
th> a=torch.range(1,5) [0.0001s] th> a 1 2 3 4 5 [torch.DoubleTensor of size 5] [0.0002s] th> a=torch.range(1,5,2) [0.0001s] th> a 1 3 5 [torch.DoubleTensor of size 3]
上一篇:norm函数
下一篇:输出多个重复字符或字符串
如果你需要一个数值序列,使用内建函数range() 会很方便,它产生等差级数序列。以下代码生
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M