class_docstr: Bottleneck Block for a ResNet implementation.
class_docstr_tok: ["Bottleneck","Block","for","a","ResNet","implementation","."]
code: def __call__(self, inputs, is_training):
      if self._use_projection:
          shortcut = self._proj_conv(inputs)
          shortcut = self._proj_batchnorm(
              shortcut, is_training=is_training
          )
      else:
          shortcut = inputs
  
      net = inputs
      for i, [conv_layer, batchnorm_layer] in enumerate(self._layers):
          net = conv_layer(net)
          net = batchnorm_layer(net, is_training=is_training)
          net = (
              tf.nn.relu(net) if i < 2 else net
          )  # Don't apply relu on last layer
  
      return tf.nn.relu(net + shortcut)
  
imports: from typing import Mapping, Optional, Sequence, Union
  from sonnet.src import base
  from sonnet.src import batch_norm
  from sonnet.src import conv
  from sonnet.src import initializers
  from sonnet.src import linear
  from sonnet.src import pad
  import tensorflow
label_desc: Use image node_id 2 for calling the BottleNeckBlockV1 obj's underlying member method code with example usage: obj.__call__(inputs, is_training) and returns: tf