class_docstr: Base `encoder` class. Every new `encoder` model must inherit this.
  
  It defines common `encoder` specific functions.
class_docstr_tok: ["Base","`","encoder","`","class",".","Every","new","`","encoder","`","model","must","inherit","this",".","It","defines","common","`","encoder","`","specific","functions","."]
code: def get_criterion(self, c: Coqpit, num_classes=None):
      if c.loss == "ge2e":
          criterion = GE2ELoss(loss_method="softmax")
      elif c.loss == "angleproto":
          criterion = AngleProtoLoss()
      elif c.loss == "softmaxproto":
          criterion = SoftmaxAngleProtoLoss(
              c.model_params["proj_dim"], num_classes
          )
      else:
          raise Exception("The %s  not is a loss supported" % c.loss)
      return criterion
  
file_path: TTS/TTS/encoder/models/base_encoder.py
imports: import numpy
  import torch
  import torchaudio
  from coqpit import Coqpit
  from torch import nn
  from TTS.encoder.losses import AngleProtoLoss, GE2ELoss, SoftmaxAngleProtoLoss
  from TTS.utils.generic_utils import set_init_dict
  from TTS.utils.io import load_fsspec
label_desc: Use image node_id 5 for calling the BaseEncoder obj's underlying member method code with example usage: obj.get_criterion(c, num_classes) and returns: criterion