How to convert tokenizer output to train_dataset which is required by Trainer API 
# ❓ Questions & Help

<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,
     new models and benchmarks, and migration questions. For all other questions,
     we direct you to the Hugging Face forum: https://discuss.huggingface.co/ .
     You can also try Stack Overflow (SO) where a whole community of PyTorch and
     Tensorflow enthusiast can help you out. In this case, make sure to tag your
     question with the right deep learning framework as well as the
     huggingface-transformers tag: 
     https://stackoverflow.com/questions/tagged/huggingface-transformers 
     -->

## Details
<!-- Description of your issue -->

I tried doing tokenisation using documentation of huggingface transformers.

```
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('bert-base-cased')
encoded_input = tokenizer(batch_of_sequences)
```

Pre Trained Tokenizer gives output of dictionary containing three keys which are

```
encoded_input = {
'input_ids': [[],[],[]],
'token_type_ids': [[],[],[]],
'attention_mask': [[],[],[]]
}

```

Trainer API requires input of Train & Eval Dataset of type `torch.utils.data.Dataset`.

How can we use this output to create training dataset required for Trainer API?

<!-- You should first ask your question on the forum or SO, and only if
     you didn't get an answer ask it here on GitHub. -->
**A link to original question on the forum/Stack Overflow**:

https://stackoverflow.com/questions/63519373/how-to-convert-tokenizer-output-to-train-dataset-which-is-required-by-trainer-ap
Hi @questpavan ,
This awesome [tutorial](https://huggingface.co/transformers/master/custom_datasets.html) walks you through how you can fine-tune transformer models using custom dataset. It also covers pre-processing and how to create dataset etc.<|||||>Thanks @patil-suraj. It helped a lot. 