modify_graph_and_start_emb_cache

Function

Enables the data loading and preprocessing APIs in automatic graph modification mode.

Prototype

1
def modify_graph_and_start_emb_cache(full_graph = None, dump_graph = False)

Parameters

Parameter

Type

Mandatory/Optional

Description

full_graph

tf.Graph

Optional

A graph instance can be transferred for graph modification. The default value is none, and none is assigned to tf.compat.v1.get_default_graph().

dump_graph

bool

Optional

Whether to save the model graph. The default value is False.

Value:

  • True: model graph saved
  • False: model graph not saved

Return Value

  • Success: None
  • Failure: An exception is thrown.

Example

1
2
3
4
from mx_rec.graph.modifier import modify_graph_and_start_emb_cache
MODIFY_GRAPH_FLAG = True
if MODIFY_GRAPH_FLAG:
    modify_graph_and_start_emb_cache(dump_graph=True)

See Also

For details about the API call sequence and example, see Porting and Training.