Skip to content

Commit 8d73681

Browse files
committed
fix some errors due to merge
1 parent 671db8d commit 8d73681

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed

paddle/gserver/activations/ActivationFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ void forward(Argument& act) {
345345
useGpu(act.deviceId));
346346

347347
act.in->copyFrom(*act.value);
348-
act.value->log(*act.value);
348+
act.value->log2(*act.value);
349349
}
350350

351351
void backward(Argument& act) { act.grad->dotDiv(*act.grad, *act.in); }

paddle/math/tests/test_BaseMatrix.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ TEST(BaseMatrix, void) {
3737
};
3838

3939
compare(&BaseMatrix::neg);
40-
compare(&BaseMatrix::exp);
41-
compare(&BaseMatrix::log);
42-
compare(&BaseMatrix::sqrt);
43-
compare(&BaseMatrix::square);
44-
compare(&BaseMatrix::reciprocal);
45-
compare(&BaseMatrix::abs);
46-
compare(&BaseMatrix::sign);
40+
compare(&BaseMatrix::exp2);
41+
compare(&BaseMatrix::log2);
42+
compare(&BaseMatrix::sqrt2);
43+
compare(&BaseMatrix::square2);
44+
compare(&BaseMatrix::reciprocal2);
45+
compare(&BaseMatrix::abs2);
46+
compare(&BaseMatrix::sign2);
4747
compare(&BaseMatrix::zero);
4848
compare(&BaseMatrix::one);
4949
}
@@ -59,7 +59,7 @@ TEST(BaseMatrix, real) {
5959
test.cmpWithoutArg<0>(f, height, width);
6060
};
6161

62-
compare(&BaseMatrix::pow);
62+
compare(&BaseMatrix::pow2);
6363
compare(&BaseMatrix::subScalar);
6464
compare(&BaseMatrix::mulScalar);
6565
compare(&BaseMatrix::divScalar);
@@ -88,21 +88,21 @@ TEST(BaseMatrix, BaseMatrix) {
8888
compare(&BaseMatrix::softreluDerivative);
8989
compare(&BaseMatrix::brelu);
9090
compare(&BaseMatrix::breluDerivative);
91-
compare(&BaseMatrix::square);
91+
compare(&BaseMatrix::square2);
9292
compare(&BaseMatrix::squareDerivative);
9393
compare(&BaseMatrix::tanh);
9494
compare(&BaseMatrix::tanhDerivative);
95-
compare(&BaseMatrix::reciprocal);
95+
compare(&BaseMatrix::reciprocal2);
9696
compare(&BaseMatrix::reciprocalDerivative);
97-
compare(&BaseMatrix::abs);
97+
compare(&BaseMatrix::abs2);
9898
compare(&BaseMatrix::absDerivative);
9999
compare(&BaseMatrix::sigmoid);
100100
compare(&BaseMatrix::sigmoidDerivative);
101101
compare(&BaseMatrix::expDerivative);
102-
compare(&BaseMatrix::sign);
103-
compare(&BaseMatrix::exp);
104-
compare(&BaseMatrix::log);
105-
compare(&BaseMatrix::sqrt);
102+
compare(&BaseMatrix::sign2);
103+
compare(&BaseMatrix::exp2);
104+
compare(&BaseMatrix::log2);
105+
compare(&BaseMatrix::sqrt2);
106106
compare(&BaseMatrix::dotMul);
107107
compare(&BaseMatrix::dotMulSquare);
108108
compare(&BaseMatrix::dotSquareMul);
@@ -143,7 +143,7 @@ TEST(BaseMatrix, BaseMatrix_real) {
143143
compare(&BaseMatrix::addBias);
144144
compare(&BaseMatrix::add);
145145
compare(&BaseMatrix::sub);
146-
compare(&BaseMatrix::pow);
146+
compare(&BaseMatrix::pow2);
147147
compare(&BaseMatrix::addScalar);
148148
compare(&BaseMatrix::subScalar);
149149
compare(&BaseMatrix::mulScalar);
@@ -176,7 +176,7 @@ TEST(BaseMatrix, BaseMatrix_BaseMatrix) {
176176
compare(&BaseMatrix::logisticRegressionLoss);
177177
compare(&BaseMatrix::logisticRegressionLossBp);
178178
compare(&BaseMatrix::biggerThan);
179-
compare(&BaseMatrix::max);
179+
compare(&BaseMatrix::max2);
180180
compare(&BaseMatrix::dotMulSquare);
181181
compare(&BaseMatrix::dotSquareSquare);
182182
}

paddle/math/tests/test_Tensor.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ limitations under the License. */
1818

1919
using namespace paddle; // NOLINT
2020
using namespace std; // NOLINT
21+
using autotest::TensorCheckEqual;
22+
using autotest::TensorCheckErr;
2123

2224
#define INIT_UNARY(A1, A2) \
2325
Tensor A1(height, width); \

paddle/math/tests/test_lazyAssign.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ limitations under the License. */
1919

2020
using namespace paddle; // NOLINT
2121
using namespace std; // NOLINT
22+
using autotest::TensorCheckEqual;
23+
using autotest::TensorCheckErr;
2224

2325
typedef std::function<void(int height, int width)> testMatrixFunc;
2426
void testMatrixCase(testMatrixFunc matrixFunc) {

0 commit comments

Comments
 (0)