DeepLearning
Placeholder
define a placeholder for a Tensor
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
Placeholder(val,shape,opts)
val
-
type or Tensor
shape
(optional) dimensions of the placeholder
opts
zero or more options as described below
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 Placeholder(val,shape) command creates a placeholder Tensor in the active dataflow graph.
The parameter val can be a type or a Tensor.
If val is a type, a value must be supplied for this placeholder when the the graph is executed.
Note that this command requires that eager execution be turned off beforehand using the SetEagerExecution command.
This function is part of the DeepLearning package, so it can be used in the short form Placeholder(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[Placeholder](..).
with⁡DeepLearning:
SetEagerExecution⁡false
true
x≔Placeholder⁡float8
x≔DeepLearning TensorName: Placeholder:0Shape: undefinedData Type: float[8]
y≔3⁢x2
y≔DeepLearning TensorName: scalar_mul:0Shape: undefinedData Type: float[8]
sess≔GetDefaultSession⁡
sess≔DeepLearning Session<tensorflow.python.client.session.InteractiveSession object at 0x7fc5719e2550>
sess:-Run⁡y,xin1,2,3
3.12.27.
The DeepLearning[Placeholder] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
The DeepLearning[Placeholder] command was updated in Maple 2021.
The option was updated in Maple 2021.
See Also
DeepLearning Overview
Download Help Document