Graph.get_option()

Info Value
Package mvnc
Module mvncapi
Version 2.0
See also Graph, GraphOption, Graph.set_option()

Overview

This method returns the value of an option for the Graph. The available options and possible values can be found in the GraphOption enumeration.

Syntax

value = graph.get_option(option)

Parameters

Parameter Type Description
option int A member of the GraphOption enumeration that specifies which option value to get.

Return

value

The value for the specified option. The value type depends on the option specified. See the GraphOption enumeration for the type that corresponds to each option.

Raises

Exception with a Status.INVALID_PARAMETERS code if an invalid option is passed or Exception with a status code from Status if underlying function calls return a status other than Status.OK.

Notes

Example

from mvnc import mvncapi

# Create a graph
graph = mvncapi.Graph('graph1')

# Print the name of the Graph
print('The graph name is', graph.get_option(mvncapi.GraphOption.RO_GRAPH_NAME))

# Destroy the Graph when done using it
graph.destroy()