Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
e3342ff8
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e3342ff8
编写于
8月 23, 2017
作者:
W
wanghaoshuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix android build error.
上级
1dc850e4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
13 deletion
+20
-13
paddle/cuda/include/stub/hl_cuda_cudnn_stub.h
paddle/cuda/include/stub/hl_cuda_cudnn_stub.h
+8
-3
paddle/cuda/src/hl_cuda_cudnn.cc
paddle/cuda/src/hl_cuda_cudnn.cc
+2
-1
paddle/gserver/tests/test_LayerGrad.cpp
paddle/gserver/tests/test_LayerGrad.cpp
+4
-2
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+3
-3
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+3
-4
未找到文件。
paddle/cuda/include/stub/hl_cuda_cudnn_stub.h
浏览文件 @
e3342ff8
...
...
@@ -78,7 +78,9 @@ inline void hl_create_convolution_descriptor(hl_convolution_descriptor* conv,
int
padding_height
,
int
padding_width
,
int
stride_height
,
int
stride_width
)
{}
int
stride_width
,
int
dilation_h
,
int
dilation_w
)
{}
inline
void
hl_reset_convolution_descriptor
(
hl_convolution_descriptor
conv
,
hl_tensor_descriptor
image
,
...
...
@@ -86,7 +88,9 @@ inline void hl_reset_convolution_descriptor(hl_convolution_descriptor conv,
int
padding_height
,
int
padding_width
,
int
stride_height
,
int
stride_width
)
{}
int
stride_width
,
int
dilation_h
,
int
dilation_w
)
{}
inline
void
hl_destroy_convolution_descriptor
(
hl_convolution_descriptor
conv
)
{}
...
...
@@ -99,7 +103,8 @@ inline void hl_conv_workspace(hl_tensor_descriptor input,
int
*
convBwdDataAlgo
,
size_t
*
bwdDataLimitBytes
,
int
*
convBwdFilterAlgo
,
size_t
*
bwdFilterLimitBytes
)
{}
size_t
*
bwdFilterLimitBytes
,
bool
useDilation
)
{}
inline
void
hl_convolution_forward
(
hl_tensor_descriptor
input
,
real
*
input_data
,
...
...
paddle/cuda/src/hl_cuda_cudnn.cc
浏览文件 @
e3342ff8
...
...
@@ -640,7 +640,8 @@ void hl_create_convolution_descriptor(hl_convolution_descriptor* conv,
#else
if
(
dilation_h
>
1
||
dilation_w
>
1
)
{
LOG
(
FATAL
)
<<
"Current cudnn version does't support for dilation convolution."
;
<<
"Current cuDNN version does't support for dilation convolution. "
<<
"The dilation convolution requires cuDNN >= v6.0."
;
}
CHECK_CUDNN
(
dynload
::
cudnnSetConvolution2dDescriptor
(
hl_conv
->
desc
,
...
...
paddle/gserver/tests/test_LayerGrad.cpp
浏览文件 @
e3342ff8
...
...
@@ -12,7 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifndef PADDLE_ONLY_CPU
#include <cudnn.h>
#endif
#include <gtest/gtest.h>
#include <string>
#include <vector>
...
...
@@ -262,8 +264,8 @@ TEST(Projection, conv) {
testProjectionConv
(
1
,
false
);
testProjectionConv
(
3
,
false
);
/// test ConvTransProjection
///
testProjectionConv(1, true);
///
testProjectionConv(3, true);
testProjectionConv
(
1
,
true
);
testProjectionConv
(
3
,
true
);
}
#endif
...
...
python/paddle/trainer/config_parser.py
浏览文件 @
e3342ff8
...
...
@@ -862,7 +862,6 @@ class Conv(Cfg):
filter_size
,
channels
,
padding
=
None
,
dilation
=
None
,
stride
=
None
,
groups
=
None
,
filter_channels
=
None
,
...
...
@@ -871,8 +870,9 @@ class Conv(Cfg):
caffe_mode
=
True
,
filter_size_y
=
None
,
padding_y
=
None
,
dilation_y
=
None
,
stride_y
=
None
):
stride_y
=
None
,
dilation
=
None
,
dilation_y
=
None
):
self
.
add_keys
(
locals
())
if
filter_size_y
is
None
:
self
.
filter_size_y
=
filter_size
...
...
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
e3342ff8
...
...
@@ -2340,7 +2340,7 @@ def img_conv_layer(input,
groups
=
1
,
stride
=
1
,
padding
=
0
,
dilation
=
0
,
dilation
=
1
,
bias_attr
=
None
,
param_attr
=
None
,
shared_biases
=
True
,
...
...
@@ -2472,9 +2472,6 @@ def img_conv_layer(input,
else
:
dilation_y
=
dilation
if
dilation
>
1
or
dilation_y
>
1
:
assert
layer_type
in
[
"cudnn_conv"
,
"cudnn_convt"
]
if
param_attr
.
attr
.
get
(
'initial_smart'
):
# special initial for conv layers.
init_w
=
(
2.0
/
(
filter_size
**
2
*
num_channels
))
**
0.5
...
...
@@ -2484,6 +2481,8 @@ def img_conv_layer(input,
param_attr
.
attr
[
"initial_smart"
]
=
False
if
layer_type
:
if
dilation
>
1
or
dilation_y
>
1
:
assert
layer_type
in
[
"cudnn_conv"
,
"cudnn_convt"
]
if
trans
:
assert
layer_type
in
[
"exconvt"
,
"cudnn_convt"
]
else
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录