Skip to content

Commit ae8b471

Browse files
committed
- Cleaning fused_embedding_fc_lstm op
test=develop
1 parent fd31b54 commit ae8b471

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

paddle/fluid/operators/fused_embedding_fc_lstm_op.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,8 @@ void FusedEmbeddingFCLSTMOp::InferShape(
9393
ctx->SetOutputDim("Cell", out_dims);
9494
ctx->ShareLoD("Ids", "Hidden");
9595
ctx->ShareLoD("Ids", "Cell");
96-
int xx_width;
97-
if (ctx->Attrs().Get<bool>("use_seq")) {
98-
xx_width = wh_dims[1];
99-
} else {
100-
xx_width = wh_dims[1]; //
96+
int xx_width = wh_dims[1];
97+
if (!ctx->Attrs().Get<bool>("use_seq")) {
10198
PADDLE_ENFORCE(ctx->HasOutput("BatchedInput"),
10299
"Assert only one Output(BatchedInput) of LSTM.");
103100
PADDLE_ENFORCE(ctx->HasOutput("BatchedHidden"),

0 commit comments

Comments
 (0)