官术网_书友最值得收藏!

Tensors

While you may have heard of vectors and matrices before, the name tensor may be new. A tensor is a generalized matrix, and they have different sizes, or ranks, which measure their dimensions.

Tensors are three (or more)-dimensional lists; you can think of them as a sort of multi-dimensional object of numbers, such as a cube. Tensors have a unique transitive property and form; if a tensor transforms another entity, it too must transform. Any rank 2 tensor can be represented as a matrix, but not all matrices are automatically rank 2 tensors. A tensor must have this transitive property. As we'll see, this will come into play with neural networks in the next chapter. We can create tensors in Python such as the following: 

tensor = [[[1,2,3,4]],[[2,5,6,3]],[[7,6,3,4]]] 

Within the context of AI, tensors can represent things such as word embeddings or weights in a neural network. We'll talk about these more as we encounter at them in upcoming chapters. 

主站蜘蛛池模板: 德安县| 兴义市| 永胜县| 简阳市| 焉耆| 山东| 西贡区| 西宁市| 营山县| 武陟县| 梁山县| 阳曲县| 堆龙德庆县| 镇巴县| 新干县| 正蓝旗| 沈丘县| 蒙自县| 陈巴尔虎旗| 黄平县| 克山县| 平度市| 喀什市| 大田县| 兴义市| 东乡族自治县| 林州市| 德州市| 雅安市| 霍城县| 沁水县| 仙居县| 岑溪市| 丹江口市| 大悟县| 寿光市| 沁阳市| 南溪县| 田阳县| 泸溪县| 民权县|