AttributeError: 'TFDistilBertForSequenceClassification' object has no attribute 'to'
## Environment info
- `transformers` version: 4.11.2
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyTorch version (GPU?): 1.9.0+cu102 (False)
- Tensorflow version (GPU?): 2.6.0 (False)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: YES
- Using distributed or parallel set-up in script?: PARALLEL

- https://huggingface.co/transformers/custom_datasets.html

### Who can help
- trainer: @sgugger

Examples:


## Information

Model I am using: TFDistilBertForSequenceClassification

The problem arises when using:
* [ ] the official example scripts: https://colab.research.google.com/github/huggingface/notebooks/blob/master/transformers_doc/custom_datasets.ipynb

## To reproduce

Steps to reproduce the behavior:

1. Run the tensorflow cells
2. See `AttributeError: 'TFDistilBertForSequenceClassification' object has no attribute 'to'` when training

## Expected behavior

I expect `model.to()` to work in that cell doing the training.


Excuse me for not providing a stack trace. I am trying to re-run the colab but stanford is not serving the imdb dataset
That notebook has a PyTorch and a TensorFlow version. If you take the mixed one, you will need to execute only the relevant cells.<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.