Skip to content

Commit db157ed

Browse files
author
Yang Yang(Tony)
authored
New Op Test framework. (#4962)
Pass all forward op test
1 parent bc15117 commit db157ed

17 files changed

+157
-638
lines changed

paddle/operators/crop_op.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class CropOpMaker : public framework::OpProtoAndCheckerMaker {
5959
"The input should be a k-D tensor(k > 0 and k < 7)");
6060
AddInput("Y",
6161
"The input used as reference for cropping"
62-
" with the same dimension as X. ");
62+
" with the same dimension as X. ")
63+
.AsDispensable();
6364
AddOutput("Out",
6465
"The output of crop op "
6566
"with the same dimension as X.");

paddle/operators/fc_op.cc

Lines changed: 0 additions & 200 deletions
This file was deleted.

paddle/operators/gru_unit_op.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ class GRUUnitOp : public framework::OperatorWithKernel {
5454
PADDLE_ENFORCE_EQ(
5555
weight_width, frame_size * 3,
5656
"The shape of Weight matrix must be [frame_size, frame_size * 3].");
57-
auto bias = Input("Bias");
58-
if (bias != framework::kEmptyVarName) {
57+
if (ctx->HasInput("Bias")) {
5958
auto bias_dims = ctx->GetInputDim("Bias");
6059
int bias_height = bias_dims[0];
6160
int bias_width = bias_dims[1];
@@ -89,7 +88,8 @@ class GRUUnitOpMaker : public framework::OpProtoAndCheckerMaker {
8988
"weights of output candidate with shape [frame_size, frame_size]");
9089
AddInput("Bias",
9190
"(Tensor) Bias vector with shape [1, frame_size * 3] concating "
92-
"bias of the update gate, reset gate and output candidate.");
91+
"bias of the update gate, reset gate and output candidate.")
92+
.AsDispensable();
9393
AddOutput("Gate",
9494
"(Tensor) Matrix with shape [batch_size, frame_size * 3] for the "
9595
"output of update gate, reset gate and output candidate")

paddle/operators/identity_op.cc

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)