Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
10c487eb
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看板
未验证
提交
10c487eb
编写于
4月 26, 2019
作者:
K
Kaipeng Deng
提交者:
GitHub
4月 26, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix interpolate cu. test=develop (#17101)
上级
aca60e9a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
paddle/fluid/operators/interpolate_op.cu
paddle/fluid/operators/interpolate_op.cu
+1
-1
python/paddle/fluid/tests/unittests/test_bilinear_interp_op.py
...n/paddle/fluid/tests/unittests/test_bilinear_interp_op.py
+3
-3
python/paddle/fluid/tests/unittests/test_nearest_interp_op.py
...on/paddle/fluid/tests/unittests/test_nearest_interp_op.py
+3
-3
未找到文件。
paddle/fluid/operators/interpolate_op.cu
浏览文件 @
10c487eb
...
@@ -286,7 +286,7 @@ class InterpolateGradOpCUDAKernel : public framework::OpKernel<T> {
...
@@ -286,7 +286,7 @@ class InterpolateGradOpCUDAKernel : public framework::OpKernel<T> {
float
scale
=
ctx
.
Attr
<
float
>
(
"scale"
);
float
scale
=
ctx
.
Attr
<
float
>
(
"scale"
);
if
(
scale
>
0
)
{
if
(
scale
>
0
)
{
out_h
=
in_h
*
scale
;
out_h
=
in_h
*
scale
;
out_w
-
in_w
*
scale
;
out_w
=
in_w
*
scale
;
}
}
auto
out_size
=
ctx
.
Input
<
Tensor
>
(
"OutSize"
);
auto
out_size
=
ctx
.
Input
<
Tensor
>
(
"OutSize"
);
if
(
out_size
!=
nullptr
)
{
if
(
out_size
!=
nullptr
)
{
...
...
python/paddle/fluid/tests/unittests/test_bilinear_interp_op.py
浏览文件 @
10c487eb
...
@@ -305,7 +305,7 @@ class TestBilinearInterpWithMethod3(TestBilinearInterpOp):
...
@@ -305,7 +305,7 @@ class TestBilinearInterpWithMethod3(TestBilinearInterpOp):
class
TestBilinearInterpScale1
(
TestBilinearInterpOp
):
class
TestBilinearInterpScale1
(
TestBilinearInterpOp
):
def
init_test_case
(
self
):
def
init_test_case
(
self
):
self
.
interp_method
=
'bilinear'
self
.
interp_method
=
'bilinear'
self
.
input_shape
=
[
2
,
3
,
16
,
32
]
self
.
input_shape
=
[
2
,
3
,
5
,
7
]
self
.
out_h
=
60
self
.
out_h
=
60
self
.
out_w
=
25
self
.
out_w
=
25
self
.
scale
=
2.
self
.
scale
=
2.
...
@@ -316,7 +316,7 @@ class TestBilinearInterpScale1(TestBilinearInterpOp):
...
@@ -316,7 +316,7 @@ class TestBilinearInterpScale1(TestBilinearInterpOp):
class
TestBilinearInterpScale2
(
TestBilinearInterpOp
):
class
TestBilinearInterpScale2
(
TestBilinearInterpOp
):
def
init_test_case
(
self
):
def
init_test_case
(
self
):
self
.
interp_method
=
'bilinear'
self
.
interp_method
=
'bilinear'
self
.
input_shape
=
[
2
,
3
,
16
,
32
]
self
.
input_shape
=
[
2
,
3
,
5
,
7
]
self
.
out_h
=
60
self
.
out_h
=
60
self
.
out_w
=
25
self
.
out_w
=
25
self
.
scale
=
1.
self
.
scale
=
1.
...
@@ -327,7 +327,7 @@ class TestBilinearInterpScale2(TestBilinearInterpOp):
...
@@ -327,7 +327,7 @@ class TestBilinearInterpScale2(TestBilinearInterpOp):
class
TestBilinearInterpScale3
(
TestBilinearInterpOp
):
class
TestBilinearInterpScale3
(
TestBilinearInterpOp
):
def
init_test_case
(
self
):
def
init_test_case
(
self
):
self
.
interp_method
=
'bilinear'
self
.
interp_method
=
'bilinear'
self
.
input_shape
=
[
2
,
3
,
16
,
32
]
self
.
input_shape
=
[
2
,
3
,
5
,
7
]
self
.
out_h
=
60
self
.
out_h
=
60
self
.
out_w
=
25
self
.
out_w
=
25
self
.
scale
=
1.5
self
.
scale
=
1.5
...
...
python/paddle/fluid/tests/unittests/test_nearest_interp_op.py
浏览文件 @
10c487eb
...
@@ -259,7 +259,7 @@ class TestNearestInterpWithoutCorners(TestNearestInterpOp):
...
@@ -259,7 +259,7 @@ class TestNearestInterpWithoutCorners(TestNearestInterpOp):
class
TestNearestNeighborInterpScale1
(
TestNearestInterpOp
):
class
TestNearestNeighborInterpScale1
(
TestNearestInterpOp
):
def
init_test_case
(
self
):
def
init_test_case
(
self
):
self
.
interp_method
=
'nearest'
self
.
interp_method
=
'nearest'
self
.
input_shape
=
[
3
,
2
,
32
,
16
]
self
.
input_shape
=
[
3
,
2
,
7
,
5
]
self
.
out_h
=
64
self
.
out_h
=
64
self
.
out_w
=
32
self
.
out_w
=
32
self
.
scale
=
2.
self
.
scale
=
2.
...
@@ -270,7 +270,7 @@ class TestNearestNeighborInterpScale1(TestNearestInterpOp):
...
@@ -270,7 +270,7 @@ class TestNearestNeighborInterpScale1(TestNearestInterpOp):
class
TestNearestNeighborInterpScale2
(
TestNearestInterpOp
):
class
TestNearestNeighborInterpScale2
(
TestNearestInterpOp
):
def
init_test_case
(
self
):
def
init_test_case
(
self
):
self
.
interp_method
=
'nearest'
self
.
interp_method
=
'nearest'
self
.
input_shape
=
[
3
,
2
,
32
,
16
]
self
.
input_shape
=
[
3
,
2
,
5
,
7
]
self
.
out_h
=
64
self
.
out_h
=
64
self
.
out_w
=
32
self
.
out_w
=
32
self
.
scale
=
1.5
self
.
scale
=
1.5
...
@@ -281,7 +281,7 @@ class TestNearestNeighborInterpScale2(TestNearestInterpOp):
...
@@ -281,7 +281,7 @@ class TestNearestNeighborInterpScale2(TestNearestInterpOp):
class
TestNearestNeighborInterpScale3
(
TestNearestInterpOp
):
class
TestNearestNeighborInterpScale3
(
TestNearestInterpOp
):
def
init_test_case
(
self
):
def
init_test_case
(
self
):
self
.
interp_method
=
'nearest'
self
.
interp_method
=
'nearest'
self
.
input_shape
=
[
3
,
2
,
32
,
16
]
self
.
input_shape
=
[
3
,
2
,
7
,
5
]
self
.
out_h
=
64
self
.
out_h
=
64
self
.
out_w
=
32
self
.
out_w
=
32
self
.
scale
=
1.
self
.
scale
=
1.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录