class_docstr:     **labels**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size,)``:
          Labels for computing the sequence classification/regression loss.
          Indices should be in ``[0, ..., config.num_labels]``.
          If ``config.num_labels == 1`` a regression loss is computed (Mean-Square loss),
          If ``config.num_labels > 1`` a classification loss is computed (Cross-Entropy).
  Outputs: `Tuple` comprising various elements depending on the configuration (config) and inputs:
      **loss**: (`optional`, returned when ``labels`` is provided) ``torch.FloatTensor`` of shape ``(1,)``:
          Classification (or regression if config.num_labels==1) loss.
      **logits**: ``torch.FloatTensor`` of shape ``(batch_size, config.num_labels)``
          Classification (or regression if config.num_labels==1) scores (before SoftMax).
      **hidden_states**: (`optional`, returned when ``config.output_hidden_states=True``)
          list of ``torch.FloatTensor`` (one for the output of each layer + the output of the embeddings)
          of shape ``(batch_size, sequence_length, hidden_size)``:
          Hidden-states of the model at the output of each layer plus the initial embedding outputs.
      **attentions**: (`optional`, returned when ``config.output_attentions=True``)
          list of ``torch.FloatTensor`` (one for each layer) of shape ``(batch_size, num_heads, sequence_length, sequence_length)``:
          Attentions weights after the attention softmax, used to compute the weighted average in the self-attention heads.
  Examples::
      tokenizer = RoertaTokenizer.from_pretrained('roberta-base')
      model = RobertaForSequenceClassification.from_pretrained('roberta-base')
      input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute")).unsqueeze(0)  # Batch size 1
      labels = torch.tensor([1]).unsqueeze(0)  # Batch size 1
      outputs = model(input_ids, labels=labels)
      loss, logits = outputs[:2]
class_docstr_tok: ["*","*","labels","*","*",":","(","`","optional","`",")","``","torch.LongTensor","``","of","shape","``","(","batch_size",",",")","``",":","Labels","for","computing","the","sequence","classification\/regression","loss",".","Indices","should","be","in","``","[","0",",","...",",","config.num_labels","]","``",".","If","``","config.num_labels","==","1","``","a","regression","loss","is","computed","(","Mean-Square","loss",")",",","If","``","config.num_labels",">","1","``","a","classification","loss","is","computed","(","Cross-Entropy",")",".","Outputs",":","`","Tuple","`","comprising","various","elements","depending","on","the","configuration","(","config",")","and","inputs",":","*","*","loss","*","*",":","(","`","optional","`",",","returned","when","``","labels","``","is","provided",")","``","torch.FloatTensor","``","of","shape","``","(","1",",",")","``",":","Classification","(","or","regression","if","config.num_labels==1",")","loss",".","*","*","logits","*","*",":","``","torch.FloatTensor","``","of","shape","``","(","batch_size",",","config.num_labels",")","``","Classification","(","or","regression","if","config.num_labels==1",")","scores","(","before","SoftMax",")",".","*","*","hidden_states","*","*",":","(","`","optional","`",",","returned","when","``","config.output_hidden_states=True","``",")","list","of","``","torch.FloatTensor","``","(","one","for","the","output","of","each","layer","+","the","output","of","the","embeddings",")","of","shape","``","(","batch_size",",","sequence_length",",","hidden_size",")","``",":","Hidden-states","of","the","model","at","the","output","of","each","layer","plus","the","initial","embedding","outputs",".","*","*","attentions","*","*",":","(","`","optional","`",",","returned","when","``","config.output_attentions=True","``",")","list","of","``","torch.FloatTensor","``","(","one","for","each","layer",")","of","shape","``","(","batch_size",",","num_heads",",","sequence_length",",","sequence_length",")","``",":","Attentions","weights","after","the","attention","softmax",",","used","to","compute","the","weighted","average","in","the","self-attention","heads",".","Examples",":",":","tokenizer","=","RoertaTokenizer.from_pretrained","(","'roberta-base","'",")","model","=","RobertaForSequenceClassification.from_pretrained","(","'roberta-base","'",")","input_ids","=","torch.tensor","(","tokenizer.encode","(","``","Hello",",","my","dog","is","cute","''",")",")",".unsqueeze","(","0",")","#","Batch","size","1","labels","=","torch.tensor","(","[","1","]",")",".unsqueeze","(","0",")","#","Batch","size","1","outputs","=","model","(","input_ids",",","labels=labels",")","loss",",","logits","=","outputs","[",":2","]"]
code: def forward(
      self,
      input_ids,
      token_type_ids=None,
      attention_mask=None,
      labels=None,
      position_ids=None,
      head_mask=None,
  ):
      outputs = self.roberta(
          input_ids,
          position_ids=position_ids,
          token_type_ids=token_type_ids,
          attention_mask=attention_mask,
          head_mask=head_mask,
      )
      sequence_output = outputs[0]
      logits = self.classifier(sequence_output)
  
      outputs = (logits,) + outputs[2:]
  
      if labels is not None:
          loss_fct = BCEWithLogitsLoss(
              weight=self.weight, pos_weight=self.pos_weight
          )
  
          loss = loss_fct(
              logits.view(-1, self.num_labels),
              labels.view(-1, self.num_labels),
          )
          outputs = (loss,) + outputs
  
      return outputs
  
imports: from transformers import BertForSequenceClassification, BertModel, BertConfig, XLNetForSequenceClassification, RobertaModel, RobertaConfig, BertPreTrainedModel, RobertaForSequenceClassification, DistilBertForSequenceClassification, CamembertForSequenceClassification, AlbertForSequenceClassification, ElectraForSequenceClassification, XLMModel, XLMConfig, XLMTokenizer, XLMForSequenceClassification, FlaubertModel, FlaubertConfig, FlaubertTokenizer, FlaubertForSequenceClassification
  import torch
  from torch import Tensor
  from torch.nn import BCEWithLogitsLoss
label_desc: Use image node_id 1 for calling the RobertaForMultiLabelSequenceClassification obj's underlying member method code with example usage: obj.forward(input_ids, token_type_ids, attention_mask, labels, position_ids, head_mask) and returns: outputs