text: 
  
  TITLE
  How to perform model.predict loop with TFRobertaForSequenceClassification?
  
  COMMENTS
  2
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  I'd like to perform inference loop for the following roberta model:
  
  ```
  model = TFRobertaForSequenceClassification.from_pretrained('roberta-base',return_dict=True,num_labels=2)
  ```
  
  on a large set of pairs of sentences (couple of hundred thousands). I wanted to use `model.predict` and specify batch size, but there is no way to pass the below inputs (encoded_data is tokenization of the input data) to `model.predict`
  
  ```
  attention_mask=encoded_data['attention_mask'], 
  token_type_ids=encoded_data['token_type_ids']
  ```
  
  So what is the alternative way to do that?