chatgpt
how to get the shape of a tensor used '[' or ']' not use computer just see
If you want to get the shape of a tensor by looking at its bracket notation []
without using a computer, you can count the number of elements inside each bracket. The number of elements inside each bracket corresponds to the size of the tensor along that dimension.
For example, consider the following tensor:
[[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]
To get the shape of this tensor, we count the number of elements inside each bracket. There are two elements inside the outermost bracket, which means that the tensor has size 2 along its first dimension. Each element inside the outermost bracket is itself a list with size 2, so the tensor has size 2 along its second dimension. Finally, each element inside the innermost bracket is a list with size 3, so the tensor has size 3 along its third dimension.
Putting this together, the shape of the tensor is (2, 2, 3)
.
我只能说,太牛逼了。