class_docstr: Higher level block for ResNet implementation.
class_docstr_tok: ["Higher","level","block","for","ResNet","implementation","."]
code: def __init__(
      self,
      channels: int,
      num_blocks: int,
      stride: Union[int, Sequence[int]],
      bn_config: Mapping[str, FloatStrOrBool],
      resnet_v2: bool,
      bottleneck: bool,
      use_projection: bool,
      name: Optional[str] = None,
  ):
      super().__init__(name=name)
  
      block_cls = BlockV2 if resnet_v2 else BlockV1
  
      self.blocks = []
      for i in range(num_blocks):
          self.blocks.append(
              block_cls(
                  channels=channels,
                  stride=(1 if i else stride),
                  use_projection=(i == 0 and use_projection),
                  bottleneck=bottleneck,
                  bn_config=bn_config,
                  name="block_%d" % (i),
              )
          )
  
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 1 to create a new BlockGroup object from inherited base classes: hk with example: obj = BlockGroup(channels, num_blocks, stride, bn_config, resnet_v2, bottleneck, use_projection, name)