tf.layers.Conv2DLayer module#

class tf.layers.Conv2DLayer.Conv2DLayer(*args: Any, **kwargs: Any)#

Bases: modelzoo.common.tf.layers.BaseLayer.BaseLayer

Wrapper around the Keras 2D convolution layer.

call(inputs, **kwargs)#

Apply the 2D convolution layer.

Parameters

inputs – A 4D tensor with shape: (samples, channels, rows, cols) if data_format='channels_first' or a 4D tensor with shape (samples, rows, cols, channels) if data_format='channels_last'.

Returns

A 4D tensor with shape: (samples, filters, new_rows, new_cols) if data_format='channels_first' or a 4D tensor with shape: (samples, new_rows, new_cols, filters) if data_format='channels_last'. Note that rows and cols values might have changed due to padding.

Return type

Tensor