class_docstr: Hourglass-like network.
  
  Similar to https://arxiv.org/pdf/2104.00613.pdf, but based on the BiT ResNet
  instead of the standard ResNet.
  
  Attributes:
    num_classes: Number of output channels for final projection. If set to zero,
      no final projection will be done.
    width: Width multiplier for the ResNet.
    depth: Sequence of ints specifying depth of each stage, or int specifying
      one of the standard ResNet depths.
class_docstr_tok: ["Hourglass-like","network",".","Similar","to","https",":","\/\/arxiv.org\/pdf\/2104.00613.pdf",",","but","based","on","the","BiT","ResNet","instead","of","the","standard","ResNet",".","Attributes",":","num_classes",":","Number","of","output","channels","for","final","projection",".","If","set","to","zero",",","no","final","projection","will","be","done",".","width",":","Width","multiplier","for","the","ResNet",".","depth",":","Sequence","of","ints","specifying","depth","of","each","stage",",","or","int","specifying","one","of","the","standard","ResNet","depths","."]
code: def __call__(self, inputs, *, train=False):
      del train  # Unused
      blocks = list(bit.get_block_desc(self.depth))
      resnet_stage = functools.partial(
          bit.ResNetStage, first_stride=(1, 1)
      )
  
      # Encoder:
      _, outs = ResNet(
          num_classes=0,
          width=self.width,
          depth=blocks,
          root_block=False,
          name="encoder",
      )(inputs)
      encoded = [v for k, v in outs.items() if k.startswith("stage")]
  
      # Bottleneck:
      activation = resnet_stage(blocks.pop(), name="bottleneck_block")(
          encoded.pop()
      )
      bottleneck_width = activation.shape[-1]
  
      # Decoder:
      for skip, block_size in reversed(list(zip(encoded, blocks))):
          b, h, w, c = skip.shape
          i = bottleneck_width // c
          activation = resnet_stage(
              block_size, nmid=c // 4, name=f"decoder_block{i}"
          )(activation)
          activation = jax.image.resize(
              activation,
              (b, h, w, activation.shape[-1]),
              method="bilinear",
          )
          activation = activation + skip
          outs[f"decoder_stage{i}"] = activation
      outs["pre_logits"] = activation
  
      # Head:
      if self.num_classes:
          main_out = nn.Dense(
              self.num_classes,
              name="head",
              kernel_init=nn.initializers.zeros,
          )(activation)
      else:
          main_out = outs["pre_logits"]
  
      return main_out, outs
  
imports: import abc
  import functools
  from typing import Any, Callable, Dict, Optional, Tuple, Union, Sequence
  from absl import logging
  from big_vision.models import bit
  from big_vision.models import vit
  import flax
  import flax.linen
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.base_models import box_utils
  from scenic.projects.owl_vit import utils
  from scenic.projects.owl_vit.clip import layers
  from scenic.projects.owl_vit.clip import model
label_desc: Use image node_id 1 for calling the HourglassNetwork obj's underlying member method code with example usage: obj.__call__(inputs) and returns: main_out,  outs