class_docstr: A simple PyTorch Hub interface to RoBERTa.
  
  Usage: https://github.com/pytorch/fairseq/tree/main/examples/roberta
class_docstr_tok: ["A","simple","PyTorch","Hub","interface","to","RoBERTa",".","Usage",":","https",":","\/\/github.com\/pytorch\/fairseq\/tree\/main\/examples\/roberta"]
code: def predict(
      self,
      head: str,
      tokens: torch.LongTensor,
      return_logits: bool = False,
  ):
      features = self.extract_features(tokens.to(device=self.device))
      logits = self.model.classification_heads[head](features)
      if return_logits:
          return logits
      return F.log_softmax(logits, dim=-1)
  
file_path: fairseq/fairseq/models/roberta/hub_interface.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.data import encoders
label_desc: Use image node_id 7 for calling the RobertaHubInterface obj's underlying member method code with example usage: obj.predict(head, tokens, return_logits) and returns: F, logits