Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
cfef382a
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看板
提交
cfef382a
编写于
3月 26, 2019
作者:
D
dengkaipeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix format. test=develop
上级
cfda1fde
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
14 deletion
+12
-14
paddle/fluid/API.spec
paddle/fluid/API.spec
+3
-3
paddle/fluid/operators/interpolate_op.cc
paddle/fluid/operators/interpolate_op.cc
+1
-2
paddle/fluid/operators/interpolate_op.cu
paddle/fluid/operators/interpolate_op.cu
+1
-2
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+1
-1
python/paddle/fluid/tests/unittests/test_bilinear_interp_op.py
...n/paddle/fluid/tests/unittests/test_bilinear_interp_op.py
+6
-6
未找到文件。
paddle/fluid/API.spec
浏览文件 @
cfef382a
...
...
@@ -144,10 +144,10 @@ paddle.fluid.layers.label_smooth (ArgSpec(args=['label', 'prior_dist', 'epsilon'
paddle.fluid.layers.roi_pool (ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale'], varargs=None, keywords=None, defaults=(1, 1, 1.0)), ('document', 'c317aa595deb31649083c8faa91cdb97'))
paddle.fluid.layers.roi_align (ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale', 'sampling_ratio', 'name'], varargs=None, keywords=None, defaults=(1, 1, 1.0, -1, None)), ('document', '12c5bbb8b38c42e623fbc47611d766e1'))
paddle.fluid.layers.dice_loss (ArgSpec(args=['input', 'label', 'epsilon'], varargs=None, keywords=None, defaults=(1e-05,)), ('document', '1ba0508d573f65feecf3564dce22aa1d'))
paddle.fluid.layers.image_resize (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'resample', 'actual_shape', 'align_corners', 'align_mode'], varargs=None, keywords=None, defaults=(None, None, None, 'BILINEAR', None, True, 1)), ('document', '
7a1966d7c3a48f1fc0881cdaf5d83b0b
'))
paddle.fluid.layers.image_resize (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'resample', 'actual_shape', 'align_corners', 'align_mode'], varargs=None, keywords=None, defaults=(None, None, None, 'BILINEAR', None, True, 1)), ('document', '
87382dc344556607fecb1b5b0a8b0fd9
'))
paddle.fluid.layers.image_resize_short (ArgSpec(args=['input', 'out_short_len', 'resample'], varargs=None, keywords=None, defaults=('BILINEAR',)), ('document', '06211aefc50c5a3e940d7204d859cdf7'))
paddle.fluid.layers.resize_bilinear (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape', 'align_corners', 'align_mode'], varargs=None, keywords=None, defaults=(None, None, None, None, True, 1)), ('document', '
e4fb4ed511b2293b8f04f7e872afbfd7
'))
paddle.fluid.layers.resize_nearest (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape', 'align_corners'], varargs=None, keywords=None, defaults=(None, None, None, None, True)), ('document', '
735fa9758a6d7ff3b47d7b827f961c1d
'))
paddle.fluid.layers.resize_bilinear (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape', 'align_corners', 'align_mode'], varargs=None, keywords=None, defaults=(None, None, None, None, True, 1)), ('document', '
000753bccd4e4df3c97d9afeb3af2340
'))
paddle.fluid.layers.resize_nearest (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape', 'align_corners'], varargs=None, keywords=None, defaults=(None, None, None, None, True)), ('document', '
905a40794f98fc33748c85568e4fbcaf
'))
paddle.fluid.layers.gather (ArgSpec(args=['input', 'index'], varargs=None, keywords=None, defaults=None), ('document', '98f1c86716b9b7f4dda83f20e2adeee2'))
paddle.fluid.layers.scatter (ArgSpec(args=['input', 'index', 'updates', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '65f8e9d8ddfd0b412f940579c4faa342'))
paddle.fluid.layers.sequence_scatter (ArgSpec(args=['input', 'index', 'updates', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '15b522457dfef103f0c20ca9d397678b'))
...
...
paddle/fluid/operators/interpolate_op.cc
浏览文件 @
cfef382a
...
...
@@ -85,8 +85,7 @@ class InterpolateOpMaker : public framework::OpProtoAndCheckerMaker {
AddAttr
<
int
>
(
"out_h"
,
"output height of interpolate op."
);
AddAttr
<
int
>
(
"out_w"
,
"output width of interpolate op."
);
AddAttr
<
float
>
(
"scale"
,
"scale factor of interpolate op."
)
.
SetDefault
(
0.
);
AddAttr
<
float
>
(
"scale"
,
"scale factor of interpolate op."
).
SetDefault
(
0.
);
AddAttr
<
std
::
string
>
(
"interp_method"
,
"(string, default
\"
bilinear
\"
), interpolation "
"method, can be
\"
bilinear
\"
for "
...
...
paddle/fluid/operators/interpolate_op.cu
浏览文件 @
cfef382a
...
...
@@ -286,7 +286,7 @@ class InterpolateGradOpCUDAKernel : public framework::OpKernel<T> {
float
scale
=
ctx
.
Attr
<
float
>
(
"scale"
);
if
(
scale
>
0
)
{
out_h
=
in_h
*
scale
;
out_w
-
in_w
*
scale
;
out_w
-
in_w
*
scale
;
}
auto
out_size
=
ctx
.
Input
<
Tensor
>
(
"OutSize"
);
if
(
out_size
!=
nullptr
)
{
...
...
@@ -300,7 +300,6 @@ class InterpolateGradOpCUDAKernel : public framework::OpKernel<T> {
bool
align_corners
=
ctx
.
Attr
<
bool
>
(
"align_corners"
);
int
align_mode
=
ctx
.
Attr
<
int
>
(
"align_mode"
);
int
in_hw
=
in_h
*
in_w
;
int
out_hw
=
out_h
*
out_w
;
int
in_chw
=
c
*
in_hw
;
...
...
python/paddle/fluid/layers/nn.py
浏览文件 @
cfef382a
...
...
@@ -7131,7 +7131,7 @@ def image_resize(input,
return
(
isinstance
(
data
,
list
)
or
isinstance
(
data
,
tuple
))
inputs
=
{
"X"
:
input
}
attrs
=
{
attrs
=
{
"interp_method"
:
resample_type
,
"align_corners"
:
align_corners
,
"align_mode"
:
align_mode
...
...
python/paddle/fluid/tests/unittests/test_bilinear_interp_op.py
浏览文件 @
cfef382a
...
...
@@ -98,9 +98,9 @@ class TestBilinearInterpOp(OpTest):
out_h
=
self
.
out_h
out_w
=
self
.
out_w
output_np
=
bilinear_interp_np
(
input_np
,
out_h
,
out_w
,
self
.
out_size
,
self
.
actual_shape
,
self
.
align_
corners
,
self
.
align_
mode
)
output_np
=
bilinear_interp_np
(
input_np
,
out_h
,
out_w
,
self
.
out_size
,
self
.
actual_shape
,
self
.
align_corners
,
self
.
align_mode
)
self
.
inputs
=
{
'X'
:
input_np
}
if
self
.
out_size
is
not
None
:
self
.
inputs
[
'OutSize'
]
=
self
.
out_size
...
...
@@ -231,9 +231,9 @@ class TestBilinearInterpOpUint8(OpTest):
out_h
=
self
.
out_h
out_w
=
self
.
out_w
output_np
=
bilinear_interp_np
(
input_np
,
out_h
,
out_w
,
self
.
out_size
,
self
.
actual_shape
,
self
.
align_
corners
,
self
.
align_
mode
)
output_np
=
bilinear_interp_np
(
input_np
,
out_h
,
out_w
,
self
.
out_size
,
self
.
actual_shape
,
self
.
align_corners
,
self
.
align_mode
)
self
.
inputs
=
{
'X'
:
input_np
}
if
self
.
out_size
is
not
None
:
self
.
inputs
[
'OutSize'
]
=
self
.
out_size
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录