DeepLearning,Tensor,Maximum - Maple Programming Help

Home : Support : Online Help : Programming : DeepLearning Package : Tensors : Operations on Tensors : DeepLearning/Tensor/Maximum

DeepLearning,Tensor,Maximum

compute the pairwise maximum of two Tensors

DeepLearning,Tensor,Minimum

compute the pairwise minimum of two Tensors

 Calling Sequence Maximum(x,y,opts) Minimum(x,y,opts)

Parameters

 x - Tensor y - Tensor 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 Maximum(x,y,opts) command computes the pairwise maximum of Tensor objects x and y.
 • The Minimum(x,y,opts) command computes the pairwise minimum of Tensor objects x and y.

Examples

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $\mathrm{t1}≔\mathrm{Constant}\left(\left[\left[11.0,18.3\right],\left[12.1,20.3\right]\right],\mathrm{datatype}=\mathrm{float}\left[8\right]\right)$
 ${\mathrm{t1}}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: Const:0}}\\ {\mathrm{Shape: \left[2, 2\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (1)
 > $\mathrm{t2}≔\mathrm{Constant}\left(\left[\left[29.0,-5.7\right],\left[15.3,4.5\right]\right],\mathrm{datatype}=\mathrm{float}\left[8\right]\right)$
 ${\mathrm{t2}}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: Const_1:0}}\\ {\mathrm{Shape: \left[2, 2\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (2)
 > $\mathrm{value}\left(\mathrm{VariableInitializer}\left(\right)\right)$
 ${\mathrm{VariableInitializer}}{}\left(\right)$ (3)
 > $\mathrm{value}\left(\mathrm{Maximum}\left(\mathrm{t1},\mathrm{t2}\right)\right)$
 $\left[\begin{array}{cc}{29.}& {18.3000000000000}\\ {15.3000000000000}& {20.3000000000000}\end{array}\right]$ (4)
 > $\mathrm{value}\left(\mathrm{Minimum}\left(\mathrm{t1},\mathrm{t2}\right)\right)$
 $\left[\begin{array}{cc}{11.}& {-5.70000000000000}\\ {12.1000000000000}& {4.50000000000000}\end{array}\right]$ (5)

Compatibility

 • The DeepLearning,Tensor,Maximum and DeepLearning,Tensor,Minimum commands were introduced in Maple 2018.