/// <param name="axis">The axis that should be normalized (typically the features axis).
/// For instance, after a Conv2D layer with data_format="channels_first", set axis=1 in BatchNormalization.
/// </param>
/// <param name="momentum">Momentum for the moving average.</param>
/// <param name="epsilon">Small float added to variance to avoid dividing by zero.</param>
/// <param name="center">If True, add offset of beta to normalized tensor. If False, beta is ignored.</param>
/// <param name="scale">If True, multiply by gamma. If False, gamma is not used. When the next layer is linear (also e.g. nn.relu), this can be disabled since the scaling will be done by the next layer.</param>
/// <param name="beta_initializer">Initializer for the beta weight.</param>
/// <param name="gamma_initializer">Initializer for the gamma weight.</param>
/// <param name="moving_mean_initializer">Initializer for the moving mean.</param>
/// <param name="moving_variance_initializer">Initializer for the moving variance.</param>
/// <param name="trainable">Boolean, if True the variables will be marked as trainable.</param>
/// <param name="name">Layer name.</param>
/// <param name="renorm">Whether to use Batch Renormalization. This adds extra variables during training. The inference is the same for either value of this parameter.</param>
/// <param name="renorm_momentum">Momentum used to update the moving means and standard deviations with renorm.
/// Unlike momentum, this affects training and should be neither too small (which would add noise) nor too large (which would give stale estimates).
/// Note that momentum is still applied to get the means and variances for inference.
/// </param>
/// <returns>Tensor of the same shape as input.</returns>
public BatchNormalization BatchNormalization(int axis = -1,
/// <param name="filters">Integer, the dimensionality of the output space (i.e. the number of output filters in the convolution)</param>
/// <param name="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.</param>
/// <param name="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 dilation_rate value != 1.</param>
/// <param name="padding">one of "valid" or "same" (case-insensitive). "valid" means no padding. "same" 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.</param>
/// <param name="data_format">A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch_size, height, width, channels) while channels_first corresponds to inputs with shape (batch_size, channels, height, width). It defaults to the image_data_format value found in your Keras config file at ~/.keras/keras.json. If you never set it, then it will be channels_last.</param>
/// <param name="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 dilation_rate value != 1 is incompatible with specifying any stride value != 1.</param>
/// <param name="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 / groups filters. The output is the concatenation of all the groups results along the channel axis. Input channels and filters must both be divisible by groups.</param>
/// <param name="activation">Activation function to use. If you don't specify anything, no activation is applied (see keras.activations).</param>
/// <param name="use_bias">Boolean, whether the layer uses a bias vector.</param>
/// <param name="kernel_initializer">Initializer for the kernel weights matrix (see keras.initializers).</param>
/// <param name="bias_initializer">Initializer for the bias vector (see keras.initializers).</param>
/// <param name="kernel_regularizer">Regularizer function applied to the kernel weights matrix (see keras.regularizers).</param>
/// <param name="bias_regularizer">Regularizer function applied to the bias vector (see keras.regularizers).</param>
/// <param name="activity_regularizer">Regularizer function applied to the output of the layer (its "activation") (see keras.regularizers).</param>
/// 2D convolution layer (e.g. spatial convolution over images).
/// This layer creates a convolution kernel that is convolved with the layer input to produce a tensor of outputs.
/// If use_bias is True, a bias vector is created and added to the outputs.Finally, if activation is not None, it is applied to the outputs as well.
/// </summary>
/// <param name="filters">Integer, the dimensionality of the output space (i.e. the number of output filters in the convolution)</param>
/// <param name="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.</param>
/// <param name="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 dilation_rate value != 1.</param>
/// <param name="padding">one of "valid" or "same" (case-insensitive). "valid" means no padding. "same" 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.</param>
/// <param name="data_format">A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch_size, height, width, channels) while channels_first corresponds to inputs with shape (batch_size, channels, height, width). It defaults to the image_data_format value found in your Keras config file at ~/.keras/keras.json. If you never set it, then it will be channels_last.</param>
/// <param name="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 dilation_rate value != 1 is incompatible with specifying any stride value != 1.</param>
/// <param name="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 / groups filters. The output is the concatenation of all the groups results along the channel axis. Input channels and filters must both be divisible by groups.</param>
/// <param name="activation">Activation function to use. If you don't specify anything, no activation is applied (see keras.activations).</param>
/// <param name="use_bias">Boolean, whether the layer uses a bias vector.</param>
/// <param name="kernel_initializer">The name of the initializer for the kernel weights matrix (see keras.initializers).</param>
/// <param name="bias_initializer">The name of the initializer for the bias vector (see keras.initializers).</param>
/// <param name="kernel_regularizer">The name of the regularizer function applied to the kernel weights matrix (see keras.regularizers).</param>
/// <param name="bias_regularizer">The name of the regularizer function applied to the bias vector (see keras.regularizers).</param>
/// <param name="activity_regularizer">The name of the regularizer function applied to the output of the layer (its "activation") (see keras.regularizers).</param>
/// Transposed convolution layer (sometimes called Deconvolution).
/// </summary>
/// <param name="filters"></param>
/// <param name="kernel_size"></param>
/// <param name="strides"></param>
/// <param name="padding"></param>
/// <param name="data_format"></param>
/// <param name="dilation_rate"></param>
/// <param name="activation"></param>
/// <param name="use_bias"></param>
/// <param name="kernel_initializer"></param>
/// <param name="bias_initializer"></param>
/// <param name="kernel_regularizer"></param>
/// <param name="bias_regularizer"></param>
/// <param name="activity_regularizer"></param>
/// <returns></returns>
/// <param name="filters">Integer, the dimensionality of the output space (i.e. the number of output filters in the convolution)</param>
/// <param name="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.</param>
/// <param name="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 dilation_rate value != 1.</param>
/// <param name="output_padding">one of "valid" or "same" (case-insensitive). "valid" means no padding. "same" 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.</param>
/// <param name="data_format">A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch_size, height, width, channels) while channels_first corresponds to inputs with shape (batch_size, channels, height, width). It defaults to the image_data_format value found in your Keras config file at ~/.keras/keras.json. If you never set it, then it will be channels_last.</param>
/// <param name="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 dilation_rate value != 1 is incompatible with specifying any stride value != 1.</param>
/// <param name="activation">Activation function to use. If you don't specify anything, no activation is applied (see keras.activations).</param>
/// <param name="use_bias">Boolean, whether the layer uses a bias vector.</param>
/// <param name="kernel_initializer">The name of the initializer for the kernel weights matrix (see keras.initializers).</param>
/// <param name="bias_initializer">The name of the initializer for the bias vector (see keras.initializers).</param>
/// <param name="kernel_regularizer">The name of the regularizer function applied to the kernel weights matrix (see keras.regularizers).</param>
/// <param name="bias_regularizer">The name of the regularizer function applied to the bias vector (see keras.regularizers).</param>
/// <param name="activity_regularizer">The name of the regularizer function applied to the output of the layer (its "activation") (see keras.regularizers).</param>
/// Dense implements the operation: output = activation(dot(input, kernel) + bias) where activation is the
/// element-wise activation function passed as the activation argument, kernel is a weights matrix created by the layer,
/// and bias is a bias vector created by the layer (only applicable if use_bias is True).
/// </summary>
/// <param name="units">Positive integer, dimensionality of the output space.</param>
/// <param name="activation">Activation function to use. If you don't specify anything, no activation is applied (ie. "linear" activation: a(x) = x).</param>
/// <param name="kernel_initializer">Initializer for the kernel weights matrix.</param>
/// <param name="use_bias">Boolean, whether the layer uses a bias vector.</param>
/// <param name="bias_initializer">Initializer for the bias vector.</param>
/// <param name="input_shape">N-D tensor with shape: (batch_size, ..., input_dim). The most common situation would be a 2D input with shape (batch_size, input_dim).</param>
/// <returns>N-D tensor with shape: (batch_size, ..., units). For instance, for a 2D input with shape (batch_size, input_dim), the output would have shape (batch_size, units).</returns>
/// Dense implements the operation: output = activation(dot(input, kernel) + bias) where activation is the
/// element-wise activation function passed as the activation argument, kernel is a weights matrix created by the layer,
/// and bias is a bias vector created by the layer (only applicable if use_bias is True).
/// </summary>
/// <param name="units">Positive integer, dimensionality of the output space.</param>
/// <returns>N-D tensor with shape: (batch_size, ..., units). For instance, for a 2D input with shape (batch_size, input_dim), the output would have shape (batch_size, units).</returns>
/// Dense implements the operation: output = activation(dot(input, kernel) + bias) where activation is the
/// element-wise activation function passed as the activation argument, kernel is a weights matrix created by the layer,
/// and bias is a bias vector created by the layer (only applicable if use_bias is True).
/// </summary>
/// <param name="units">Positive integer, dimensionality of the output space.</param>
/// <param name="activation">Activation function to use. If you don't specify anything, no activation is applied (ie. "linear" activation: a(x) = x).</param>
/// <param name="input_shape">N-D tensor with shape: (batch_size, ..., input_dim). The most common situation would be a 2D input with shape (batch_size, input_dim).</param>
/// <returns>N-D tensor with shape: (batch_size, ..., units). For instance, for a 2D input with shape (batch_size, input_dim), the output would have shape (batch_size, units).</returns>
/// The Dropout layer randomly sets input units to 0 with a frequency of rate at each step during training time,
/// which helps prevent overfitting.Inputs not set to 0 are scaled up by 1/(1 - rate) such that the sum over all inputs is unchanged.
/// </summary>
/// <param name="rate">Float between 0 and 1. Fraction of the input units to drop.</param>
/// <param name="noise_shape">1D integer tensor representing the shape of the binary dropout mask that will be multiplied with the input. For instance,
/// if your inputs have shape (batch_size, timesteps, features) and you want the dropout mask to be the same for all timesteps,
/// you can use noise_shape=(batch_size, 1, features).
/// </param>
/// <param name="seed">An integer to use as random seed.</param>
/// Flattens the input. Does not affect the batch size.
/// </summary>
/// <param name="data_format">A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs.
/// channels_last corresponds to inputs with shape (batch, ..., channels) while channels_first corresponds to inputs with shape (batch, channels, ...).
/// It defaults to the image_data_format value found in your Keras config file at ~/.keras/keras.json.
/// If you never set it, then it will be "channels_last".
/// `Input()` is used to instantiate a Keras tensor.
/// Keras tensor is a TensorFlow symbolic tensor object, which we augment with certain attributes that allow us
/// to build a Keras model just by knowing the inputs and outputs of the model.
/// </summary>
/// <param name="shape">A shape tuple not including the batch size.</param>
/// <param name="name"></param>
/// <param name="sparse"></param>
/// <param name="ragged"></param>
/// <returns></returns>
/// <param name="name">An optional name string for the layer. Should be unique in a model (do not reuse the same name twice). It will be autogenerated if it isn't provided.</param>
/// <param name="sparse">A boolean specifying whether the placeholder to be created is sparse. Only one of 'ragged' and 'sparse' can be True.
/// Note that, if sparse is False, sparse tensors can still be passed into the input - they will be densified with a default value of 0.
/// </param>
/// <param name="ragged">A boolean specifying whether the placeholder to be created is ragged. Only one of 'ragged' and 'sparse' can be True.
/// In this case, values of 'None' in the 'shape' argument represent ragged dimensions. For more information about RaggedTensors, see this guide.
/// <param name="pool_size">Integer, size of the max pooling window.</param>
/// <param name="strides">Integer, or null. Specifies how much the pooling window moves for each pooling step. If null, it will default to pool_size.</param>
/// <param name="padding">One of "valid" or "same" (case-insensitive). "valid" means no padding.
/// "same" 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.
/// </param>
/// <param name="data_format">
/// A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs.
/// channels_last corresponds to inputs with shape (batch, steps, features) while channels_first corresponds to inputs with shape (batch, features, steps).
/// </param>
/// <returns></returns>
public MaxPooling1D MaxPooling1D(int? pool_size = null,
int? strides = null,
string padding = "valid")
string padding = "valid",
string data_format = null)
=> new MaxPooling1D(new Pooling1DArgs
{
PoolSize = pool_size ?? 2,
Strides = strides ?? (pool_size ?? 2),
Padding = padding
Padding = padding,
DataFormat = data_format
});
/// <summary>
/// Max pooling operation for 2D spatial data.
/// Downsamples the input representation by taking the maximum value over the window defined by pool_size for each dimension along the features axis.
/// The window is shifted by strides in each dimension. The resulting output when using "valid" padding option has a shape(number of rows or columns)
/// The resulting output shape when using the "same" padding option is: output_shape = input_shape / strides
/// </summary>
/// <param name="pool_size">
/// Integer or tuple of 2 integers, window size over which to take the maximum.
/// (2, 2) will take the max value over a 2x2 pooling window. If only one integer is specified, the same window length will be used for both dimensions.
/// </param>
/// <param name="strides">
/// Integer, tuple of 2 integers, or null. Strides values. Specifies how far the pooling window moves for each pooling step.
/// If null, it will default to pool_size.
/// </param>
/// <param name="padding">One of "valid" or "same" (case-insensitive). "valid" means no padding.
/// "same" 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.
/// </param>
/// <param name="data_format">
/// A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs.
/// channels_last corresponds to inputs with shape (batch, height, width, channels) while channels_first corresponds to
/// inputs with shape (batch, channels, height, width).
/// It defaults to the image_data_format value found in your Keras config file at ~/.keras/keras.json.
/// If you never set it, then it will be "channels_last"</param>
/// <returns></returns>
public MaxPooling2D MaxPooling2D(TensorShape pool_size = null,
TensorShape strides = null,
string padding = "valid")
string padding = "valid",
string data_format = null)
=> new MaxPooling2D(new MaxPooling2DArgs
{
PoolSize = pool_size ?? (2, 2),
Strides = strides,
Padding = padding
Padding = padding,
DataFormat = data_format
});
/// <summary>
/// Max pooling layer for 2D inputs (e.g. images).
/// </summary>
/// <param name="inputs">The tensor over which to pool. Must have rank 4.</param>
/// <param name="pool_size"></param>
/// <param name="strides"></param>
/// <param name="padding"></param>
/// <param name="data_format"></param>
/// <param name="name"></param>
/// <param name="pool_size">
/// Integer or tuple of 2 integers, window size over which to take the maximum.
/// (2, 2) will take the max value over a 2x2 pooling window. If only one integer is specified, the same window length will be used for both dimensions.
/// </param>
/// <param name="strides">
/// Integer, tuple of 2 integers, or null. Strides values. Specifies how far the pooling window moves for each pooling step.
/// If null, it will default to pool_size.
/// </param>
/// <param name="padding">One of "valid" or "same" (case-insensitive). "valid" means no padding.
/// "same" 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.
/// </param>
/// <param name="data_format">
/// A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs.
/// channels_last corresponds to inputs with shape (batch, height, width, channels) while channels_first corresponds to
/// inputs with shape (batch, channels, height, width).
/// It defaults to the image_data_format value found in your Keras config file at ~/.keras/keras.json.
/// If you never set it, then it will be "channels_last"</param>
/// <param name="name">A name for the layer</param>
/// Global max pooling operation for spatial data.
/// </summary>
/// <returns></returns>
public GlobalAveragePooling2D GlobalAveragePooling2D()
=> new GlobalAveragePooling2D(new Pooling2DArgs { });
/// <summary>
/// Global average pooling operation for temporal data.
/// </summary>
/// <param name="data_format"> A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs.
/// channels_last corresponds to inputs with shape (batch, steps, features) while channels_first corresponds to inputs with shape (batch, features, steps).
/// </param>
/// <returns></returns>
public GlobalAveragePooling1D GlobalAveragePooling1D(string data_format = "channels_last")
=> new GlobalAveragePooling1D(new Pooling1DArgs { DataFormat = data_format });
/// <summary>
/// Global max pooling operation for spatial data.
/// </summary>
/// <param name="data_format">A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs.
/// channels_last corresponds to inputs with shape (batch, height, width, channels) while channels_first corresponds to inputs with shape (batch, channels, height, width).</param>
/// <returns></returns>
public GlobalAveragePooling2D GlobalAveragePooling2D(string data_format = "channels_last")
=> new GlobalAveragePooling2D(new Pooling2DArgs { DataFormat = data_format });
/// <summary>
/// Global max pooling operation for 1D temporal data.
/// Downsamples the input representation by taking the maximum value over the time dimension.
/// </summary>
/// <param name="data_format"> A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs.
/// channels_last corresponds to inputs with shape (batch, steps, features) while channels_first corresponds to inputs with shape (batch, features, steps).
/// </param>
/// <returns></returns>
public GlobalMaxPooling1D GlobalMaxPooling1D(string data_format = "channels_last")
=> new GlobalMaxPooling1D(new Pooling1DArgs { DataFormat = data_format });
/// <summary>
/// Global max pooling operation for spatial data.
/// </summary>
/// <param name="data_format">A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs.
/// channels_last corresponds to inputs with shape (batch, height, width, channels) while channels_first corresponds to inputs with shape (batch, channels, height, width).</param>
/// <returns></returns>
public GlobalMaxPooling2D GlobalMaxPooling2D(string data_format = "channels_last")
=> new GlobalMaxPooling2D(new Pooling2DArgs { DataFormat = data_format });
/// <summary>
/// Get an activation function layer from its name.
/// </summary>
/// <param name="name">The name of the activation function. One of linear, relu, sigmoid, and tanh.</param>