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

Online Help

All Products    Maple    MapleSim


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

Calling Sequence

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)

Parameters

t

-

Tensor

opts

-

zero or more options as specified below

Options

• 

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.

Description

• 

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.

Examples

withDeepLearning:

WConstant0.3,0.7,datatype=float8

WDeepLearning TensorShape: [2]Data Type: float[8]

(1)

bConstant0.3,0.2,datatype=float8

bDeepLearning TensorShape: [2]Data Type: float[8]

(2)

xVariable0.2,0.4,datatype=float8

xDeepLearning VariableName: Variable:0Shape: [2]Data Type: float[8]

(3)

linear_modelWx+b

linear_modelDeepLearning TensorShape: [2]Data Type: float[8]

(4)

yVariable1.0,0.,datatype=float8

yDeepLearning VariableName: Variable:0Shape: [2]Data Type: float[8]

(5)

lossReduceSumlinear_modely2

lossDeepLearning TensorShape: []Data Type: float[8]

(6)

Compatibility

• 

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

Tensor