Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
5f217099
P
Paddle
项目概览
机器未来
/
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看板
提交
5f217099
编写于
11月 11, 2017
作者:
D
dangqingqing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix bug.
上级
524ccba4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
3 addition
and
10 deletion
+3
-10
paddle/operators/math/CMakeLists.txt
paddle/operators/math/CMakeLists.txt
+2
-2
paddle/operators/math/context_project.h
paddle/operators/math/context_project.h
+0
-3
paddle/operators/math/math_function_impl.h
paddle/operators/math/math_function_impl.h
+1
-2
paddle/operators/softmax_op.h
paddle/operators/softmax_op.h
+0
-3
未找到文件。
paddle/operators/math/CMakeLists.txt
浏览文件 @
5f217099
...
...
@@ -10,7 +10,7 @@ if(WITH_GPU)
nv_library
(
pooling SRCS pooling.cc pooling.cu DEPS device_context
)
nv_library
(
sequence_pooling SRCS sequence_pooling.cc sequence_pooling.cu DEPS device_context math_function
)
nv_library
(
vol2col SRCS vol2col.cc vol2col.cu DEPS device_context
)
nv_library
(
context_project SRCS context_project.cc context_project.cu DEPS device_context
)
nv_library
(
context_project SRCS context_project.cc context_project.cu DEPS device_context
math_function
)
nv_library
(
sequence2batch SRCS sequence2batch.cc sequence2batch.cu DEPS device_context
)
nv_library
(
lstm_compute SRCS lstm_compute.cc lstm_compute.cu DEPS device_context activation_functions
)
nv_library
(
gru_compute SRCS gru_compute.cc gru_compute.cu DEPS device_context activation_functions math_function
)
...
...
@@ -22,7 +22,7 @@ else()
cc_library
(
pooling SRCS pooling.cc DEPS device_context
)
cc_library
(
sequence_pooling SRCS sequence_pooling.cc DEPS device_context math_function
)
cc_library
(
vol2col SRCS vol2col.cc DEPS device_context
)
cc_library
(
context_project SRCS context_project.cc DEPS device_context
)
cc_library
(
context_project SRCS context_project.cc DEPS device_context
math_function
)
cc_library
(
sequence2batch SRCS sequence2batch.cc DEPS device_context
)
cc_library
(
lstm_compute SRCS lstm_compute.cc DEPS device_context activation_functions
)
cc_library
(
gru_compute SRCS gru_compute.cc DEPS device_context activation_functions math_function
)
...
...
paddle/operators/math/context_project.h
浏览文件 @
5f217099
...
...
@@ -91,9 +91,6 @@ class ContextProjectFunctor {
auto
lod_level_0
=
in
.
lod
()[
0
];
math
::
Im2ColFunctor
<
math
::
ColFormat
::
kOCF
,
Place
,
float
>
im2col_ocf
;
if
(
platform
::
is_gpu_place
(
context
.
GetPlace
()))
{
LOG
(
INFO
)
<<
"========= gpu =========="
;
}
int
input_row_begin
,
input_row_end
;
int
sequence_height
,
sequence_width
;
...
...
paddle/operators/math/math_function_impl.h
浏览文件 @
5f217099
...
...
@@ -23,8 +23,7 @@ template <typename Place, typename T>
void
SetConstant
<
Place
,
T
>::
operator
()(
const
platform
::
DeviceContext
&
context
,
framework
::
Tensor
*
tensor
,
T
num
)
{
auto
t
=
framework
::
EigenVector
<
T
>::
Flatten
(
*
tensor
);
t
.
device
(
*
context
.
GetEigenDevice
<
platform
::
CPUPlace
>
())
=
t
.
constant
(
static_cast
<
T
>
(
num
));
t
.
device
(
*
context
.
GetEigenDevice
<
Place
>
())
=
t
.
constant
(
static_cast
<
T
>
(
num
));
}
template
<
typename
Place
,
typename
T
,
int
Rank
>
...
...
paddle/operators/softmax_op.h
浏览文件 @
5f217099
...
...
@@ -27,9 +27,6 @@ class SoftmaxKernel : public framework::OpKernel<T> {
void
Compute
(
const
framework
::
ExecutionContext
&
context
)
const
override
{
auto
*
X
=
context
.
Input
<
Tensor
>
(
"X"
);
auto
*
Y
=
context
.
Output
<
Tensor
>
(
"Y"
);
if
(
platform
::
is_gpu_place
(
context
.
GetPlace
()))
{
LOG
(
INFO
)
<<
"==========gpu========="
;
}
// allocate memory on device.
Y
->
mutable_data
<
T
>
(
context
.
GetPlace
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录