公众号【计算机视觉联盟】后台回复【PyTorch】可以获得独家PyTorch学习教程pdf版
举例子说明torch.full()使用方法:
t = torch.full((3,3),10)
print("torch.full((3,3),10)的输出结果\n",t)
运行结果呢:
torch.full((3,3),10)的输出结果
tensor([[10., 10., 10.],
[10., 10., 10.],
[10., 10., 10.]])
推荐阅读:
PyTorch | torch.from_numpy使用方法