Capsule-Network-Tutorial icon indicating copy to clipboard operation
Capsule-Network-Tutorial copied to clipboard

margin loss wrong

Open DanlanChen opened this issue 8 years ago • 2 comments

Hello, I think your magin loss is wrong, according to the paper, after relu, there is a square you forgot

DanlanChen avatar Jan 31 '18 21:01 DanlanChen

I think it should be left = ((F.relu(0.9 - v_c))**2).view(batch_size, -1) right = ((F.relu(v_c - 0.1))**2).view(batch_size, -1)

DanlanChen avatar Jan 31 '18 21:01 DanlanChen

I have also noticed that little mistake and reviewing the paper it is clear that there are two missing squares.

alexlopezcifuentes avatar Jul 04 '18 12:07 alexlopezcifuentes