Integer, the dimensionality of the output space (i.e. the number of output filters in the convolution).
kernel_size
An integer or tuple/list of 2 integers, specifying the height and width of the 2D convolution window. Can be a single integer to specify the same value for all spatial dimensions.
strides
An integer or tuple/list of 2 integers, specifying the strides of the convolution along the height and width. Can be a single integer to specify the same value for all spatial dimensions. Specifying any stride value != 1 is incompatible with specifying any value != 1. dilation_rate
padding
one of or (case-insensitive). means no padding. results in padding evenly to the left/right or up/down of the input such that output has the same height/width dimension as the input. “valid”“same”“valid”“same”
data_format
A string, one of (default) or . The ordering of the dimensions in the inputs. corresponds to inputs with shape while corresponds to inputs with shape . It defaults to the value found in your Keras config file at . If you never set it, then it will be . channels_lastchannels_firstchannels_last(batch_size, height, width, channels)channels_first(batch_size, channels,height, width)image_data_format~/.keras/keras.jsonchannels_last
dilation_rate
an integer or tuple/list of 2 integers, specifying the dilation rate to use for dilated convolution. Can be a single integer to specify the same value for all spatial dimensions. Currently, specifying any value != 1 is incompatible with specifying any stride value != 1. dilation_rate
groups
A positive integer specifying the number of groups in which the input is split along the channel axis. Each group is convolved separately with filters. The output is the concatenation of all the results along the channel axis. Input channels and must both be divisible by . filters / groupsgroupsfiltersgroups
activation
Activation function to use. If you don’t specify anything, no activation is applied (see keras.activations).
use_bias
Boolean, whether the layer uses a bias vector.
kernel_initializer
Initializer for the weights matrix (see keras.initializers). kernel
bias_initializer
Initializer for the bias vector (see keras.initializers).
kernel_regularizer
Regularizer function applied to the weights matrix (see keras.regularizers). kernel
bias_regularizer
Regularizer function applied to the bias vector (see keras.regularizers).
activity_regularizer
Regularizer function applied to the output of the layer (its “activation”) (see keras.regularizers).
kernel_constraint
Constraint function applied to the kernel matrix (see keras.constraints).
bias_constraint
Constraint function applied to the bias vector (see keras.constraints).
2. tf.keras.layers.Concatenate
tf.keras.layers.Concatenate(
axis=-1,**kwargs
)
Arguments
axis
Axis along which to concatenate.
**kwargs
standard layer keyword arguments.
Example
x = np.arange(20).reshape(2,2,5)print(x)
y = np.arange(20,30).reshape(2,1,5)print(y)
tf.keras.layers.Concatenate(axis=1)([x, y])
x = np.arange(20).reshape(2,2,5)print(x)
y = np.arange(20,30).reshape(2,1,5)print(y)
tf.keras.layers.Concatenate(axis=1)([x, y])