Regarding the first error:
ValueError                                Traceback (most recent call last)
<ipython-input-56-9b9b1ca99075> in <module>
      1 ##documentation: https://pytorch.org/tutorials/beginner/basics/data_tutorial.html
      2 
----> 3 train_features, labels = next(iter(trn_dl))
      4 
      5 print(train_features, train_labels)

ValueError: too many values to unpack (expected 2)

Try using:
train_features, labels, captions = next(iter(trn_dl))
instead of
train_features, labels = next(iter(trn_dl))
This is because your CaptioningData class’s __getitem__ returns 3 things:
return image, target, caption
The PyTorch DataLoader will automatically batch everything (all 3) for you