import torch
rectangle_height = 3
rectangle_width = 3
inputs = torch.randn(rectangle_height, rectangle_width)
for i in range(rectangle_height):
for j in range(rectangle_width):
inputs[i] = i * torch.ones(rectangle_width)
'''
-->inputs = tensor([[0., 0., 0.],
[1., 1., 1.],
[2., 2., 2.]])
'''
12-17
06-02
1745
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-11
4014
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-16
1620
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)