DeepLearning/Tensor/ReduceAll
compute logical And over entries of a Tensor
DeepLearning/Tensor/ReduceAny
compute logical Or over entries of a Tensor
DeepLearning/Tensor/ReduceJoin
compute logsumexp over entries of a Tensor
DeepLearning/Tensor/ReduceLogSumExp
concatenate strings over entries of a Tensor
DeepLearning/Tensor/ReduceMax
compute maximum over entries of a Tensor
DeepLearning/Tensor/ReduceMean
compute mean over entries of a Tensor
DeepLearning/Tensor/ReduceMin
compute minimum over entries of a Tensor
DeepLearning/Tensor/ReduceProduct
compute product over entries of a Tensor
DeepLearning/Tensor/ReduceSum
compute sum over entries of a Tensor
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
ReduceAll(t,opts)
ReduceAny(t,opts)
ReduceLogSumExp(t,opts)
ReduceJoin(t,opts)
ReduceMax(t,opts)
ReduceMean(t,opts)
ReduceMin(t,opts)
ReduceProduct(t,opts)
ReduceSum(t,opts)
t
-
Tensor
opts
zero or more options as specified below
axis=list(integer) or integer
The value of option axis is an integer or list of integers which describes which axis of the input Tensor to reduce across.
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.
The ReduceAll(t,opts) command computes the logical And of elements across a Tensor.
The ReduceAny(t,opts) command computes the logical Or of elements across a Tensor.
The ReduceJoin(t,opts) command concatenates string elements across a Tensor.
The ReduceLogSumExp(t,opts) command computes the logical logsumexp of elements across a Tensor. (This operation first exponentiates each entry being computed, adds the results, then takes the logarithm of the sum.)
The ReduceMax(t,opts) command computes the maximum of elements across a Tensor.
The ReduceMean(t,opts) command computes the mean of elements across a Tensor.
The ReduceMin(t,opts) command computes the minimum of elements across a Tensor.
The ReduceProduct(t,opts) command computes the product of elements across a Tensor.
The ReduceSum(t,opts) command computes the sum of elements across a Tensor.
with⁡DeepLearning:
W≔Constant⁡0.3,0.7,datatype=float8
W≔DeepLearning TensorShape: [2]Data Type: float[8]
b≔Constant⁡−0.3,0.2,datatype=float8
b≔DeepLearning TensorShape: [2]Data Type: float[8]
x≔Variable⁡0.2,0.4,datatype=float8
x≔DeepLearning VariableName: Variable:0Shape: [2]Data Type: float[8]
linear_model≔W⁢x+b
linear_model≔DeepLearning TensorShape: [2]Data Type: float[8]
y≔Variable⁡1.0,0.,datatype=float8
y≔DeepLearning VariableName: Variable:0Shape: [2]Data Type: float[8]
loss≔ReduceSum⁡linear_model−y2
loss≔DeepLearning TensorShape: []Data Type: float[8]
The DeepLearning/Tensor/ReduceAll, DeepLearning/Tensor/ReduceAny, DeepLearning/Tensor/ReduceJoin, DeepLearning/Tensor/ReduceLogSumExp, DeepLearning/Tensor/ReduceMax, DeepLearning/Tensor/ReduceMean, DeepLearning/Tensor/ReduceMin, DeepLearning/Tensor/ReduceProduct and DeepLearning/Tensor/ReduceSum commands were introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
See Also
DeepLearning Overview
Download Help Document