I’m having trouble with the HingeEmbeddingLoss in pytorch 0.1.11.
When I try to specify  the margin it throws an error.
import torch
mrl = torch.nn.MarginRankingLoss(margin=0.5)  # this works
hel = torch.nn.HingeEmbeddingLoss()  # this works

# this throws an error - __init__() got an unexpected keyword argument margin
hel_m = torch.nn.HingeEmbeddingLoss(margin=0.5)  

Looking at the source in nn/_functions/loss.py, it seems to be defined correctly.
Thanks