Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_38905368
tensorflow
提交
2cc5ed87
T
tensorflow
项目概览
qq_38905368
/
tensorflow
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tensorflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2cc5ed87
编写于
2月 24, 2016
作者:
J
Josh Levenberg
提交者:
TensorFlower Gardener
2月 25, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Execute TODO to explain graph-consumer usage of
RemoveNewDefaultAttrsFromGraphDef(). Change: 115506523
上级
8041c546
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
9 deletion
+15
-9
tensorflow/core/framework/graph_def_util.h
tensorflow/core/framework/graph_def_util.h
+15
-9
未找到文件。
tensorflow/core/framework/graph_def_util.h
浏览文件 @
2cc5ed87
...
...
@@ -65,7 +65,8 @@ Status AddDefaultAttrsToGraphDef(GraphDef* graph_def,
// compatible. If not nulllptr, the op/attr pairs that were removed
// are added to '*op_attr_removed'.
//
// Expected usage:
// Expected usage, for a producer that wants to prepare a graph for
// a consumer:
// // For each consumer, update 'graph_def':
// OpListOpRegistry consumer_op_registry(consumer_server_op_list);
// std::unordered_set<std::pair<string, string>> op_attr_removed;
...
...
@@ -78,8 +79,12 @@ Status AddDefaultAttrsToGraphDef(GraphDef* graph_def,
// // Consumer can use 'graph_def', and 'op_attr_removed' summarizes
// // what changes had to be made to 'graph_def' for it to work.
//
// TODO(josh11b): Describe how to use this function on the consumer using the
// stripped_op_list field from a producer.
// Expected usage, for a consumer that has a graph and a
// (optionally-stripped) op_list from a producer (say from a call to
// StrippedOpListForGraph(), or in the MetaGraphDef):
// OpListOpRegistry producer_op_registry(producer_stripped_op_list);
// TF_RETURN_IF_ERROR(RemoveNewDefaultAttrsFromGraphDef(
// &graph_def, *OpRegistry::Global(), producer_op_registry, nullptr));
Status
RemoveNewDefaultAttrsFromGraphDef
(
GraphDef
*
graph_def
,
const
OpRegistryInterface
&
consumer_op_registry
,
const
OpRegistryInterface
&
producer_op_registry
,
...
...
@@ -87,13 +92,14 @@ Status RemoveNewDefaultAttrsFromGraphDef(
// Collect the ops used by a graph.
//
// This function computes the stripped_op_list field of MetaGraphDef and similar
// protos. The op_registry should contain the ops used to produce graph_def,
// and stripped_op_list can be used as the producer_op_registry argument to
// RemoveNewDefaultAttrsFromGraphDef to improve forwards compatibility
// (using OpListOpRegistry to turn the OpList into an OpRegistryInterface).
// This function computes the stripped_op_list field of MetaGraphDef
// and similar protos. The op_registry should contain the ops used to
// produce graph_def. The resulting stripped_op_list can be
// communicated from the producer to the consumer, which can use
// RemoveNewDefaultAttrsFromGraphDef() to improve forwards compatibility
// (using an OpListOpRegistry as indicated in the example above).
//
// Most users will pass OpRegistry::Global() for op_registry to strip against
// Most users will pass
*
OpRegistry::Global() for op_registry to strip against
// the list of ops registered in this process.
Status
StrippedOpListForGraph
(
const
GraphDef
&
graph_def
,
const
OpRegistryInterface
&
op_registry
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录