keras excerpt

Input(): used to instantiate a keras tensor

Input(shape=None,batch_shape=None,name=None,dtype=K.floatx(),sparse=False,tensor=None)

Input(shape=None,batch_shape=None,name=None,dtype=K.floatx(),sparse=False,tensor=None)
#参数:

shape: Shape tuple (integer), excluding batch size. for instance, shape=(32,) indicates that the expected input will be a batch of 32-dimensional vectors.

batch_shape: Shape tuple (integer), including batch size. for instance, batch_shape=(10,32) indicates that the expected input will be a batch of 10 32-dimensional vectors.

name: Optional name string for this layer. It is unique in a model (the same name cannot be reused twice). If the name is not specified, it will be automatically generated.

dtype: expected input data type

sparse: specific boolean value, whether the placeholder is sparse

tensor: The optional existing vector is packed into the Input layer. If set, this layer will not create a placeholder tensor.

#Return a tensor

conv2d is to create a convolutional layer to perform convolution operations on the input data. First look at the original function:

keras.layers.Conv2D(
	filters, 
	kernel_size, 
	strides=(1, 1), 
	padding='valid', 
	data_format=None, 
	dilation_rate=(1, 1), 
	activation=None, 
	use_bias=True, 
	kernel_initializer='glorot_uniform', 
	bias_initializer='zeros', 
	kernel_regularizer=None, 
	bias_regularizer=None, 
	activity_regularizer=None, 
	kernel_constraint=None, 
	bias_constraint=None
)

Filters: The number of convolution kernels determines the size of the last dimension (channels) of the output data.
kernel_size: The size (shape) of the convolution kernel, which determines the size of the height and width dimensions of the output data.
strides: The step length of the convolution operation. It can be an integer representing the same step length in the height and width directions, or (x, y) meaning the step length in the height direction is x and the step length in the width direction is y.
padding: When equal to'valid', the convolution kernel moves within the maximum range of the input data shape (height, width), and when equal to'same', if (height, width) does not exactly meet the set kernel_size and strides, the excess Will be filled with 0.
activation: activation function
use_bias: whether to use the offset
kernel_initializer: the initialization method of the convolution kernel
bias_initializer: the initialization method of the offset

Conv2d official website link

MaxPooling2D

keras.layers.MaxPooling2D(pool_size=(2, 2), strides=None, padding='valid', data_format=None)

pool_size: integer, or a tuple of 2 integers, the factor to reduce the ratio in the (vertical, horizontal) direction. (2, 2) will reduce both dimensions of the input tensor by half. If only one integer is used, the same window length will be used for both dimensions.
strides: Integer, a tuple of 2 integers, or None. Represents the step value. If it is None, then the default value is pool_size.
padding: "valid" or "same" (case sensitive).
data_format: string, one of channels_last (default) or channels_first. Indicates the order of inputting each dimension. channels_last represents an input tensor of size (batch, height, width, channels), and channels_first represents an input tensor of size (batch, channels, height, width). The default value is set according to the image_data_format value in the Keras configuration file ~/.keras/keras.json. If it has not been set, the default value is "channels_last".

UpSampling2D

For how concatenate
merges that axis, look at this
Insert picture description here

Guess you like

Origin blog.csdn.net/ALZFterry/article/details/109742952