class_docstr: A speaker model with ResNet layers. 
class_docstr_tok: ["A","speaker","model","with","ResNet","layers","."]
code: def resnet_layer(
      self, x, in_channel, out_channel, stride, dim_match, block_name
  ):
      conv_name_base = "res" + block_name + "_branch"
      bn_name_base = "bn" + block_name + "_branch"
      prelu_name_base = "prelu" + block_name + "_branch"
  
      short_cut = x
      if not dim_match:
          short_cut = common_layers.conv2d(
              short_cut,
              conv_name_base + "1",
              filter_size=(1, 1),
              in_channels=in_channel,
              out_channels=out_channel,
              strides=stride,
              bias=False,
          )
          short_cut = tf.layers.batch_normalization(
              short_cut,
              axis=-1,
              momentum=0.9,
              training=self.train,
              name=bn_name_base + "1",
          )
  
      x = tf.layers.batch_normalization(
          x,
          axis=-1,
          momentum=0.9,
          training=self.train,
          name=bn_name_base + "2a",
      )
      x = common_layers.conv2d(
          x,
          conv_name_base + "2a",
          (3, 3),
          in_channel,
          out_channel,
          [1, 1],
          bias=False,
      )
      x = tf.layers.batch_normalization(
          x,
          axis=-1,
          momentum=0.9,
          training=self.train,
          name=bn_name_base + "2b",
      )
      x = self.prelu_layer(x, name=prelu_name_base + "2b")
      x = common_layers.conv2d(
          x,
          conv_name_base + "2b",
          (3, 3),
          out_channel,
          out_channel,
          stride,
          bias=False,
      )
      res = tf.layers.batch_normalization(
          x,
          axis=-1,
          momentum=0.9,
          training=self.train,
          name=bn_name_base + "2c",
      )
  
      return tf.add(short_cut, res, name="add_" + block_name)
  
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 6 for calling the SpeakerResNetRawModel obj's underlying member method code with example usage: obj.resnet_layer(x, in_channel, out_channel, stride, dim_match, block_name) and returns: tf