get_context

Description

Obtains the context of an operator. To access the information of an operator, its context must be obtained by using this API call before the member functions of the context are accessed.

Prototype

def get_context()

Parameters

None

Returns

An OpContext class object corresponding to the current context.

For details, see the definition of the OpContext class in the python/site-packages/tbe/common/context/op_context.py file.

Restrictions

None

Example

current_ctx = tbe.common.context.get_context()