File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,21 @@ class ShrinkRNNMemoryOpProtoMaker : public framework::OpProtoAndCheckerMaker {
57
57
ShrinkRNNMemoryOpProtoMaker (framework::OpProto *proto,
58
58
framework::OpAttrChecker *op_checker)
59
59
: OpProtoAndCheckerMaker(proto, op_checker) {
60
- AddInput (" X" , " " );
61
- AddInput (" RankTable" , " " );
62
- AddInput (" I" , " " );
63
- AddOutput (" Out" , " " );
64
- AddComment (" " );
60
+ AddInput (" X" , " (LoDTensor) The RNN step memory to be shrinked." );
61
+ AddInput (" RankTable" , " (LoDRankTable) The lod_rank_table of dynamic RNN." );
62
+ AddInput (" I" ,
63
+ " (LoDTensor) The step index. The RNN step memory 'X' will be "
64
+ " shrinked to match the size of the input of the index'th step." );
65
+ AddOutput (" Out" , " (LoDTensor) The shrinked RNN step memory." );
66
+ AddComment (
67
+ R"DOC(
68
+ In dynamic RNN, we are able to handle sequences of different lengths.
69
+ Because of the multiple lengths, the size of each step input can be
70
+ different, which may lead to a mismatching between the input of
71
+ the current step and the memory generated by the previous one. This
72
+ operator shrinks memory according to the size of the next step input,
73
+ to make sure that they can match each other.
74
+ )DOC" );
65
75
}
66
76
};
67
77
You can’t perform that action at this time.
0 commit comments