class_docstr: Abstract N-D convolution layer (private, used as implementation base).
  
  This layer creates a convolution kernel that is convolved (actually
  cross-correlated) with the layer input to produce a tensor of outputs. If
  `use_bias` is True (and a `bias_initializer` is provided), a bias vector is
  created and added to the outputs. Finally, if `activation` is not `None`, it
  is applied to the outputs as well.
  
  Note: layer attributes cannot be modified after the layer has been called
  once (except the `trainable` attribute).
  
  Args:
      rank: int, the rank of the convolution, e.g. 2 for 2D convolution.
      filters: int, the dimension of the output space (the number of filters
          in the convolution).
      kernel_size: int or tuple/list of `rank` integers, specifying the size
          of the convolution window.
      strides: int or tuple/list of `rank` integers, specifying the stride
          length of the convolution. If only one int is specified, the same
          stride size will be used for all dimensions. `strides > 1` is
          incompatible with `dilation_rate > 1`.
      padding: string, either `"valid"` or `"same"` (case-insensitive).
          `"valid"` means no padding. `"same"` results in padding evenly to
          the left/right or up/down of the input. When `padding="same"` and
          `strides=1`, the output has the same size as the input.
      data_format: string, either `"channels_last"` 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)`. 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"`.
      dilation_rate: int or tuple/list of `rank` integers, specifying the
          dilation rate to use for dilated convolution. If only one int is
          specified, the same dilation rate will be used for all dimensions.
      groups: A positive int 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`.
      activation: Activation function. If `None`, no activation is applied.
      use_bias: bool, if `True`, bias will be added to the output.
      kernel_initializer: Initializer for the convolution kernel. If `None`,
          the default initializer (`"glorot_uniform"`) will be used.
      bias_initializer: Initializer for the bias vector. If `None`, the
          default initializer (`"zeros"`) will be used.
      kernel_regularizer: Optional regularizer for the convolution kernel.
      bias_regularizer: Optional regularizer for the bias vector.
      activity_regularizer: Optional regularizer function for the output.
      kernel_constraint: Optional projection function to be applied to the
          kernel after being updated by an `Optimizer` (e.g. used to implement
          norm constraints or value constraints for layer weights). The
          function must take as input the unprojected variable and must return
          the projected variable (which must have the same shape). Constraints
          are not safe to use when doing asynchronous distributed training.
      bias_constraint: Optional projection function to be applied to the
          bias after being updated by an `Optimizer`.
class_docstr_tok: ["Abstract","N-D","convolution","layer","(","private",",","used","as","implementation","base",")",".","This","layer","creates","a","convolution","kernel","that","is","convolved","(","actually","cross-correlated",")","with","the","layer","input","to","produce","a","tensor","of","outputs",".","If","`","use_bias","`","is","True","(","and","a","`","bias_initializer","`","is","provided",")",",","a","bias","vector","is","created","and","added","to","the","outputs",".","Finally",",","if","`","activation","`","is","not","`","None","`",",","it","is","applied","to","the","outputs","as","well",".","Note",":","layer","attributes","can","not","be","modified","after","the","layer","has","been","called","once","(","except","the","`","trainable","`","attribute",")",".","Args",":","rank",":","int",",","the","rank","of","the","convolution",",","e.g",".","2","for","2D","convolution",".","filters",":","int",",","the","dimension","of","the","output","space","(","the","number","of","filters","in","the","convolution",")",".","kernel_size",":","int","or","tuple\/list","of","`","rank","`","integers",",","specifying","the","size","of","the","convolution","window",".","strides",":","int","or","tuple\/list","of","`","rank","`","integers",",","specifying","the","stride","length","of","the","convolution",".","If","only","one","int","is","specified",",","the","same","stride","size","will","be","used","for","all","dimensions",".","`","strides",">","1","`","is","incompatible","with","`","dilation_rate",">","1","`",".","padding",":","string",",","either","`","``","valid","''","`","or","`","``","same","''","`","(","case-insensitive",")",".","`","``","valid","''","`","means","no","padding",".","`","``","same","''","`","results","in","padding","evenly","to","the","left\/right","or","up\/down","of","the","input",".","When","`","padding=","''","same","''","`","and","`","strides=1","`",",","the","output","has","the","same","size","as","the","input",".","data_format",":","string",",","either","`","``","channels_last","''","`","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",")","`",".","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","''","`",".","dilation_rate",":","int","or","tuple\/list","of","`","rank","`","integers",",","specifying","the","dilation","rate","to","use","for","dilated","convolution",".","If","only","one","int","is","specified",",","the","same","dilation","rate","will","be","used","for","all","dimensions",".","groups",":","A","positive","int","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","`",".","activation",":","Activation","function",".","If","`","None","`",",","no","activation","is","applied",".","use_bias",":","bool",",","if","`","True","`",",","bias","will","be","added","to","the","output",".","kernel_initializer",":","Initializer","for","the","convolution","kernel",".","If","`","None","`",",","the","default","initializer","(","`","``","glorot_uniform","''","`",")","will","be","used",".","bias_initializer",":","Initializer","for","the","bias","vector",".","If","`","None","`",",","the","default","initializer","(","`","``","zeros","''","`",")","will","be","used",".","kernel_regularizer",":","Optional","regularizer","for","the","convolution","kernel",".","bias_regularizer",":","Optional","regularizer","for","the","bias","vector",".","activity_regularizer",":","Optional","regularizer","function","for","the","output",".","kernel_constraint",":","Optional","projection","function","to","be","applied","to","the","kernel","after","being","updated","by","an","`","Optimizer","`","(","e.g",".","used","to","implement","norm","constraints","or","value","constraints","for","layer","weights",")",".","The","function","must","take","as","input","the","unprojected","variable","and","must","return","the","projected","variable","(","which","must","have","the","same","shape",")",".","Constraints","are","not","safe","to","use","when","doing","asynchronous","distributed","training",".","bias_constraint",":","Optional","projection","function","to","be","applied","to","the","bias","after","being","updated","by","an","`","Optimizer","`","."]
code: def build(self, input_shape):
      if self.data_format == "channels_last":
          channel_axis = -1
          input_channel = input_shape[-1]
      else:
          channel_axis = 1
          input_channel = input_shape[1]
      self.input_spec = InputSpec(
          min_ndim=self.rank + 2, axes={channel_axis: input_channel}
      )
      if input_channel % self.groups != 0:
          raise ValueError(
              "The number of input channels must be evenly divisible by "
              f"the number of groups. Received groups={self.groups}, but the "
              f"input has {input_channel} channels (full input shape is "
              f"{input_shape})."
          )
      kernel_shape = self.kernel_size + (
          input_channel // self.groups,
          self.filters,
      )
  
      # compute_output_shape contains some validation logic for the input
      # shape, and make sure the output shape has all positive dimensions.
      self.compute_output_shape(input_shape)
  
      self.kernel = self.add_weight(
          name="kernel",
          shape=kernel_shape,
          initializer=self.kernel_initializer,
          regularizer=self.kernel_regularizer,
          constraint=self.kernel_constraint,
          trainable=True,
          dtype=self.dtype,
      )
      if self.use_bias:
          self.bias = self.add_weight(
              name="bias",
              shape=(self.filters,),
              initializer=self.bias_initializer,
              regularizer=self.bias_regularizer,
              constraint=self.bias_constraint,
              trainable=True,
              dtype=self.dtype,
          )
      else:
          self.bias = None
      self.built = True
  
file_path: keras/keras/layers/convolutional/base_conv.py
imports: from keras import activations
  from keras import constraints
  from keras import initializers
  from keras import ops
  from keras import regularizers
  from keras.backend import standardize_data_format
  from keras.layers.input_spec import InputSpec
  from keras.layers.layer import Layer
  from keras.ops.operation_utils import compute_conv_output_shape
  from keras.utils.argument_validation import standardize_padding
  from keras.utils.argument_validation import standardize_tuple
label_desc: Use image node_id 2 for calling the BaseConv obj's underlying member method code with example usage: obj.build(input_shape) without return types