Fine tune MarianMT for en to de error: in Dataloader when using data collator in collate_fn argument of data loader
I have been trying to fine-tune MarianMT for English to German on a custom dataset that  I have.  I want to fine-tune it using the native PyTorch approach in python. But when I try to load the dataset in PyTorch’s Dataloader and iterate over it to print a batch, I get the following error:unsupported operand type(s) for +: ‘Tensor’ and ‘list’. I have attached the snap of the error that I got.image1243×736 50.8 KBI have followed the procedure of fine-tuning the model fromhttps://huggingface.co/course/chapter3/4?fw=ptmaking suitable changes according to the requirements of the model. Another reference that I have used from here:https://huggingface.co/transformers/notebooks.htmlThe error does not occur when I do not pass the DataCollatorForSeq2Seq in Dataloader.Checkpoint used = Helsinki-NLP/opus-mt-en-deThank You!