Rank - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

DeepLearning/Tensor/Rank

get rank of a Tensor

DeepLearning/Tensor/Shape

get shape of a Tensor

 Calling Sequence Rank(t) Shape(t)

Parameters

 t - Tensor

Description

 • The Rank(t) command returns an integer describing the rank of Tensor t.
 • The Shape(t) command returns a list describing the structure of the Tensor t.

Examples

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $t≔\mathrm{Constant}\left(⟨⟨-55.,-70.⟩,⟨-67.,13.⟩,⟨77.,-58.⟩⟩\right)$
 ${t}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Shape: \left[6, 1\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (1)
 > $\mathrm{Rank}\left(t\right)$
 ${2}$ (2)
 > $\mathrm{Shape}\left(t\right)$
 $\left[{6}{,}{1}\right]$ (3)

Compatibility

 • The DeepLearning/Tensor/Rank and DeepLearning/Tensor/Shape commands were introduced in Maple 2018.
 • For more information on Maple 2018 changes, see Updates in Maple 2018.