Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
8d736813
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看板
提交
8d736813
编写于
12月 05, 2016
作者:
H
hedaoyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix some errors due to merge
上级
671db8de
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
22 addition
and
18 deletion
+22
-18
paddle/gserver/activations/ActivationFunction.cpp
paddle/gserver/activations/ActivationFunction.cpp
+1
-1
paddle/math/tests/test_BaseMatrix.cpp
paddle/math/tests/test_BaseMatrix.cpp
+17
-17
paddle/math/tests/test_Tensor.cu
paddle/math/tests/test_Tensor.cu
+2
-0
paddle/math/tests/test_lazyAssign.cu
paddle/math/tests/test_lazyAssign.cu
+2
-0
未找到文件。
paddle/gserver/activations/ActivationFunction.cpp
浏览文件 @
8d736813
...
@@ -345,7 +345,7 @@ void forward(Argument& act) {
...
@@ -345,7 +345,7 @@ void forward(Argument& act) {
useGpu
(
act
.
deviceId
));
useGpu
(
act
.
deviceId
));
act
.
in
->
copyFrom
(
*
act
.
value
);
act
.
in
->
copyFrom
(
*
act
.
value
);
act
.
value
->
log
(
*
act
.
value
);
act
.
value
->
log
2
(
*
act
.
value
);
}
}
void
backward
(
Argument
&
act
)
{
act
.
grad
->
dotDiv
(
*
act
.
grad
,
*
act
.
in
);
}
void
backward
(
Argument
&
act
)
{
act
.
grad
->
dotDiv
(
*
act
.
grad
,
*
act
.
in
);
}
...
...
paddle/math/tests/test_BaseMatrix.cpp
浏览文件 @
8d736813
...
@@ -37,13 +37,13 @@ TEST(BaseMatrix, void) {
...
@@ -37,13 +37,13 @@ TEST(BaseMatrix, void) {
};
};
compare
(
&
BaseMatrix
::
neg
);
compare
(
&
BaseMatrix
::
neg
);
compare
(
&
BaseMatrix
::
exp
);
compare
(
&
BaseMatrix
::
exp
2
);
compare
(
&
BaseMatrix
::
log
);
compare
(
&
BaseMatrix
::
log
2
);
compare
(
&
BaseMatrix
::
sqrt
);
compare
(
&
BaseMatrix
::
sqrt
2
);
compare
(
&
BaseMatrix
::
square
);
compare
(
&
BaseMatrix
::
square
2
);
compare
(
&
BaseMatrix
::
reciprocal
);
compare
(
&
BaseMatrix
::
reciprocal
2
);
compare
(
&
BaseMatrix
::
abs
);
compare
(
&
BaseMatrix
::
abs
2
);
compare
(
&
BaseMatrix
::
sign
);
compare
(
&
BaseMatrix
::
sign
2
);
compare
(
&
BaseMatrix
::
zero
);
compare
(
&
BaseMatrix
::
zero
);
compare
(
&
BaseMatrix
::
one
);
compare
(
&
BaseMatrix
::
one
);
}
}
...
@@ -59,7 +59,7 @@ TEST(BaseMatrix, real) {
...
@@ -59,7 +59,7 @@ TEST(BaseMatrix, real) {
test
.
cmpWithoutArg
<
0
>
(
f
,
height
,
width
);
test
.
cmpWithoutArg
<
0
>
(
f
,
height
,
width
);
};
};
compare
(
&
BaseMatrix
::
pow
);
compare
(
&
BaseMatrix
::
pow
2
);
compare
(
&
BaseMatrix
::
subScalar
);
compare
(
&
BaseMatrix
::
subScalar
);
compare
(
&
BaseMatrix
::
mulScalar
);
compare
(
&
BaseMatrix
::
mulScalar
);
compare
(
&
BaseMatrix
::
divScalar
);
compare
(
&
BaseMatrix
::
divScalar
);
...
@@ -88,21 +88,21 @@ TEST(BaseMatrix, BaseMatrix) {
...
@@ -88,21 +88,21 @@ TEST(BaseMatrix, BaseMatrix) {
compare
(
&
BaseMatrix
::
softreluDerivative
);
compare
(
&
BaseMatrix
::
softreluDerivative
);
compare
(
&
BaseMatrix
::
brelu
);
compare
(
&
BaseMatrix
::
brelu
);
compare
(
&
BaseMatrix
::
breluDerivative
);
compare
(
&
BaseMatrix
::
breluDerivative
);
compare
(
&
BaseMatrix
::
square
);
compare
(
&
BaseMatrix
::
square
2
);
compare
(
&
BaseMatrix
::
squareDerivative
);
compare
(
&
BaseMatrix
::
squareDerivative
);
compare
(
&
BaseMatrix
::
tanh
);
compare
(
&
BaseMatrix
::
tanh
);
compare
(
&
BaseMatrix
::
tanhDerivative
);
compare
(
&
BaseMatrix
::
tanhDerivative
);
compare
(
&
BaseMatrix
::
reciprocal
);
compare
(
&
BaseMatrix
::
reciprocal
2
);
compare
(
&
BaseMatrix
::
reciprocalDerivative
);
compare
(
&
BaseMatrix
::
reciprocalDerivative
);
compare
(
&
BaseMatrix
::
abs
);
compare
(
&
BaseMatrix
::
abs
2
);
compare
(
&
BaseMatrix
::
absDerivative
);
compare
(
&
BaseMatrix
::
absDerivative
);
compare
(
&
BaseMatrix
::
sigmoid
);
compare
(
&
BaseMatrix
::
sigmoid
);
compare
(
&
BaseMatrix
::
sigmoidDerivative
);
compare
(
&
BaseMatrix
::
sigmoidDerivative
);
compare
(
&
BaseMatrix
::
expDerivative
);
compare
(
&
BaseMatrix
::
expDerivative
);
compare
(
&
BaseMatrix
::
sign
);
compare
(
&
BaseMatrix
::
sign
2
);
compare
(
&
BaseMatrix
::
exp
);
compare
(
&
BaseMatrix
::
exp
2
);
compare
(
&
BaseMatrix
::
log
);
compare
(
&
BaseMatrix
::
log
2
);
compare
(
&
BaseMatrix
::
sqrt
);
compare
(
&
BaseMatrix
::
sqrt
2
);
compare
(
&
BaseMatrix
::
dotMul
);
compare
(
&
BaseMatrix
::
dotMul
);
compare
(
&
BaseMatrix
::
dotMulSquare
);
compare
(
&
BaseMatrix
::
dotMulSquare
);
compare
(
&
BaseMatrix
::
dotSquareMul
);
compare
(
&
BaseMatrix
::
dotSquareMul
);
...
@@ -143,7 +143,7 @@ TEST(BaseMatrix, BaseMatrix_real) {
...
@@ -143,7 +143,7 @@ TEST(BaseMatrix, BaseMatrix_real) {
compare
(
&
BaseMatrix
::
addBias
);
compare
(
&
BaseMatrix
::
addBias
);
compare
(
&
BaseMatrix
::
add
);
compare
(
&
BaseMatrix
::
add
);
compare
(
&
BaseMatrix
::
sub
);
compare
(
&
BaseMatrix
::
sub
);
compare
(
&
BaseMatrix
::
pow
);
compare
(
&
BaseMatrix
::
pow
2
);
compare
(
&
BaseMatrix
::
addScalar
);
compare
(
&
BaseMatrix
::
addScalar
);
compare
(
&
BaseMatrix
::
subScalar
);
compare
(
&
BaseMatrix
::
subScalar
);
compare
(
&
BaseMatrix
::
mulScalar
);
compare
(
&
BaseMatrix
::
mulScalar
);
...
@@ -176,7 +176,7 @@ TEST(BaseMatrix, BaseMatrix_BaseMatrix) {
...
@@ -176,7 +176,7 @@ TEST(BaseMatrix, BaseMatrix_BaseMatrix) {
compare
(
&
BaseMatrix
::
logisticRegressionLoss
);
compare
(
&
BaseMatrix
::
logisticRegressionLoss
);
compare
(
&
BaseMatrix
::
logisticRegressionLossBp
);
compare
(
&
BaseMatrix
::
logisticRegressionLossBp
);
compare
(
&
BaseMatrix
::
biggerThan
);
compare
(
&
BaseMatrix
::
biggerThan
);
compare
(
&
BaseMatrix
::
max
);
compare
(
&
BaseMatrix
::
max
2
);
compare
(
&
BaseMatrix
::
dotMulSquare
);
compare
(
&
BaseMatrix
::
dotMulSquare
);
compare
(
&
BaseMatrix
::
dotSquareSquare
);
compare
(
&
BaseMatrix
::
dotSquareSquare
);
}
}
...
...
paddle/math/tests/test_Tensor.cu
浏览文件 @
8d736813
...
@@ -18,6 +18,8 @@ limitations under the License. */
...
@@ -18,6 +18,8 @@ limitations under the License. */
using
namespace
paddle
;
// NOLINT
using
namespace
paddle
;
// NOLINT
using
namespace
std
;
// NOLINT
using
namespace
std
;
// NOLINT
using
autotest
::
TensorCheckEqual
;
using
autotest
::
TensorCheckErr
;
#define INIT_UNARY(A1, A2) \
#define INIT_UNARY(A1, A2) \
Tensor A1(height, width); \
Tensor A1(height, width); \
...
...
paddle/math/tests/test_lazyAssign.cu
浏览文件 @
8d736813
...
@@ -19,6 +19,8 @@ limitations under the License. */
...
@@ -19,6 +19,8 @@ limitations under the License. */
using
namespace
paddle
;
// NOLINT
using
namespace
paddle
;
// NOLINT
using
namespace
std
;
// NOLINT
using
namespace
std
;
// NOLINT
using
autotest
::
TensorCheckEqual
;
using
autotest
::
TensorCheckErr
;
typedef
std
::
function
<
void
(
int
height
,
int
width
)
>
testMatrixFunc
;
typedef
std
::
function
<
void
(
int
height
,
int
width
)
>
testMatrixFunc
;
void
testMatrixCase
(
testMatrixFunc
matrixFunc
)
{
void
testMatrixCase
(
testMatrixFunc
matrixFunc
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录