tf.layers.Conv2DLayer module
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)
ifdata_format='channels_first'
or a 4D tensor with shape(samples, rows, cols, channels)
ifdata_format='channels_last'
.- Returns
A 4D tensor with shape:
(samples, filters, new_rows, new_cols)
ifdata_format='channels_first'
or a 4D tensor with shape:(samples, new_rows, new_cols, filters)
ifdata_format='channels_last'
. Note thatrows
andcols
values might have changed due to padding.- Return type
Tensor