Merged
Conversation
qingqing01
reviewed
Nov 1, 2017
| "(string, default sigmoid) " | ||
| "The activation type used in update gate and reset gate.") | ||
| .SetDefault("sigmoid"); | ||
| AddAttr<bool>("is_reverse", |
Contributor
There was a problem hiding this comment.
gate_activation -> gateActivation
is_reverse -> isReverse
paddle/operators/gru_op.cc
Outdated
| ctx->SetOutputDim("BatchHidden", {input_dims[0], frame_size}); | ||
| ctx->SetOutputDim("Hidden", {input_dims[0], frame_size}); | ||
| // ctx->ShareLoD("Input", "Gate"); | ||
| // ctx->ShareLoD("Input", "ResetHiddenPrev"); |
paddle/operators/gru_op.cc
Outdated
| GRUOpMaker(framework::OpProto* proto, framework::OpAttrChecker* op_checker) | ||
| : OpProtoAndCheckerMaker(proto, op_checker) { | ||
| AddInput("Input", | ||
| "(LoDTensor) The first input is a LodTensor, which support " |
paddle/operators/math/gru_compute.h
Outdated
| // } else { | ||
| // PADDLE_THROW("Do not support activation type."); | ||
| // } | ||
| // } |
|
|
||
|
|
||
| def relu(x): | ||
| return np.maximum(x, 0) |
Contributor
There was a problem hiding this comment.
Can these functions be imported from test_lstm_op.py ?
| return batch_gate, batch_reset_hidden_prev, hidden | ||
|
|
||
| def set_data(self): | ||
| lod = [[0, 2, 6, 9]] |
Contributor
There was a problem hiding this comment.
lod = [[0, 2, 6, 9]] -> lod = [[0, 2, 6, batch_size]] ?
… add-GRUOp-dev
… add-GRUOp-dev
cd414bc to
c4f7f3a
Compare
qingqing01
previously approved these changes
Nov 6, 2017
Contributor
qingqing01
left a comment
There was a problem hiding this comment.
I approve this PR. the code style still needs to update later. And please add the TODO description before this PR is merged.
qingqing01
approved these changes
Nov 6, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5254
Rewrite GatedRecurrentLayer in the new framework. Some code styles haven't formatted.