class_docstr: A standard Linear classification module that can be attached to several
  layers of the model to evaluate the representation quality of features.
  
   The layers attached are:
      BatchNorm2d -> Linear (1 or more)
  
  Accepts a 4D input tensor. If you want to use 2D input tensor instead,
  use the "mlp" head directly.
class_docstr_tok: ["A","standard","Linear","classification","module","that","can","be","attached","to","several","layers","of","the","model","to","evaluate","the","representation","quality","of","features",".","The","layers","attached","are",":","BatchNorm2d","-",">","Linear","(","1","or","more",")","Accepts","a","4D","input","tensor",".","If","you","want","to","use","2D","input","tensor","instead",",","use","the","``","mlp","''","head","directly","."]
docstr: Args:
      model_config (AttrDict): dictionary config.MODEL in the config file
      in_channels (int): number of channels the input has. This information is
                         used to attached the BatchNorm2D layer.
      dims (int): dimensions of the linear layer. Example [8192, 1000] which means
                  attaches `nn.Linear(8192, 1000, bias=True)`
docstr_tok: ["Args",":","model_config","(","AttrDict",")",":","dictionary","config.MODEL","in","the","config","file","in_channels","(","int",")",":","number","of","channels","the","input","has",".","This","information","is","used","to","attached","the","BatchNorm2D","layer",".","dims","(","int",")",":","dimensions","of","the","linear","layer",".","Example","[","8192",",","1000","]","which","means","attaches","`","nn.Linear","(","8192",",","1000",",","bias=True",")","`"]
code: def __init__(
      self,
      model_config: AttrDict,
      in_channels: int,
      dims: List[int],
      use_bn: bool = False,
      use_relu: bool = False,
      use_residual: bool = False,
  ):
      """
      Args:
          model_config (AttrDict): dictionary config.MODEL in the config file
          in_channels (int): number of channels the input has. This information is
                             used to attached the BatchNorm2D layer.
          dims (int): dimensions of the linear layer. Example [8192, 1000] which means
                      attaches `nn.Linear(8192, 1000, bias=True)`
      """
  
      super().__init__()
      self.channel_bn = nn.BatchNorm2d(
          in_channels,
          eps=model_config.HEAD.BATCHNORM_EPS,
          momentum=model_config.HEAD.BATCHNORM_MOMENTUM,
      )
      if use_residual:
          self.clf = MLPResidual(
              model_config, dims, use_bn=use_bn, use_relu=use_relu
          )
      else:
          self.clf = MLP(
              model_config, dims, use_bn=use_bn, use_relu=use_relu
          )
  
file_path: vissl/vissl/models/heads/linear_eval_mlp.py
imports: from typing import List
  import torch
  import torch.nn
  from vissl.config import AttrDict
  from vissl.models.heads import register_model_head
  from vissl.models.heads.mlp import MLP
  from vissl.models.heads.mlp_res import MLPResidual
  from vissl.utils.fsdp_utils import fsdp_auto_wrap_bn, fsdp_wrapper
label_desc: Use image node_id 1 to create a new LinearEvalMLP object from inherited base classes: nn with example: obj = LinearEvalMLP(model_config, in_channels, dims, use_bn, use_relu, use_residual)