I am trying to use the torch.nn.TripletMarginLoss on three tensors a, b, c. The module internally calls torch.nn.Functional.triplet_margin_loss which also gives the same error when called independently on the the three tensors. Below is a code snippet and all of this is in pytorch 0.4 under python 3.6. Is this a dimension bug. How can I fix this?
a = torch.FloatTensor([0.1, 0.2])
b = torch.FloatTensor([0.2, 0.2])
c = torch.FloatTensor([0.1, 0.3])
torch.nn.Functional.triplet_margin_loss(a,b,c)