PairwiseDistance L1 not using absolute value
jonathantompson opened this issue · comments
Jonathan Tompson commented
The title is pretty self explanatory :-) It happens only on the batch case and only when you use L1.
pdist = nn.PairwiseDistance(1):float()
x = torch.FloatTensor(5,5):fill(1)
y = torch.FloatTensor(5,5):fill(2)
print(pdist:forward({x,y}))
--> The result i [-5, -5, -5, -5, -5]
I'll post a pull request to fix it. It'll take me a few minutes :-)
Jonathan Tompson commented
See pull request:
Jonathan Tompson commented
Actually, scratch that... There were more bugs than just the fprop bug I fixed. See pull request: