unsqueeze

    该OP向输入(input)的shape中一个或多个位置(axes)插入维度。

    • 示例:

    参数:

    • name (str,可选)- 具体用法请参见 ,一般无需设置。默认值: None

    返回类型:Variable

    代码示例

    1. import paddle.fluid as fluid
    2. y = fluid.layers.unsqueeze(input=x, axes=[1])
    3. # y.shape is [5, 1, 10]