I think I got to the bottom of this. For some reason the HingeEmbeddingLoss class is not defined in: https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/loss.py#L202 12
As opposed to MarginRankingLoss where the class is set up correctly: https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/loss.py#L365 9
Not sure why though.