class_docstr: ResNet V1 block with optional bottleneck.
class_docstr_tok: ["ResNet","V1","block","with","optional","bottleneck","."]
code: def __call__(self, inputs, is_training, test_local_stats):
      out = shortcut = inputs
  
      if self.use_projection:
          shortcut = self.proj_conv(shortcut)
          shortcut = self.proj_batchnorm(
              shortcut, is_training, test_local_stats
          )
  
      for i, (conv_i, bn_i) in enumerate(self.layers):
          out = conv_i(out)
          out = bn_i(out, is_training, test_local_stats)
          if i < len(self.layers) - 1:  # Don't apply relu on last layer
              out = jax.nn.relu(out)
  
      return jax.nn.relu(out + shortcut)
  
imports: from collections.abc import Mapping, Sequence
  from typing import Any, Optional, Union
  from haiku._src import basic
  from haiku._src import batch_norm
  from haiku._src import conv
  from haiku._src import module
  from haiku._src import pool
  import jax
  import jax.numpy
label_desc: Use image node_id 2 for calling the BlockV1 obj's underlying member method code with example usage: obj.__call__(inputs, is_training, test_local_stats) and returns: jax