Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
eced9730
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
eced9730
编写于
6月 09, 2018
作者:
G
guochaorong
提交者:
GitHub
6月 09, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #11317 from guochaorong/fix_bad_code
Fix bad code in c plus and python
上级
637827a5
310598f9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
4 addition
and
8 deletion
+4
-8
paddle/fluid/operators/gather_test.cc
paddle/fluid/operators/gather_test.cc
+2
-1
paddle/fluid/operators/math/math_function_test.cc
paddle/fluid/operators/math/math_function_test.cc
+2
-0
python/paddle/fluid/layers/metric.py
python/paddle/fluid/layers/metric.py
+0
-4
python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py
...addle/fluid/tests/unittests/test_dynrnn_gradient_check.py
+0
-3
未找到文件。
paddle/fluid/operators/gather_test.cc
浏览文件 @
eced9730
...
...
@@ -43,7 +43,8 @@ TEST(Gather, GatherData) {
auto
*
cpu_place
=
new
paddle
::
platform
::
CPUPlace
();
paddle
::
platform
::
CPUDeviceContext
ctx
(
*
cpu_place
);
paddle
::
operators
::
CPUGather
<
int
>
(
ctx
,
*
src
,
*
index
,
output
);
delete
cpu_place
;
cpu_place
=
NULL
;
for
(
int
i
=
0
;
i
<
4
;
++
i
)
EXPECT_EQ
(
p_output
[
i
],
i
+
4
);
for
(
int
i
=
4
;
i
<
8
;
++
i
)
EXPECT_EQ
(
p_output
[
i
],
i
-
4
);
...
...
paddle/fluid/operators/math/math_function_test.cc
浏览文件 @
eced9730
...
...
@@ -77,6 +77,8 @@ TEST(math_function, gemm_trans_clbas) {
paddle
::
platform
::
CPUDeviceContext
context
(
*
cpu_place
);
GetBlas
<
float
>
(
context
).
GEMM
(
false
,
true
,
m
,
n
,
k
,
1
,
input1_ptr
,
3
,
input2_ptr
+
3
,
3
,
1
,
input3_ptr
+
1
,
4
);
delete
cpu_place
;
cpu_place
=
NULL
;
EXPECT_EQ
(
input3_ptr
[
0
],
0
);
EXPECT_EQ
(
input3_ptr
[
1
],
24
);
...
...
python/paddle/fluid/layers/metric.py
浏览文件 @
eced9730
...
...
@@ -64,10 +64,6 @@ def auc(input, label, curve='ROC', num_thresholds=200):
topk_indices
=
helper
.
create_tmp_variable
(
dtype
=
"int64"
)
topk_out
,
topk_indices
=
nn
.
topk
(
input
,
k
=
k
)
auc_out
=
helper
.
create_tmp_variable
(
dtype
=
"float32"
)
if
correct
is
None
:
correct
=
helper
.
create_tmp_variable
(
dtype
=
"int64"
)
if
total
is
None
:
total
=
helper
.
create_tmp_variable
(
dtype
=
"int64"
)
helper
.
append_op
(
type
=
"accuracy"
,
inputs
=
{
...
...
python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py
浏览文件 @
eced9730
...
...
@@ -30,9 +30,6 @@ class Memory(object):
assert
val
.
dtype
==
self
.
ex
.
dtype
self
.
cur
=
val
def
ex
(
self
):
return
self
.
ex
def
next
(
self
):
self
.
ex
=
self
.
cur
self
.
cur
=
None
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录