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

Online Help

All Products    Maple    MapleSim


DeepLearning

  

Constant

  

create a constant Tensor

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Constant(c,opts)

Parameters

c

-

real or complex constant, Matrix, Vector, or list

opts

-

zero or more options as specified below

Options

• 

datatype=one of string,truefalse,integer[4],integer[8],float[4],float[8],complex[4], or complex[8]

  

The value of option datatype specifies the type of data this Tensor will hold. By default, the datatype is inferred from the value c.

• 

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 Constant(c) command creates a Tensor in the active dataflow graph whose value is the constant value c.

• 

This function is part of the DeepLearning package, so it can be used in the short form Constant(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[Constant](..).

Examples

withDeepLearning:

Define a constant Tensor and evaluate it in the current session.

t1Constant2.0

t1DeepLearning TensorShape: []Data Type: float[4]

(1)

Define a constant Tensor and evaluate it in the current session.

t2Constant1+2I,3+4I,12I,57I

t2DeepLearning TensorShape: [4, 1]Data Type: complex[8]

(2)

Compatibility

• 

The DeepLearning[Constant] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

DeepLearning Overview