(inputs, filters, is_training, projection_shortcut,
                     dilation_rate, data_format)
return inputs + shortcut
Bottleneck block variant for residual networks with BN before convolutions.

  Args:
    inputs: A tensor of size [batch, channels, height_in, width_in] or
      [batch, height_in, width_in, channels] depending on data_format.
    filters: The number of filters for the first two convolutions. Note that the
      third and final convolution will use 4 times as many filters.
    is_training: A Boolean for whether the model is in training or inference
      mode. Needed for batch normalization.
    projection_shortcut: The function to use for projection shortcuts (typically
      a 1x1 convolution when downsampling the input).
    dilation_rate: The block's stride. If greater than 1, this block will ultimately
      downsample the input.
    data_format: The input format ('channels_last' or 'channels_first').

  Returns:
    The output tensor of the block.
Bottleneck block variant for residual networks with BN before convolutions.
Bottleneck block variant for residual networks with BN before convolutions .
def xdet_bottleneck_block(inputs, filters, is_training, projection_shortcut,
                     dilation_rate, data_format):
  """Bottleneck block variant for residual networks with BN before convolutions.

  Args:
    inputs: A tensor of size [batch, channels, height_in, width_in] or
      [batch, height_in, width_in, channels] depending on data_format.
    filters: The number of filters for the first two convolutions. Note that the
      third and final convolution will use 4 times as many filters.
    is_training: A Boolean for whether the model is in training or inference
      mode. Needed for batch normalization.
    projection_shortcut: The function to use for projection shortcuts (typically
      a 1x1 convolution when downsampling the input).
    dilation_rate: The block's stride. If greater than 1, this block will ultimately
      downsample the input.
    data_format: The input format ('channels_last' or 'channels_first').

  Returns:
    The output tensor of the block.
  """
  shortcut = inputs
  inputs = resnet_v2.batch_norm_relu(inputs, is_training, data_format)

  # The projection shortcut should come after the first batch norm and ReLU
  # since it performs a 1x1 convolution.
  if projection_shortcut is not None:
    shortcut = projection_shortcut(inputs)

  inputs = resnet_v2.conv2d_fixed_padding(
      inputs=inputs, filters=filters, kernel_size=1, strides=1,
      data_format=data_format, kernel_initializer=conv_bn_initializer_to_use)

  inputs = resnet_v2.batch_norm_relu(inputs, is_training, data_format)
  inputs = dilate_conv2d(
      inputs=inputs, filters=filters, kernel_size=3, dilation_rate=dilation_rate, data_format=data_format)

  inputs = resnet_v2.batch_norm_relu(inputs, is_training, data_format)
  # default activation is None
  inputs = resnet_v2.conv2d_fixed_padding(
      inputs=inputs, filters=4 * filters, kernel_size=1, strides=1,
      data_format=data_format, kernel_initializer=conv_bn_initializer_to_use)

  return inputs + shortcut
def xdet_bottleneck_block ( inputs , filters , is_training , projection_shortcut , dilation_rate , data_format ) : shortcut = inputs inputs = resnet_v2 . batch_norm_relu ( inputs , is_training , data_format ) # The projection shortcut should come after the first batch norm and ReLU # since it performs a 1x1 convolution. if projection_shortcut is not None : shortcut = projection_shortcut ( inputs ) inputs = resnet_v2 . conv2d_fixed_padding ( inputs = inputs , filters = filters , kernel_size = 1 , strides = 1 , data_format = data_format , kernel_initializer = conv_bn_initializer_to_use ) inputs = resnet_v2 . batch_norm_relu ( inputs , is_training , data_format ) inputs = dilate_conv2d ( inputs = inputs , filters = filters , kernel_size = 3 , dilation_rate = dilation_rate , data_format = data_format ) inputs = resnet_v2 . batch_norm_relu ( inputs , is_training , data_format ) # default activation is None inputs = resnet_v2 . conv2d_fixed_padding ( inputs = inputs , filters = 4 * filters , kernel_size = 1 , strides = 1 , data_format = data_format , kernel_initializer = conv_bn_initializer_to_use ) return inputs + shortcut