How to train EncoderDecoderModel using bert for seq-to-seq model
Hi @patrickvonplaten,

I am trying to make a sequence to sequence model using EncoderDecodermodel and BERT
Please find the following code,

```python
import pandas as pd
from transformers import EncoderDecoderModel

train_data = [
    ["one", "1"],
    ["two", "2"],
            ]

train_df = pd.DataFrame(train_data, columns=["input_text", "target_text"])

eval_data = [["three", "3"]]
eval_df = pd.DataFrame(eval_data, columns=["input_text", "target_text"])

#using BERT encoder decoder
model=EncoderDecoderModel.from_encoder_decoder_pretrained('bert-base-uncased', 'bert-base-uncased')
model.train(train_df)
results=model.eval([eval_df],)
#results=model.generate([["Five"],])
print(results)
```

But while evaluating, ends up in an error as shown in the figure

![image](https://user-images.githubusercontent.com/52187221/99480246-95474b00-29bc-11eb-88c1-8ffaa88e1738.png)

Any suggestions on the same?


Hey @jithincheriyan, 

Please note that `.eval()` and `.train()` are not used to evaluate / train the model in PyTorch. In PyTorch `.eval()` and `.train()` are simply used to set the model into "training" or "evaluation" model. See the functions' API here: https://pytorch.org/docs/master/generated/torch.nn.Flatten.html#torch.nn.Flatten.train

Please refer to this blog post to understand how to train an `EncoderDecoderModel`: https://huggingface.co/blog/warm-starting-encoder-decoder#warm-starting-encoder-decoder-models-with-%F0%9F%A4%97transformers-practice