chainer.functions.pad¶
-
chainer.functions.pad(x, pad_width, mode, **keywords)[source]¶ Pad an input variable.
- Parameters
x (
Variableor N-dimensional array) – Input data.pad_width (int or array-like) – Number of values padded to the edges of each axis.
mode (str) – Specifies how the function fills the periphery of the array. The mode is passed to
numpy.pad()orcupy.pad(). If it is'constant', the input is padded by a constant value specified byconstant_values.constant_values (int or array-like) – Constant values to fill the periphery in the
'constant'mode.
- Returns
Output variable.
- Return type