GetDefaultGraph - Maple Help

DeepLearning

 GetDefaultGraph
 get default dataflow graph

 Calling Sequence GetDefaultGraph()

Description

 • The GetDefaultGraph() command returns a DataflowGraph object corresponding to the default dataflow graph for the current thread.
 • 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 GetDefaultGraph(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[GetDefaultGraph](..).

Examples

Create a Tensor and verify it was created in the default dataflow graph.

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $\mathrm{SetEagerExecution}\left(\mathrm{false}\right)$
 ${\mathrm{true}}$ (1)
 > $g≔\mathrm{GetDefaultGraph}\left(\right)$
 > $t≔\mathrm{Tensor}\left(\left[1.5,2.0\right]\right)$
 > $\mathrm{evalb}\left(g=\mathrm{Graph}\left(t\right)\right)$
 ${\mathrm{true}}$ (2)

Compatibility

 • The DeepLearning[GetDefaultGraph] command was introduced in Maple 2018.