class_docstr: The FSNER model implements a few-shot named entity recognition method from the paper `Example-Based Named Entity Recognition <https://arxiv.org/abs/2008.10570>`__ by
  Morteza Ziyadi, Yuting Sun, Abhishek Goswami, Jade Huang, Weizhu Chen. To identify entity spans in a new domain, it
  uses a train-free few-shot learning approach inspired by question-answering.
code: def __init__(
      self,
      pretrained_model_name_or_path="sayef/fsner-bert-base-uncased",
  ):
      super(FSNERModel, self).__init__()
  
      self.bert = AutoModel.from_pretrained(
          pretrained_model_name_or_path, return_dict=True
      )
      self.cos = torch.nn.CosineSimilarity(3, 1e-08)
      self.softmax = torch.nn.Softmax(dim=1)
  
file_path: transformers/examples/research_projects/fsner/src/fsner/model.py
imports: import torch
  from transformers import AutoModel
label_desc: Use image node_id 1 to create a new FSNERModel object from inherited base classes: torch.nn with example: obj = FSNERModel(pretrained_model_name_or_path)