class_docstr: A speaker model with ResNet layers. 
class_docstr_tok: ["A","speaker","model","with","ResNet","layers","."]
code: def resnet_block(
      self, x, block_mode, layer_num, in_channel, out_channel, stride
  ):
      if block_mode == "ir":
          block = self.resnet_layer
      elif block_mode == "ir_se":
          block = self.se_resnet_layer
  
      x = block(
          x,
          in_channel,
          out_channel,
          stride,
          dim_match=False,
          block_name="a",
      )
      for i in range(1, layer_num):
          x = block(
              x,
              out_channel,
              out_channel,
              [1, 1],
              dim_match=True,
              block_name=chr(ord("a") + i),
          )
  
      return x
  
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 8 for calling the SpeakerResNetRawModel obj's underlying member method code with example usage: obj.resnet_block(x, block_mode, layer_num, in_channel, out_channel, stride) and returns: x