-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding documentation for the operators: lod_tensor_to_array , array_to_lod_tensor, create_array, increment #6807
Adding documentation for the operators: lod_tensor_to_array , array_to_lod_tensor, create_array, increment #6807
Conversation
…o_lod_tensor, create_array, increment
Examples: | ||
.. code-block:: python | ||
|
||
x = fluid.layers.data(name='x', shape=[10]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for statements in Line457-459, there should be another level of indentation (1 level deeper than the ".. code-block:: python) for proper rendering. Can you check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it was a formatting issue. Thanks for noticing this!
x = fluid.layers.data(name='x', shape=[10]) | ||
table = fluid.layers.lod_rank_table(x, level=0) | ||
array = fluid.layers.lod_tensor_to_array(x, table) | ||
lod_tensor = fluid.layers.array_to_lod_tensor(array, table) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
.. code-block:: python | ||
|
||
data = fluid.layers.data(name='data', shape=[32, 32], dtype='float32') | ||
data = fluid.layers.increment(x=data, value=3.0, in_place=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Examples: | ||
.. code-block:: python | ||
|
||
data = fluid.layers.create_array(dtype='float32') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
… layer_documentation
This PR has added documentation for the following:
lod_tensor_to_array
array_to_lod_tensor
create_array
increment