class_docstr: This class implements the cosine similarity on the top of features.
  
  Arguments
  ---------
  device : str
      Device used, e.g., "cpu" or "cuda".
  lin_blocks : int
      Number of linear layers.
  lin_neurons : int
      Number of neurons in linear layers.
  out_neurons : int
      Number of classes.
  
  Example
  -------
  >>> classify = Classifier(input_size=2, lin_neurons=2, out_neurons=2)
  >>> outputs = torch.tensor([ [1., -1.], [-9., 1.], [0.9, 0.1], [0.1, 0.9] ])
  >>> outputs = outputs.unsqueeze(1)
  >>> cos = classify(outputs)
  >>> (cos < -1.0).long().sum()
  tensor(0)
  >>> (cos > 1.0).long().sum()
  tensor(0)
code: def __init__(
      self,
      input_size,
      device="cpu",
      lin_blocks=0,
      lin_neurons=256,
      out_neurons=1211,
  ):
      super().__init__()
      self.blocks = nn.ModuleList()
  
      for block_index in range(lin_blocks):
          self.blocks.extend(
              [
                  _BatchNorm1d(input_size=input_size),
                  Linear(input_size=input_size, n_neurons=lin_neurons),
              ]
          )
          input_size = lin_neurons
  
      # Final Layer
      self.weight = nn.Parameter(
          torch.FloatTensor(out_neurons, input_size, device=device)
      )
      nn.init.xavier_uniform_(self.weight)
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from speechbrain.nnet.normalization import BatchNorm1d
  from speechbrain.nnet.linear import Linear
label_desc: Use image node_id 1 to create a new Classifier object from inherited base classes: torch.nn with example: obj = Classifier(input_size, device, lin_blocks, lin_neurons, out_neurons)