Support of different batch types
Hi!
As I say later, I got two problems:

in my research I have to put to model three tensors, like
{'tokens': torch.Tensor, 'head': torch.Tensor, 'tail': torch.Tensor}, but when I tried to use GPU to train it, I had error RuntimeError: Expected object of backend CUDA but got backend CPU for argument #3 'index'.
And its easy to fix (for single GPU, I do not know how to work with DDP and DP), just add two conditions.
Second problem about GPU too. In my dataloader I have batch like dict with tokens. I use pretrained embeddings, so I can vectorize my batch only in training_step or validation_step, but I cannot push it in GPU memory, so I have same error  RuntimeError: Expected object of backend CUDA but got backend CPU for argument #3 'index'.