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 __init__(self, cfg, task, model):
      super().__init__()
      self.cfg = cfg
      self.task = task
      self.model = model
  
      self.bpe = encoders.build_bpe(cfg.bpe)
  
      # this is useful for determining the device
      self.register_buffer(
          "_float_tensor", torch.tensor([0], dtype=torch.float)
      )
  
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 1 to create a new RobertaHubInterface object from inherited base classes: nn with example: obj = RobertaHubInterface(cfg, task, model)