@@ -4486,7 +4486,7 @@ def reshape(x, shape, actual_shape=None, act=None, inplace=True, name=None):
4486
4486
return helper .append_activation (out )
4487
4487
4488
4488
4489
- def squeeze (x , axes , inplace = False , name = None ):
4489
+ def squeeze (input , axes , inplace = False , name = None ):
4490
4490
"""
4491
4491
Remove single-dimensional entries from the shape of a tensor. Takes a
4492
4492
parameter axes with a list of axes to squeeze. If axes is not provided, all
@@ -4510,7 +4510,7 @@ def squeeze(x, axes, inplace=False, name=None):
4510
4510
Out.shape = (3, 5)
4511
4511
4512
4512
Args:
4513
- x (Variable): The input variable to be squeezed.
4513
+ input (Variable): The input variable to be squeezed.
4514
4514
axes (list): List of integers, indicating the dimensions to be squeezed.
4515
4515
name (str|None): Name for this layer.
4516
4516
@@ -4521,20 +4521,20 @@ def squeeze(x, axes, inplace=False, name=None):
4521
4521
.. code-block:: python
4522
4522
4523
4523
x = layers.data(name='x', shape=[5, 1, 10])
4524
- y = layers.sequeeze(x, axes=[1])
4524
+ y = layers.sequeeze(input= x, axes=[1])
4525
4525
"""
4526
4526
helper = LayerHelper ("squeeze" , ** locals ())
4527
- out = helper .create_tmp_variable (dtype = x .dtype )
4527
+ out = helper .create_tmp_variable (dtype = input .dtype )
4528
4528
helper .append_op (
4529
4529
type = "squeeze" ,
4530
- inputs = {"X" : x },
4530
+ inputs = {"X" : input },
4531
4531
attrs = {"axes" : axes },
4532
4532
outputs = {"Out" : out })
4533
4533
4534
4534
return out
4535
4535
4536
4536
4537
- def unsqueeze (x , axes , inplace = False , name = None ):
4537
+ def unsqueeze (input , axes , inplace = False , name = None ):
4538
4538
"""
4539
4539
Insert single-dimensional entries to the shape of a tensor. Takes one
4540
4540
required argument axes, a list of dimensions that will be inserted.
@@ -4545,7 +4545,7 @@ def unsqueeze(x, axes, inplace=False, name=None):
4545
4545
then Unsqueezed tensor with axes=[0, 4] has shape [1, 3, 4, 5, 1].
4546
4546
4547
4547
Args:
4548
- x (Variable): The input variable to be unsqueezed.
4548
+ input (Variable): The input variable to be unsqueezed.
4549
4549
axes (list): List of integers, indicating the dimensions to be inserted.
4550
4550
name (str|None): Name for this layer.
4551
4551
@@ -4556,13 +4556,13 @@ def unsqueeze(x, axes, inplace=False, name=None):
4556
4556
.. code-block:: python
4557
4557
4558
4558
x = layers.data(name='x', shape=[5, 10])
4559
- y = layers.unsequeeze(x, axes=[1])
4559
+ y = layers.unsequeeze(input= x, axes=[1])
4560
4560
"""
4561
4561
helper = LayerHelper ("unsqueeze" , ** locals ())
4562
- out = helper .create_tmp_variable (dtype = x .dtype )
4562
+ out = helper .create_tmp_variable (dtype = input .dtype )
4563
4563
helper .append_op (
4564
4564
type = "unsqueeze" ,
4565
- inputs = {"X" : x },
4565
+ inputs = {"X" : input },
4566
4566
attrs = {"axes" : axes },
4567
4567
outputs = {"Out" : out })
4568
4568
0 commit comments