class_docstr: AnyNet stage (sequence of blocks w/ the same output shape).
class_docstr_tok: ["AnyNet","stage","(","sequence","of","blocks","w\/","the","same","output","shape",")","."]
code: def __init__(
      self,
      w_in,
      w_out,
      stride,
      d,
      block_class,
      norm,
      activation_class,
      params,
  ):
      super().__init__()
      for i in range(d):
          block = block_class(
              w_in, w_out, stride, norm, activation_class, params
          )
          self.add_module("b{}".format(i + 1), block)
          stride, w_in = 1, w_out
  
imports: import numpy
  from torch import nn
  from detectron2.layers import CNNBlockBase, ShapeSpec, get_norm
  from .backbone import Backbone
label_desc: Use image node_id 1 to create a new AnyStage object from inherited base classes: nn with example: obj = AnyStage(w_in, w_out, stride, d, block_class, norm, activation_class, params)