class_docstr: Softmax classifier for sentence-level relation extraction.
code: def infer(self, item):
      self.eval()
      _item = self.sentence_encoder.tokenize(item)
      item = []
      for x in _item:
          item.append(x.to(next(self.parameters()).device))
      logits = self.forward(*item)
      logits = self.softmax(logits)
      score, pred = logits.max(-1)
      score = score.item()
      pred = pred.item()
      return self.id2rel[pred], score
  
file_path: OpenNRE/opennre/model/softmax_nn.py
imports: import torch
  from torch import nn, optim
  from .base_model import SentenceRE
label_desc: Use image node_id 2 for calling the SoftmaxNN obj's underlying member method code with example usage: obj.infer(item) and returns: self,  score