=np.array(l) #numpy数组
print('list=',l)
print('np.array=',nparray)
x=torch.tensor(nparray) #numpy数组转张量...,x)
# 随机矩阵生成
# torch.rand(size) # 数值范围[0, 1), size = [2,3] or 2,3
# torch.rand_like(input, dtype) # 形状和...张量的形状需要匹配的
# torch.ceil(input,out) # 向上取整
# torch.clamp(input,min,max,out=None) # 将元素调整至[min,max]区间...01
# torch.equal(tensor1, tensor2) # bool 张量比较shape and value返回bool
# torch.ge(input, other, out=None..., out=None) # Tensor 小于
# torch.max(input, dim, max=None, max_indices=None) -> (Tensor, LongTensor) 返回指定维度最大值和索引