Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
32a540d2
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
32a540d2
编写于
4月 20, 2017
作者:
Q
qijun
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into feature/fix_with_doc_build_option
上级
e48ef688
8bcb9f2c
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
24 addition
and
15 deletion
+24
-15
Dockerfile
Dockerfile
+1
-1
cmake/system.cmake
cmake/system.cmake
+5
-0
paddle/function/ContextProjectionOpTest.cpp
paddle/function/ContextProjectionOpTest.cpp
+15
-13
paddle/math/tests/test_matrixCompare.cpp
paddle/math/tests/test_matrixCompare.cpp
+3
-1
未找到文件。
Dockerfile
浏览文件 @
32a540d2
...
@@ -13,7 +13,7 @@ ARG WITH_DOC
...
@@ -13,7 +13,7 @@ ARG WITH_DOC
ARG
WITH_STYLE_CHECK
ARG
WITH_STYLE_CHECK
ENV
WOBOQ OFF
ENV
WOBOQ OFF
ENV
WITH_GPU=${WITH_
AVX
:-OFF}
ENV
WITH_GPU=${WITH_
GPU
:-OFF}
ENV
WITH_AVX=${WITH_AVX:-ON}
ENV
WITH_AVX=${WITH_AVX:-ON}
ENV
WITH_DOC=${WITH_DOC:-OFF}
ENV
WITH_DOC=${WITH_DOC:-OFF}
ENV
WITH_STYLE_CHECK=${WITH_STYLE_CHECK:-OFF}
ENV
WITH_STYLE_CHECK=${WITH_STYLE_CHECK:-OFF}
...
...
cmake/system.cmake
浏览文件 @
32a540d2
...
@@ -28,6 +28,11 @@ ELSE(WIN32)
...
@@ -28,6 +28,11 @@ ELSE(WIN32)
STRING
(
REGEX MATCH
"[0-9]+.[0-9]+"
VERSION
"
${
MACOSX_VERSION
}
"
)
STRING
(
REGEX MATCH
"[0-9]+.[0-9]+"
VERSION
"
${
MACOSX_VERSION
}
"
)
SET
(
MACOS_VERSION
${
VERSION
}
)
SET
(
MACOS_VERSION
${
VERSION
}
)
SET
(
HOST_SYSTEM
"macosx"
)
SET
(
HOST_SYSTEM
"macosx"
)
IF
(
NOT DEFINED ENV{MACOSX_DEPLOYMENT_TARGET}
)
# Set cache variable - end user may change this during ccmake or cmake-gui configure.
SET
(
CMAKE_OSX_DEPLOYMENT_TARGET
${
MACOS_VERSION
}
CACHE STRING
"Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value."
)
ENDIF
()
ELSE
(
APPLE
)
ELSE
(
APPLE
)
IF
(
EXISTS
"/etc/issue"
)
IF
(
EXISTS
"/etc/issue"
)
...
...
paddle/function/ContextProjectionOpTest.cpp
浏览文件 @
32a540d2
...
@@ -28,11 +28,12 @@ void testMatrixProjectionForward(int context_start,
...
@@ -28,11 +28,12 @@ void testMatrixProjectionForward(int context_start,
std
::
max
(
0
,
(
int
)(
context_start
+
context_length
-
1
));
std
::
max
(
0
,
(
int
)(
context_start
+
context_length
-
1
));
if
(
pad
==
0
)
is_padding
=
false
;
if
(
pad
==
0
)
is_padding
=
false
;
FunctionCompare
test
(
"ContextProjectionForward"
,
FunctionCompare
test
(
"ContextProjectionForward"
,
FuncConfig
()
FuncConfig
()
.
set
(
"context_length"
,
context_length
)
.
set
(
"context_length"
,
context_length
)
.
set
(
"context_start"
,
context_start
)
.
set
(
"context_start"
,
context_start
)
.
set
(
"begin_pad"
,
std
::
max
(
0
,
-
context_start
)));
.
set
(
"begin_pad"
,
(
size_t
)
std
::
max
(
0
,
-
context_start
)));
// prepare input arguments
// prepare input arguments
test
.
addSequence
(
SequenceIdArg
(
TensorShape
{
batch_size
}));
test
.
addSequence
(
SequenceIdArg
(
TensorShape
{
batch_size
}));
...
@@ -51,7 +52,7 @@ void testMatrixProjectionForward(int context_start,
...
@@ -51,7 +52,7 @@ void testMatrixProjectionForward(int context_start,
}
}
void
testMatrixProjectionBackward
(
int
context_start
,
void
testMatrixProjectionBackward
(
int
context_start
,
in
t
context_length
,
size_
t
context_length
,
bool
is_padding
,
bool
is_padding
,
size_t
batch_size
,
size_t
batch_size
,
size_t
input_dim
)
{
size_t
input_dim
)
{
...
@@ -59,11 +60,12 @@ void testMatrixProjectionBackward(int context_start,
...
@@ -59,11 +60,12 @@ void testMatrixProjectionBackward(int context_start,
std
::
max
(
0
,
(
int
)(
context_start
+
context_length
-
1
));
std
::
max
(
0
,
(
int
)(
context_start
+
context_length
-
1
));
if
(
pad
==
0
)
is_padding
=
false
;
if
(
pad
==
0
)
is_padding
=
false
;
FunctionCompare
test
(
"ContextProjectionBackward"
,
FunctionCompare
test
(
"ContextProjectionBackward"
,
FuncConfig
()
FuncConfig
()
.
set
(
"context_length"
,
context_length
)
.
set
(
"context_length"
,
context_length
)
.
set
(
"context_start"
,
context_start
)
.
set
(
"context_start"
,
context_start
)
.
set
(
"begin_pad"
,
std
::
max
(
0
,
-
context_start
))
.
set
(
"begin_pad"
,
(
size_t
)
std
::
max
(
0
,
-
context_start
))
.
set
(
"is_padding"
,
is_padding
)
.
set
(
"is_padding"
,
is_padding
)
.
set
(
"total_pad"
,
pad
));
.
set
(
"total_pad"
,
pad
));
...
...
paddle/math/tests/test_matrixCompare.cpp
浏览文件 @
32a540d2
...
@@ -235,8 +235,10 @@ TEST(Matrix, unary) {
...
@@ -235,8 +235,10 @@ TEST(Matrix, unary) {
testMatrixTranspose
(
height
,
width
);
testMatrixTranspose
(
height
,
width
);
testMatrixRotate
(
height
,
width
);
testMatrixRotate
(
height
,
width
);
}
}
// inverse
// inverse
#ifdef PADDLE_USE_LAPACK
testMatrixInverse
(
height
);
testMatrixInverse
(
height
);
#endif
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录