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

# Online Help

###### All Products    Maple    MapleSim

DeepLearning

 Session
 get a new computation session

 Calling Sequence Session()

Description

 • The Session() command returns a new Session object for the current DataflowGraph.
 • This function is part of the DeepLearning package, so it can be used in the short form Session(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[Session](..).

Note

 • To obtain the default computation session for the current DataFlowGraph rather than a new session, use GetDefaultSession.

Examples

Here we execute the same simple graph (which just multiplies two Tensors) in the default computation session and in a new session.

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $a≔\mathrm{Variable}\left(\left[21.5,72.0\right],\mathrm{datatype}={\mathrm{float}}_{8}\right)$
 ${a}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Variable}}\\ {\mathrm{Name: Variable:0}}\\ {\mathrm{Shape: \left[2\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (1)
 > $b≔\mathrm{Variable}\left(\left[32.5,86.0\right],\mathrm{datatype}={\mathrm{float}}_{8}\right)$
 ${b}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Variable}}\\ {\mathrm{Name: Variable:0}}\\ {\mathrm{Shape: \left[2\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (2)
 > $c≔\mathrm{Variable}\left(\left[17.2,94.2\right],\mathrm{datatype}={\mathrm{float}}_{8}\right)$
 ${c}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Variable}}\\ {\mathrm{Name: Variable:0}}\\ {\mathrm{Shape: \left[2\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (3)

Compatibility

 • The DeepLearning[Session] command was introduced in Maple 2018.
 • For more information on Maple 2018 changes, see Updates in Maple 2018.

 See Also