Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_38905368
tensorflow
提交
7c36309c
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,体验更适合开发者的 AI 搜索 >>
提交
7c36309c
编写于
1月 03, 2017
作者:
R
Rohan Jain
提交者:
GitHub
1月 03, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6619 from rohan100jain/branch_143464290
Branch 143464290
上级
50d06513
42a4d5c5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
37 addition
and
8 deletion
+37
-8
tensorflow/core/framework/graph_def_util_test.cc
tensorflow/core/framework/graph_def_util_test.cc
+5
-5
tensorflow/core/kernels/BUILD
tensorflow/core/kernels/BUILD
+1
-1
tensorflow/core/kernels/lookup_table_init_op.cc
tensorflow/core/kernels/lookup_table_init_op.cc
+1
-1
tensorflow/python/summary/event_accumulator.py
tensorflow/python/summary/event_accumulator.py
+4
-1
tensorflow/python/summary/event_accumulator_test.py
tensorflow/python/summary/event_accumulator_test.py
+26
-0
未找到文件。
tensorflow/core/framework/graph_def_util_test.cc
浏览文件 @
7c36309c
...
...
@@ -246,7 +246,7 @@ TEST(StrippedOpListForGraphTest, FlatTest) {
FunctionDef
*
function_def
=
graph_def
.
mutable_library
()
->
add_function
();
function_def
->
mutable_signature
()
->
set_name
(
"F"
);
for
(
const
string
&
op
:
graph_ops
[
order
])
{
function_def
->
add_node
()
->
set_op
(
op
);
function_def
->
add_node
_def
()
->
set_op
(
op
);
}
graph_def
.
add_node
()
->
set_op
(
"F"
);
}
else
{
...
...
@@ -293,11 +293,11 @@ TEST(StrippedOpListForGraphTest, NestedFunctionTest) {
FunctionDef
*
c
=
graph_def
.
mutable_library
()
->
add_function
();
b
->
mutable_signature
()
->
set_name
(
"B"
);
c
->
mutable_signature
()
->
set_name
(
"C"
);
b
->
add_node
()
->
set_op
(
"A"
);
c
->
add_node
()
->
set_op
(
"B"
);
b
->
add_node
_def
()
->
set_op
(
"A"
);
c
->
add_node
_def
()
->
set_op
(
"B"
);
if
(
recursive
)
{
b
->
add_node
()
->
set_op
(
"B"
);
c
->
add_node
()
->
set_op
(
"C"
);
b
->
add_node
_def
()
->
set_op
(
"B"
);
c
->
add_node
_def
()
->
set_op
(
"C"
);
}
// Use C in the graph.
...
...
tensorflow/core/kernels/BUILD
浏览文件 @
7c36309c
...
...
@@ -18,7 +18,7 @@ licenses(["notice"]) # Apache 2.0
package_group
(
name
=
"friends"
,
packages
=
[
"//learning/deepmind/
tensorflow/
..."
,
"//learning/deepmind/..."
,
"//tensorflow/..."
,
],
)
...
...
tensorflow/core/kernels/lookup_table_init_op.cc
浏览文件 @
7c36309c
...
...
@@ -177,7 +177,7 @@ class TextFileLineIterator
return
;
}
if
(
next_id_
>=
vocab_size_
)
{
LOG
(
WARNING
)
<<
"Truncated "
<<
filename_
<<
" before it
'
s end at "
LOG
(
WARNING
)
<<
"Truncated "
<<
filename_
<<
" before its end at "
<<
vocab_size_
<<
" records."
;
LOG
(
WARNING
)
<<
"next_id_ : "
<<
next_id_
;
status_
=
errors
::
OutOfRange
(
"Finished reading "
,
vocab_size_
,
...
...
tensorflow/python/summary/event_accumulator.py
浏览文件 @
7c36309c
...
...
@@ -709,7 +709,10 @@ def _CompressHistogram(histo_ev, bps):
# See also: Histogram::Percentile() in core/lib/histogram/histogram.cc
histo
=
histo_ev
.
histogram_value
if
not
histo
.
num
:
return
[
CompressedHistogramValue
(
b
,
0.0
)
for
b
in
bps
]
return
CompressedHistogramEvent
(
histo_ev
.
wall_time
,
histo_ev
.
step
,
[
CompressedHistogramValue
(
b
,
0.0
)
for
b
in
bps
])
bucket
=
np
.
array
(
histo
.
bucket
)
weights
=
(
bucket
*
bps
[
-
1
]
/
(
bucket
.
sum
()
or
1.0
)).
cumsum
()
values
=
[]
...
...
tensorflow/python/summary/event_accumulator_test.py
浏览文件 @
7c36309c
...
...
@@ -351,6 +351,32 @@ class MockingEventAccumulatorTest(EventAccumulatorTest):
wall_time
=
2
,
step
=
12
,
compressed_histogram_values
=
expected_vals2
)
self
.
assertEqual
(
acc
.
CompressedHistograms
(
'hst2'
),
[
expected_cmphst2
])
def
testCompressedHistogramsWithEmptyHistogram
(
self
):
gen
=
_EventGenerator
()
acc
=
ea
.
EventAccumulator
(
gen
,
compression_bps
=
(
0
,
2500
,
5000
,
7500
,
10000
))
gen
.
AddHistogram
(
'hst1'
,
wall_time
=
1
,
step
=
10
,
hmin
=
None
,
hmax
=
None
,
hnum
=
0
,
hsum
=
0
,
hsum_squares
=
0
,
hbucket_limit
=
[
1
,
2
,
3
],
hbucket
=
[
0
,
0
,
0
])
acc
.
Reload
()
# Create the expected values after compressing hst1
expected_vals1
=
[
ea
.
CompressedHistogramValue
(
bp
,
val
)
for
bp
,
val
in
[(
0
,
0.0
),
(
2500
,
0
),
(
5000
,
0
),
(
7500
,
0
),
(
10000
,
0
)]
]
expected_cmphst1
=
ea
.
CompressedHistogramEvent
(
wall_time
=
1
,
step
=
10
,
compressed_histogram_values
=
expected_vals1
)
self
.
assertEqual
(
acc
.
CompressedHistograms
(
'hst1'
),
[
expected_cmphst1
])
def
testCompressHistogram_uglyHistogram
(
self
):
bps
=
(
0
,
668
,
1587
,
3085
,
5000
,
6915
,
8413
,
9332
,
10000
)
histogram_values
=
ea
.
HistogramValue
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录