class_docstr: Linear head of ACAR-Net
  
  Args:
      width (`int`):
          Input dimension of linear layer.
      roi_spatial (`int`):
          Portion to filter in spatial dimension.
      num_classes (`int`):
          Number of classes.
      dropout (`float`):
          Dropout ratio.
      bias (`bool`):
          Flag to control if use bias.
class_docstr_tok: ["Linear","head","of","ACAR-Net","Args",":","width","(","`","int","`",")",":","Input","dimension","of","linear","layer",".","roi_spatial","(","`","int","`",")",":","Portion","to","filter","in","spatial","dimension",".","num_classes","(","`","int","`",")",":","Number","of","classes",".","dropout","(","`","float","`",")",":","Dropout","ratio",".","bias","(","`","bool","`",")",":","Flag","to","control","if","use","bias","."]
code: def __init__(
      self,
      width,
      roi_spatial=7,
      num_classes=60,
      dropout=0.0,
      bias=False,
  ):
      super().__init__()
  
      self.roi_spatial = roi_spatial
      self.roi_maxpool = nn.MaxPool2d(roi_spatial)
  
      self.fc = nn.Linear(width, num_classes, bias=bias)
  
      if dropout > 0:
          self.dp = nn.Dropout(dropout)
      else:
          self.dp = None
  
file_path: towhee/towhee/models/acar_net/head.py
imports: import math
  import torch
  from torch import nn
  import torchvision
label_desc: Use image node_id 1 to create a new LinearHead object from inherited base classes: nn with example: obj = LinearHead(width, roi_spatial, num_classes, dropout, bias)