DeepLearning/Tensor/Rank - Maple Programming Help

Home : Support : Online Help : Programming : DeepLearning Package : Tensors : Query Properties of Tensors : DeepLearning/Tensor/Rank

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{Name: Const:0}}\\ {\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.