Make suggestion 1 the default option. #48.

This commit is contained in:
Brandon Amos 2015-11-09 15:58:01 -05:00
parent e067ea3198
commit 2e8466afb1
1 changed files with 2 additions and 4 deletions

View File

@ -171,13 +171,11 @@ function trainBatch(inputsThread, numPerClassThread)
for k = 1,numImages do
if k < embStartIdx or k > embStartIdx+n-1 then
local negDist = dist(embeddings[aIdx], embeddings[k])
if posDist < negDist and negDist < selNegDist then
if posDist < negDist and negDist < selNegDist and
math.abs(posDist-negDist) < alpha then
randomNeg = false
selNegDist = negDist
selNegIdx = k
if math.abs(posDist-negDist) < alpha then
break
end
end
end
end