Skip to content

Commit

Permalink
Merge pull request #6538 from wanghaoshuang/crop_doc
Browse files Browse the repository at this point in the history
Fix crop op doc
  • Loading branch information
wanghaoshuang authored Dec 18, 2017
2 parents dd92fb2 + 2cd5106 commit b28a173
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion paddle/operators/crop_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ There are two ways to set shape:
The input should be a k-D tensor(k > 0 and k < 7). As an example:
Given:
Case 1:
Given
X = [[0, 1, 2, 0, 0]
[0, 3, 4, 0, 0]
Expand All @@ -107,6 +108,27 @@ we get:
Out = [[1, 2],
[3, 4]].
Case 2:
Given
X = [[0, 1, 2, 5, 0]
[0, 3, 4, 6, 0]
[0, 0, 0, 0, 0]],
and
offsets = [0, 1],
and
Y = [[0, 0, 0]
[0, 0, 0]],
we get:
Out = [[1, 2, 5],
[3, 4, 6]].
)DOC");
}
};
Expand Down

0 comments on commit b28a173

Please sign in to comment.