February 2020
Intermediate to advanced
560 pages
22h 18m
English
Remember that a tensor is simply a data container. Every tensor has two fundamental properties: data type (dtype) and shape. dtype controls what kinds of values are stored within the tensor. A given tensor can store only one kind of value. At the time of this writing (version 0.13.5), the supported dtypes are float32, int32, and bool.
The shape is an array of integers indicating how many elements are in the tensor and how they are organized. It can be thought of as the “shape and size” of the container that is the tensor (see figure B.1).
The length of the shape is known as the tensor’s rank. For example, a 1D tensor, also known as ...
Read now
Unlock full access