modify_graph_and_start_emb_cache

功能描述

开启自动改图模式下的数据加载和预处理接口。

函数原型

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”

取值范围:

  • True:保存模型图
  • 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)

参考资源

接口调用流程及示例,参见模型迁移与训练