 Tensor - Maple Help

DeepLearning

 Tensor
 tensor object for DeepLearning computation Description

 • A Tensor is an object representing a node in a DataflowGraph.
 • A Tensor corresponds to a partially-defined computation which, when executed in a Session, produces a concrete instance of multidimensional data.
 • By performing mathematical or other operations with Tensors, you are implicitly creating additional Tensors and extending the computation graph.
 • All Tensors have a datatype and a shape. The datatype is always known. The shape may be either fully or partially specified when the Tensor is created. Properties of Tensors

 • The following commands query properties of a Tensor. Elementwise Operations on Tensors

 • The following functions operate elementwise on a Tensor. Matrix Operations with Tensors

 • The following functions operate on Tensors as matrices. Other Operations on Tensors Examples

Create a Variable Tensor

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $V≔\mathrm{Variable}\left(\left[1.5,7.2,2.3\right],\mathrm{datatype}=\mathrm{float}\left[8\right]\right)$
 ${V}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: Variable:0}}\\ {\mathrm{Shape: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (1)

Create a Placeholder Tensor

 > $P≔\mathrm{Placeholder}\left(\mathrm{float}\left[4\right],\left[3,2\right]\right)$

Create a Constant Tensor

 > $C≔\mathrm{Constant}\left(⟨⟨0.4,0.7⟩|⟨0.7,-0.3⟩⟩\right)$
 ${C}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (2) Compatibility

 • The DeepLearning[Tensor] command was introduced in Maple 2018.