Writeup for array write layer (#6820)

* Writeup for array write layer

* Fixed the type
del_some_in_makelist
kavyasrinet 8 years ago committed by Abhinav Arora
parent ab916e54b0
commit e56d03ea50

@ -492,9 +492,24 @@ def increment(x, value=1.0, in_place=True):
def array_write(x, i, array=None):
"""
This function creates an operator to write the data out as a
"""This function performs the operation to write the data out as an
LOD_TENSOR_ARRAY.
Args:
x (Variable|list): The input tensor from which the data will be read.
i (Variable|list): The subscript index in tensor array, that points the
place from which data will be read.
array (Variable|list): The data can be read into this variable if
this is assigned.
Returns:
Variable: The tensor type variable that has the data written to it.
Examples:
.. code-block::python
tmp = fluid.layers.zeros(shape=[10], dtype='int32')
i = fluid.layers.fill_constant(shape=[1], dtype='int64', value=10)
arr = layers.array_write(tmp, i=i)
"""
helper = LayerHelper('array_write', **locals())
if array is None:

Loading…
Cancel
Save