提交 9f15d881 编写于 作者: J Jacek Czaja

- Cleanup as suggessted by reviewers

test=develop
上级 ae8b4717
...@@ -93,7 +93,6 @@ void FusedEmbeddingFCLSTMOp::InferShape( ...@@ -93,7 +93,6 @@ void FusedEmbeddingFCLSTMOp::InferShape(
ctx->SetOutputDim("Cell", out_dims); ctx->SetOutputDim("Cell", out_dims);
ctx->ShareLoD("Ids", "Hidden"); ctx->ShareLoD("Ids", "Hidden");
ctx->ShareLoD("Ids", "Cell"); ctx->ShareLoD("Ids", "Cell");
int xx_width = wh_dims[1];
if (!ctx->Attrs().Get<bool>("use_seq")) { if (!ctx->Attrs().Get<bool>("use_seq")) {
PADDLE_ENFORCE(ctx->HasOutput("BatchedInput"), PADDLE_ENFORCE(ctx->HasOutput("BatchedInput"),
"Assert only one Output(BatchedInput) of LSTM."); "Assert only one Output(BatchedInput) of LSTM.");
...@@ -109,7 +108,7 @@ void FusedEmbeddingFCLSTMOp::InferShape( ...@@ -109,7 +108,7 @@ void FusedEmbeddingFCLSTMOp::InferShape(
ctx->SetOutputDim("BatchedHidden", out_dims); ctx->SetOutputDim("BatchedHidden", out_dims);
ctx->SetOutputDim("BatchedCell", out_dims); ctx->SetOutputDim("BatchedCell", out_dims);
} }
ctx->SetOutputDim("XX", {x_dims[0], xx_width}); ctx->SetOutputDim("XX", {x_dims[0], wh_dims[1]});
ctx->ShareLoD("Ids", "XX"); ctx->ShareLoD("Ids", "XX");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册