Rename 'block_expand' to 'im2sequence'

fix-profile-doc-typo
wanghaoshuang 7 years ago
parent 11b4471ade
commit 9d650112c0

@ -494,7 +494,7 @@ swish
.. autofunction:: paddle.v2.fluid.layers.swish .. autofunction:: paddle.v2.fluid.layers.swish
:noindex: :noindex:
block_expand im2sequence
------ ------
.. autofunction:: paddle.v2.fluid.layers.block_expand .. autofunction:: paddle.v2.fluid.layers.im2sequence
:noindex: :noindex:

@ -50,7 +50,7 @@ __all__ = [
'sequence_last_step', 'sequence_last_step',
'dropout', 'dropout',
'split', 'split',
'block_expand', 'im2sequence',
] ]
@ -1600,15 +1600,15 @@ def split(input, num_or_sections, dim=-1):
return outs return outs
def block_expand(input, def im2sequence(input,
block_x=1, block_x=1,
block_y=1, block_y=1,
stride_x=1, stride_x=1,
stride_y=1, stride_y=1,
padding_x=0, padding_x=0,
padding_y=0, padding_y=0,
name=None, name=None,
layer_attr=None): layer_attr=None):
""" """
This op use block to scan images and convert these images to sequences. This op use block to scan images and convert these images to sequences.
After expanding, the number of time step are output_height * output_width After expanding, the number of time step are output_height * output_width
@ -1696,13 +1696,13 @@ def block_expand(input,
.. code-block:: python .. code-block:: python
output = fluid.layers.block_expand(input=layer, stride_x=1, stride_y=1, block_x=2, block_y=2) output = fluid.layers.im2sequence(input=layer, stride_x=1, stride_y=1, block_x=2, block_y=2)
""" """
helper = LayerHelper('block_expand', **locals()) helper = LayerHelper('im2sequence', **locals())
out = helper.create_tmp_variable(dtype=helper.input_dtype()) out = helper.create_tmp_variable(dtype=helper.input_dtype())
helper.append_op( helper.append_op(
type='block_expand', type='im2sequence',
inputs={'X': input}, inputs={'X': input},
outputs={'Out': out}, outputs={'Out': out},
attrs={ attrs={

Loading…
Cancel
Save