Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
tensorflow
提交
2e7cc48e
T
tensorflow
项目概览
xxadev
/
tensorflow
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
1
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,发现更多精彩内容 >>
提交
2e7cc48e
编写于
3月 10, 2017
作者:
J
Justin Lebar
提交者:
TensorFlower Gardener
3月 10, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change for internal compatibility.
上级
25130ced
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
10 deletion
+14
-10
tensorflow/core/grappler/clusters/single_machine.cc
tensorflow/core/grappler/clusters/single_machine.cc
+4
-4
tensorflow/core/kernels/fused_batch_norm_op.cc
tensorflow/core/kernels/fused_batch_norm_op.cc
+3
-2
tensorflow/core/kernels/hexagon/graph_transferer.cc
tensorflow/core/kernels/hexagon/graph_transferer.cc
+6
-3
tensorflow/tools/graph_transforms/sparsify_gather.cc
tensorflow/tools/graph_transforms/sparsify_gather.cc
+1
-1
未找到文件。
tensorflow/core/grappler/clusters/single_machine.cc
浏览文件 @
2e7cc48e
...
...
@@ -41,7 +41,7 @@ SingleMachine::SingleMachine(int timeout_s, int num_cpu_cores, int num_gpus)
}
SingleMachine
::~
SingleMachine
()
{
CloseSession
(
false
/*use_timeout*/
);
CloseSession
(
false
/*use_timeout*/
)
.
IgnoreError
()
;
// Prevent the destructor from deleting mu_ until CloseSession() is done.
mutex_lock
l
(
mu_
);
...
...
@@ -164,18 +164,18 @@ Status SingleMachine::CloseSession(bool use_timeout) {
thread_pool_
->
Schedule
([
this
]
{
if
(
this
->
coordinator_
)
{
this
->
coordinator_
->
RequestStop
();
this
->
coordinator_
->
RequestStop
()
.
IgnoreError
()
;
// Wait for all the runners to have closed their queues.
while
(
!
this
->
coordinator_
->
AllRunnersStopped
())
{
sleep
(
1
);
}
// Now we can close the session. This should cancel any pending I/O
// operation.
this
->
session_
->
Close
();
this
->
session_
->
Close
()
.
IgnoreError
()
;
// Last but not least, we can delete the coordinator.
this
->
coordinator_
.
reset
();
}
else
{
this
->
session_
->
Close
();
this
->
session_
->
Close
()
.
IgnoreError
()
;
}
// Wait for any previous run to finish.
...
...
tensorflow/core/kernels/fused_batch_norm_op.cc
浏览文件 @
2e7cc48e
...
...
@@ -300,8 +300,9 @@ struct FusedBatchNorm<GPUDevice, T> {
GPUDevice
d
=
context
->
eigen_device
<
GPUDevice
>
();
using
perftools
::
gputools
::
DeviceMemory
;
Tensor
inv_var
;
context
->
allocate_temp
(
DataTypeToEnum
<
T
>::
value
,
estimated_variance
.
shape
(),
&
inv_var
);
OP_REQUIRES_OK
(
context
,
context
->
allocate_temp
(
DataTypeToEnum
<
T
>::
value
,
estimated_variance
.
shape
(),
&
inv_var
));
auto
inv_var_ptr
=
StreamExecutorUtil
::
AsDeviceMemory
<
T
>
(
inv_var
);
std
::
function
<
const
DeviceMemory
<
T
>&
()
>
var_to_inv_var
=
[
d
,
epsilon
,
estimated_variance
,
...
...
tensorflow/core/kernels/hexagon/graph_transferer.cc
浏览文件 @
2e7cc48e
...
...
@@ -96,7 +96,8 @@ Status GraphTransferer::LoadGraphFromProto(
shape_inference
::
ShapeHandle
handle
;
status
=
context
->
MakeShapeFromTensorShape
(
input_node_info
.
second
.
shape
(),
&
handle
);
shape_refiner
.
SetShape
(
node
,
0
,
handle
);
// TODO(b/32704451): Don't just ignore this status!
shape_refiner
.
SetShape
(
node
,
0
,
handle
).
IgnoreError
();
is_input_node
=
true
;
}
if
(
!
status
.
ok
())
{
...
...
@@ -395,9 +396,11 @@ void GraphTransferer::RegisterConstantNode(
const_node_info
.
add_shape
(
shape
[
2
]);
const_node_info
.
add_shape
(
shape
[
3
]);
const
TensorProto
*
proto
=
nullptr
;
GetNodeAttr
(
node
.
def
(),
"value"
,
&
proto
);
// TODO(b/32704451): Don't just ignore this status!
GetNodeAttr
(
node
.
def
(),
"value"
,
&
proto
).
IgnoreError
();
Tensor
const_tensor
;
MakeTensorFromProto
(
*
proto
,
&
const_tensor
);
// TODO(b/32704451): Don't just ignore this status!
MakeTensorFromProto
(
*
proto
,
&
const_tensor
).
IgnoreError
();
const_node_info
.
set_dtype
(
const_tensor
.
dtype
());
// TODO(satok): Remove. Determine constant value without dryrun
...
...
tensorflow/tools/graph_transforms/sparsify_gather.cc
浏览文件 @
2e7cc48e
...
...
@@ -146,7 +146,7 @@ Status SparsifyGather(const GraphDef& input_graph_def,
const
NodeDef
&
const_node
=
match
.
inputs
[
0
].
inputs
[
0
].
node
;
DataType
data_type
;
GetNodeAttr
(
const_node
,
"dtype"
,
&
data_type
);
TF_RETURN_IF_ERROR
(
GetNodeAttr
(
const_node
,
"dtype"
,
&
data_type
)
);
if
(
data_type
!=
DT_FLOAT
)
{
return
tensorflow
::
errors
::
FailedPrecondition
(
"Transform only applicable to subgraph with 'Const' of dtype "
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录