deephyper.keras.layers.Padding#

class deephyper.keras.layers.Padding(*args: Any, **kwargs: Any)[source]#

Bases: Layer

Multi-dimensions padding layer.

This operation pads a tensor according to the paddings you specify. paddings is an integer tensor with shape [n-1, 2], where n is the rank of tensor. For each dimension D of input, paddings[D, 0] indicates how many values to add before the contents of tensor in that dimension, and paddings[D, 1] indicates how many values to add after the contents of tensor in that dimension. The first dimension corresponding to the batch size cannot be padded.

Parameters:
  • padding (list(list(int))) – e.g. [[1, 1]]

  • mode (str) – ‘CONSTANT’, ‘REFLECT’ or ‘SYMMETRIC’

Methods

call

compute_output_shape

get_config

__call__(*args: Any, **kwargs: Any) Any#

Call self as a function.