class_docstr: Block that aggregates Convolution + Norm layer + ReLU.
  
  Attributes:
    kernel_size: Integer, convolution kernel size.
    out_dim: Integer, number of filter in the convolution.
    norm_type: Object type of the norm to use.
    stride: Integer, stride used in the convolution.
    input_shape: Tuple with the input shape i.e. (None, 512, 512, 3).
    padding: String, padding type used in the convolution.
    relu: Boolean, use relu at the end.
    name: String, name of the block.
class_docstr_tok: ["Block","that","aggregates","Convolution","+","Norm","layer","+","ReLU",".","Attributes",":","kernel_size",":","Integer",",","convolution","kernel","size",".","out_dim",":","Integer",",","number","of","filter","in","the","convolution",".","norm_type",":","Object","type","of","the","norm","to","use",".","stride",":","Integer",",","stride","used","in","the","convolution",".","input_shape",":","Tuple","with","the","input","shape","i.e",".","(","None",",","512",",","512",",","3",")",".","padding",":","String",",","padding","type","used","in","the","convolution",".","relu",":","Boolean",",","use","relu","at","the","end",".","name",":","String",",","name","of","the","block","."]
code: def __init__(
      self,
      kernel_size,
      out_dim,
      norm_type,
      kernel_regularizer,
      stride=1,
      input_shape=None,
      padding="same",
      relu=True,
      name="ConvolutionalBlock",
  ):
      super(ConvolutionalBlock, self).__init__(name=name)
      if kernel_size > 1:
          # Padding corresponding to kernel and stride (kernel, stride): pad
          pad_vals = {7: (3, 3), 3: (1, 1)}
          padding = "valid"
          self.pad = tf.keras.layers.ZeroPadding2D(
              pad_vals[kernel_size]
          )
      else:
          self.pad = IdentityLayer(name="identity")
      if input_shape is not None:
          self.conv = tf.keras.layers.Conv2D(
              out_dim,
              kernel_size,
              kernel_regularizer=kernel_regularizer(),
              use_bias=False,
              strides=stride,
              padding=padding,
              input_shape=input_shape,
              name="conv",
          )
      else:
          self.conv = tf.keras.layers.Conv2D(
              out_dim,
              kernel_size,
              kernel_regularizer=kernel_regularizer(),
              use_bias=False,
              strides=stride,
              padding=padding,
              name="conv",
          )
      self.norm = norm_type()
      if relu:
          self.relu = tf.keras.layers.ReLU(name="relu")
      else:
          self.relu = IdentityLayer(name="identity")
  
file_path: graphics/tensorflow_graphics/projects/points_to_3Dobjects/networks/custom_blocks.py
imports: import tensorflow
label_desc: Use image node_id 1 to create a new ConvolutionalBlock object from inherited base classes: tf.keras.layers with example: obj = ConvolutionalBlock(kernel_size, out_dim, norm_type, kernel_regularizer, stride, input_shape, padding, relu, name)