class_docstr: AnyNet head: optional conv, AvgPool, 1x1.
class_docstr_tok: ["AnyNet","head",":","optional","conv",",","AvgPool",",","1x1","."]
code: def __init__(self, w_in, head_width, num_classes):
      super(AnyHead, self).__init__()
      self.head_width = head_width
      if head_width > 0:
          self.conv = conv2d(w_in, head_width, 1)
          self.bn = norm2d(head_width)
          self.af = activation()
          w_in = head_width
      self.avg_pool = gap2d(w_in)
      self.fc = linear(w_in, num_classes, bias=True)
  
imports: from pycls.core.config import cfg
  from pycls.models.blocks import activation, conv2d, conv2d_cx, gap2d, gap2d_cx, init_weights, linear, linear_cx, norm2d, norm2d_cx, pool2d, pool2d_cx, SE
  from torch.nn import Module
label_desc: Use image node_id 1 to create a new AnyHead object from inherited base classes: Module with example: obj = AnyHead(w_in, head_width, num_classes)