How to perform model.predict loop with TFRobertaForSequenceClassification?
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?
Hi, this [Kaggle notebook](https://www.kaggle.com/xhlulu/jigsaw-tpu-xlm-roberta) shows a very concise way to efficiently train/predict Huggingface's `XLMRoberta` (which is the same format as `Roberta`) . Hope it help!<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
