Graph.set_option()

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

Overview

This method sets an option for the graph. The available options and possible values can be found in the GraphOption enumeration.

Syntax

graph.set_option(option, value)

Parameters

Parameter Type Description
option int A member of the GraphOption enumeration that specifies which graph option to set.
value varies The new value to which the graph option will be set.

The type to pass for this parameter depends on which option is being set. See the GraphOption enumeration for the type that corresponds to each option.

Return

None

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('mygraph')

# Set the RW_EXECUTORS_NUM for the Graph
graph.set_option(mvncapi.GraphOption.RW_EXECUTORS_NUM, 2)

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