class_docstr: A speaker model with simple 2D conv layers. 
class_docstr_tok: ["A","speaker","model","with","simple","2D","conv","layers","."]
docstr: 2D conv layers. 
docstr_tok: ["2D","conv","layers","."]
code: def conv_block(self, inputs, depthwise=False):
      """2D conv layers."""
      filters = self.netconf["filters"]
      logging.info("filters : {}".format(filters))
      filters_size = self.netconf["filter_size"]
      logging.info("filters_size : {}".format(filters_size))
      filters_strides = self.netconf["filter_stride"]
      logging.info("filters_strides : {}".format(filters_strides))
      pools_size = self.netconf["pool_size"]
      logging.info("pools_size : {}".format(pools_size))
  
      layer_num = len(filters)
      assert layer_num == len(filters_size)
      assert layer_num == len(filters_strides)
      assert layer_num == len(pools_size)
  
      channels = [self.input_channels] + filters
      logging.info("channels : {}".format(channels))
  
      downsample_input_len = self.input_len
      with tf.variable_scope("cnn"):
          x = tf.identity(inputs)
          for index, filt in enumerate(filters):
              unit_name = "unit-" + str(index + 1)
              with tf.variable_scope(unit_name):
                  if depthwise:
                      x = tf.layers.separable_conv2d(
                          x,
                          filters=filt,
                          kernel_size=filters_size[index],
                          strides=filters_strides[index],
                          padding="same",
                          name=unit_name,
                      )
                  else:
                      cnn_name = "cnn-" + str(index + 1)
                      x = common_layers.conv2d(
                          x,
                          cnn_name,
                          filters_size[index],
                          channels[index],
                          channels[index + 1],
                          filters_strides[index],
                      )
                  x = tf.nn.relu(x)
                  if self.netconf["use_bn"]:
                      bn_name = "bn" + str(index + 1)
                      x = tf.layers.batch_normalization(
                          x,
                          axis=-1,
                          momentum=0.9,
                          training=self.train,
                          name=bn_name,
                      )
                  if self.netconf["use_dropout"]:
                      x = tf.layers.dropout(
                          x,
                          self.netconf["dropout_rate"],
                          training=self.train,
                      )
                  x = common_layers.max_pool(
                      x, pools_size[index], pools_size[index]
                  )
                  downsample_input_len = (
                      downsample_input_len / pools_size[index][0]
                  )
  
      return x, downsample_input_len
  
imports: import math
  from absl import logging
  import delta.compat
  import tensorflow.keras.layers
  from delta import utils
  from delta.layers import common_layers
  from delta.models.base_model import RawModel
  from delta.utils.register import registers
  from delta.utils.loss.loss_utils import arcface_loss
  from delta.utils.hparam import HParams
label_desc: Use image node_id 2 for calling the SpeakerCRNNRawModel obj's underlying member method code with example usage: obj.conv_block(inputs, depthwise) and returns: x,  downsample_input_len