class_docstr: ResNetTorso for visual inputs, inspired by the IMPALA paper.
class_docstr_tok: ["ResNetTorso","for","visual","inputs",",","inspired","by","the","IMPALA","paper","."]
code: def __init__(
      self,
      channels_per_group: Sequence[int] = (16, 32, 32),
      blocks_per_group: Sequence[int] = (2, 2, 2),
      downsampling_strategies: Sequence[DownsamplingStrategy] = (
          DownsamplingStrategy.CONV_MAX,
      )
      * 3,
      use_layer_norm: bool = False,
      name: str = "resnet_torso",
  ):
      super().__init__(name=name)
      self._channels_per_group = channels_per_group
      self._blocks_per_group = blocks_per_group
      self._downsampling_strategies = downsampling_strategies
      self._use_layer_norm = use_layer_norm
  
      if len(channels_per_group) != len(blocks_per_group) or len(
          channels_per_group
      ) != len(downsampling_strategies):
          raise ValueError(
              "Length of channels_per_group, blocks_per_group, and "
              "downsampling_strategies must be equal. "
              f"Got channels_per_group={channels_per_group}, "
              f"blocks_per_group={blocks_per_group}, and"
              f"downsampling_strategies={downsampling_strategies}."
          )
  
file_path: acme/acme/jax/networks/resnet.py
imports: import enum
  import functools
  from typing import Callable, Sequence, Union
  import haiku
  import jax
  import jax.numpy
label_desc: Use image node_id 1 to create a new ResNetTorso object from inherited base classes: hk with example: obj = ResNetTorso(channels_per_group, blocks_per_group, downsampling_strategies, use_layer_norm, name)