Let be a field such as the real numbers . A tensor is an array over :
Here, and are positive integers, and is the number of dimensions.
One basic approach (not the only way) to using tensors in machine learning is to embed various data types directly. For example, a grayscale image, commonly represented as a discrete 2D function with resolution may be embedded in a mode-2 tensor as
A color image with 3 channels for RGB might be embedded in a mode-3 tensor with three elements in an additional dimension:
In natural language processing, a word might be expressed as a vector via the Word2vec algorithm. Thus becomes a mode-1 tensor
The embedding of subject-object-verb semantics requires embedding relationships among three words. Because a word is itself a vector, subject-object-verb semantics could be expressed using mode-3 tensors
Commenti