Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
24f528a1
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
24f528a1
编写于
1月 17, 2018
作者:
C
chengduoZH
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
follow comments
上级
251c6032
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
13 deletion
+6
-13
paddle/operators/conv_op.cc
paddle/operators/conv_op.cc
+1
-3
paddle/operators/conv_transpose_op.cc
paddle/operators/conv_transpose_op.cc
+1
-3
paddle/operators/pool_op.cc
paddle/operators/pool_op.cc
+1
-3
python/paddle/v2/fluid/nets.py
python/paddle/v2/fluid/nets.py
+3
-4
未找到文件。
paddle/operators/conv_op.cc
浏览文件 @
24f528a1
...
@@ -70,9 +70,7 @@ void ConvOp::InferShape(framework::InferShapeContext* ctx) const {
...
@@ -70,9 +70,7 @@ void ConvOp::InferShape(framework::InferShapeContext* ctx) const {
framework
::
OpKernelType
ConvOp
::
GetExpectedKernelType
(
framework
::
OpKernelType
ConvOp
::
GetExpectedKernelType
(
const
framework
::
ExecutionContext
&
ctx
)
const
{
const
framework
::
ExecutionContext
&
ctx
)
const
{
bool
use_cudnn
=
ctx
.
Attr
<
bool
>
(
"use_cudnn"
);
bool
use_cudnn
=
ctx
.
Attr
<
bool
>
(
"use_cudnn"
);
if
(
paddle
::
platform
::
is_cpu_place
(
ctx
.
GetPlace
()))
{
use_cudnn
&=
platform
::
is_gpu_place
(
ctx
.
GetPlace
());
use_cudnn
=
false
;
}
framework
::
LibraryType
library_
;
framework
::
LibraryType
library_
;
if
(
use_cudnn
)
{
if
(
use_cudnn
)
{
library_
=
framework
::
LibraryType
::
kCUDNN
;
library_
=
framework
::
LibraryType
::
kCUDNN
;
...
...
paddle/operators/conv_transpose_op.cc
浏览文件 @
24f528a1
...
@@ -61,9 +61,7 @@ void ConvTransposeOp::InferShape(framework::InferShapeContext* ctx) const {
...
@@ -61,9 +61,7 @@ void ConvTransposeOp::InferShape(framework::InferShapeContext* ctx) const {
framework
::
OpKernelType
ConvTransposeOp
::
GetExpectedKernelType
(
framework
::
OpKernelType
ConvTransposeOp
::
GetExpectedKernelType
(
const
framework
::
ExecutionContext
&
ctx
)
const
{
const
framework
::
ExecutionContext
&
ctx
)
const
{
bool
use_cudnn
=
ctx
.
Attr
<
bool
>
(
"use_cudnn"
);
bool
use_cudnn
=
ctx
.
Attr
<
bool
>
(
"use_cudnn"
);
if
(
paddle
::
platform
::
is_cpu_place
(
ctx
.
GetPlace
()))
{
use_cudnn
&=
platform
::
is_gpu_place
(
ctx
.
GetPlace
());
use_cudnn
=
false
;
}
framework
::
LibraryType
library_
;
framework
::
LibraryType
library_
;
if
(
use_cudnn
)
{
if
(
use_cudnn
)
{
library_
=
framework
::
LibraryType
::
kCUDNN
;
library_
=
framework
::
LibraryType
::
kCUDNN
;
...
...
paddle/operators/pool_op.cc
浏览文件 @
24f528a1
...
@@ -64,9 +64,7 @@ void PoolOp::InferShape(framework::InferShapeContext *ctx) const {
...
@@ -64,9 +64,7 @@ void PoolOp::InferShape(framework::InferShapeContext *ctx) const {
framework
::
OpKernelType
PoolOp
::
GetExpectedKernelType
(
framework
::
OpKernelType
PoolOp
::
GetExpectedKernelType
(
const
framework
::
ExecutionContext
&
ctx
)
const
{
const
framework
::
ExecutionContext
&
ctx
)
const
{
bool
use_cudnn
=
ctx
.
Attr
<
bool
>
(
"use_cudnn"
);
bool
use_cudnn
=
ctx
.
Attr
<
bool
>
(
"use_cudnn"
);
if
(
paddle
::
platform
::
is_cpu_place
(
ctx
.
GetPlace
()))
{
use_cudnn
&=
platform
::
is_gpu_place
(
ctx
.
GetPlace
());
use_cudnn
=
false
;
}
framework
::
LibraryType
library_
;
framework
::
LibraryType
library_
;
if
(
use_cudnn
)
{
if
(
use_cudnn
)
{
library_
=
framework
::
LibraryType
::
kCUDNN
;
library_
=
framework
::
LibraryType
::
kCUDNN
;
...
...
python/paddle/v2/fluid/nets.py
浏览文件 @
24f528a1
...
@@ -41,10 +41,9 @@ def img_conv_group(input,
...
@@ -41,10 +41,9 @@ def img_conv_group(input,
param_attr
=
None
,
param_attr
=
None
,
conv_with_batchnorm
=
False
,
conv_with_batchnorm
=
False
,
conv_batchnorm_drop_rate
=
None
,
conv_batchnorm_drop_rate
=
None
,
conv_use_cudnn
=
True
,
pool_stride
=
1
,
pool_stride
=
1
,
pool_type
=
None
,
pool_type
=
None
,
pool_
use_cudnn
=
True
):
use_cudnn
=
True
):
"""
"""
Image Convolution Group, Used for vgg net.
Image Convolution Group, Used for vgg net.
"""
"""
...
@@ -76,7 +75,7 @@ def img_conv_group(input,
...
@@ -76,7 +75,7 @@ def img_conv_group(input,
padding
=
conv_padding
[
i
],
padding
=
conv_padding
[
i
],
param_attr
=
param_attr
[
i
],
param_attr
=
param_attr
[
i
],
act
=
local_conv_act
,
act
=
local_conv_act
,
use_cudnn
=
conv_
use_cudnn
)
use_cudnn
=
use_cudnn
)
if
conv_with_batchnorm
[
i
]:
if
conv_with_batchnorm
[
i
]:
tmp
=
layers
.
batch_norm
(
input
=
tmp
,
act
=
conv_act
)
tmp
=
layers
.
batch_norm
(
input
=
tmp
,
act
=
conv_act
)
...
@@ -89,7 +88,7 @@ def img_conv_group(input,
...
@@ -89,7 +88,7 @@ def img_conv_group(input,
pool_size
=
pool_size
,
pool_size
=
pool_size
,
pool_type
=
pool_type
,
pool_type
=
pool_type
,
pool_stride
=
pool_stride
,
pool_stride
=
pool_stride
,
use_cudnn
=
pool_
use_cudnn
)
use_cudnn
=
use_cudnn
)
return
pool_out
return
pool_out
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录