Closed Andy1621 closed 1 year ago
To avoid zero-division error in F.softmax.
The softmax uses exp
. It seems that it will not cause zero-division error.
Oh, you are right! I was looking at it too quickly. Please see this issue https://github.com/salesforce/ALBEF/issues/93
Thanks!
Hi! I found that
1e-4
is added in thesoftmax
function. Are there any reasons? https://github.com/jayleicn/singularity/blob/bf4a86ec7506565d1f6805ee1612aa6029592776/models/model_retrieval_base.py#L303-L304If it is used for smoothing, why not add it after
softmax
, likeF.softmax(sim_i2t, dim=1)+1e-4
.