RuntimeError: dimension specified as 0 but tensor has no dimensions

Hi, Actually I am trying to train skip-thought vectors on multiple-gpus, this implementation is taken from GitHub - sanyam5/skip-thoughts: The first public PyTorch implementation of Skip-Thought Vectors code. But, while computing loss function, am getting above error. Can anybody help me to resolve this issue. Thank you.
Loss snippet code: