DeepLearning - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : DeepLearning Package : DeepLearning Types : DeepLearning/SessionObject

DeepLearning

  

SessionObject

  

object for DeepLearning computation session

 

Description

Creating and Using Sessions

Operations with Sessions

Examples

Compatibility

Description

• 

A Session is an object which encapsulates the context in which Tensor objects within a DataflowGraph are evaluated.

• 

There can be more than one Session for the same DataflowGraph, and each Session has its own state and resources.

Creating and Using Sessions

• 

To obtain the default computation session for the current graph, use the GetDefaultSession command.

• 

To obtain a new session, use the Session command.

Operations with Sessions

• 

The following functions can be performed with a Session.

Run

 

 

 

Examples

Here we execute the same simple graph (which performs arithmetic with three Tensors) in the default computation session and in a new session.

withDeepLearning:

t1Variable1.5,2.0,datatype=float8

t1DeepLearning TensorName: Variable:0Shape: [2]Data Type: float[8]

(1)

t2Variable2.5,6.0,datatype=float8

t2DeepLearning TensorName: Variable_1:0Shape: [2]Data Type: float[8]

(2)

t3Variable7.2,4.2,datatype=float8

t3DeepLearning TensorName: Variable_2:0Shape: [2]Data Type: float[8]

(3)

initVariablesInitializer

initDeepLearning TensorName: initShape: undefinedData Type: undefined

(4)

dft_sessGetDefaultSession

dft_sessDeepLearning Session<tensorflow.python.client.session.InteractiveSession object at 0x7f1bebeebbd0>

(5)

dft_sess:-Runinit

Python:−None

(6)

dft_sess:-Runt1t2+t3

10.950000000000016.2000000000000

(7)

new_sessSession

new_sessDeepLearning Session<tensorflow.python.client.session.Session object at 0x7f1b91de6dd0>

(8)

new_sess:-Runinit

Python:−None

(9)

new_sess:-Runt1t2+t3

10.950000000000016.2000000000000

(10)

Compatibility

• 

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

• 

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

See Also

DeepLearning Overview

GetDefaultSession

Session