开启自动改图模式下的数据加载和预处理接口。
1 | def modify_graph_and_start_emb_cache(full_graph = None, dump_graph = False) |
参数名 |
类型 |
可选/必选 |
说明 |
---|---|---|---|
full_graph |
tf.Graph |
可选 |
改图支持传入图实例,默认为“none”,“none”会被赋值为“tf.compat.v1.get_default_grap()”。 |
dump_graph |
bool |
可选 |
是否保存模型图,默认值为“False”。 取值范围:
|
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) |
接口调用流程及示例,参见模型迁移与训练。