Understanding Tensor (1): Dimension

1.First of all

Organize the information you need to understand Tensor as your own notes. At the same time, I will introduce the Tensor notation in Python.

2. What is a tensor?

  1. Tensor is a just a container for data.
  2. The data are almost numerical data
  3. Therefore, Tensor is a container for number.

A tensor is a container that holds numbers. It's simple. There are various explanations about tensors as shown in the figure below, but the point is ** a container to put numbers **.

tensor01.jpg tensor02.jpg tensor03.jpg

3. Tensor keywords

It means Tensor, Dimension, Axis, Ranks.

  1. Tensor is a container of numbers.
  2. Tensor is a generalization of matrices to an arbitrary number of dimensions.
  3. In tensor, dimension is often called axis.
  4. Number of dimension (=Number of axis) is called ranks.

A tensor is a generalized representation of the matrix.

name tensor Notation
Scalar 0 Dimensional Tensor Not Available
Vector 1 Dimensional Tensor (k)
Matrix 2 Dimensional Tensor (j,k)
.. 3 Dimensional tensor (i,j,l)

tensor-keyword.png

4. Tensor Dimension

Here's an example of a tensor, how to fill in Python. Python uses ** [] ** to represent lists. Let's get used to this expression quickly. You can check the Dimension of Tensor with the ndmi command of numpy.

4.1 Scalar : 0D Tensor A tensor that contains only one number is called a scalar.

scalar.png

4.2 Vector : 1D Tensor An array of number is called a vector, or 1D tensor. Vector.png

4.3 Matrix : 2D Tensor An array of vecotrs is a matrix, or 2D tensor. matrix.png

4.4 .. :3D Tensor It is just nD tensor from 3D tensor. 3dtensor.png

5. Summary

A tensor is a container that holds numbers. I organized the meaning of Dimension (= axis) of Tensor and the expression in Python. Next time, I will introduce Tensor's Shape.

Understanding the tensor (2): Shape

Recommended Posts

Understanding Tensor (1): Dimension
Understanding the Tensor (2): Shape
Understanding the Tensor (3): Real World Data
Understanding VQ-VAE
Understanding Concatenate