File tree 1 file changed +13
-7
lines changed
1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -53,18 +53,24 @@ struct Tensor {
53
53
> BTW,高维数组的维数在张量中称为“阶数”(` order ` )。
54
54
55
55
``` plaintext
56
+ shape: []
57
+ ---------
56
58
x
57
59
```
58
60
59
61
- 数组,在深度学习程序中称为“向量”,表示为一个阶数为 1 的张量;
60
62
61
63
``` plaintext
64
+ shape: [x] = 6
65
+ --------------
62
66
[1, 2, 3, 4, 5, 6]
63
67
```
64
68
65
69
- 二维数组,在深度学习程序中称为“矩阵”,表示为一个阶数为 2 的张量;
66
70
67
71
``` plaintext
72
+ shape: [y x] = 3 x 4
73
+ --------------------
68
74
\------------/
69
75
| 1 2 3 4 |
70
76
| 5 6 7 8 |
@@ -108,12 +114,12 @@ shape: [ z y x] = 2 x 3 x 4
108
114
strides: [(n) sz sy sx] = (24) 12 4 1
109
115
-------------------------------------
110
116
/ z
111
- *--x ____________ -> ___________
112
- | / /| -> / /|
113
- y / 13 14 15 16| -> / +12 / |
114
- /----------/20| -> /--/------/ |
117
+ *--x ____________ ___________
118
+ | / /| / /|
119
+ y / 13 14 15 16| / +12 / |
120
+ /----------/20| /--/------/ |
115
121
|1 2 3 4|24| -> | O → +1 | /
116
- |5 6 7 8| / -> | ↓ | /
117
- |9 10 11 12|/ -> |+4 |/
118
- /----------/ -> /---------/
122
+ |5 6 7 8| / | ↓ | /
123
+ |9 10 11 12|/ |+4 |/
124
+ /----------/ /---------/
119
125
```
You can’t perform that action at this time.
0 commit comments