torch / DEPRECEATED-torch7-distro

Torch7: state-of-the-art machine learning algorithms

Home Page:www.torch.ch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PairwiseDistance L1 not using absolute value

jonathantompson opened this issue · comments

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 :-)

See pull request:

#180

Actually, scratch that... There were more bugs than just the fprop bug I fixed. See pull request:

#183