Closed xinfangliu closed 4 years ago
Hi, due to F_I = ImgNet.alexnet.features(x)
, F_I >= 0 (After ReLU). The original S_I = F_I.mm(F_I.t())
is in [0, 1]. To limit it in [-1, 1], we apply S_I = S_I * 2 - 1
here.
Hi, due to
F_I = ImgNet.alexnet.features(x)
, F_I >= 0 (After ReLU). The originalS_I = F_I.mm(F_I.t())
is in [0, 1]. To limit it in [-1, 1], we applyS_I = S_I * 2 - 1
here.
I see. Thank you for your answer
why need this operation 'S_I=S_I*2 -1' after calculating the cos similarity matrix?