 Unstack - Maple Help

DeepLearning/Tensor/Unstack

unstack a Tensor Calling Sequence Unstack(x,axis,opts) Parameters

 x - Tensor axis - integer opts - zero or more options as specified below Options

 • name=string

The value of option name specifies an optional name for this Tensor, to be displayed in output and when visualizing the dataflow graph. Description

 • The Unstack(x,axis,opts) unpacks Tensors from x by splitting across the dimension specified by axis. The result is a list of Tensors corresponding to the slices of the original Tensor from the specified dimension. Examples

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $v≔\mathrm{Constant}\left(⟨-35.0,65.0,41.0,67.2⟩\right)$
 ${v}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (1)
 > $\mathrm{Unstack}\left(v,1\right)$
 $\left[\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: \left[\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]{,}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: \left[\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]{,}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: \left[\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]{,}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: \left[\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]\right]$ (2)
 > $m≔\mathrm{Constant}\left(⟨⟨-92.1,-31.3,67.3⟩|⟨56.2,65.3,98.7⟩⟩\right)$
 ${m}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (3)
 > $\mathrm{Unstack}\left(m,1\right)$
 $\left[\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]{,}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]{,}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]\right]$ (4)
 > $\mathrm{Unstack}\left(m,2\right)$
 $\left[\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]{,}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: none}}\\ {\mathrm{Shape: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]\right]$ (5) Compatibility

 • The DeepLearning/Tensor/Unstack command was introduced in Maple 2019.