Question about masking of capsule softmax in lines 150~155 of model.py
wwnis7 opened this issue · comments
Is there a reason to apply masking after softmax in lines 150~155? This seems to make the sum of the coupling coefficients (c_ij) less than 1.
On the other hand, in Model_ComiRec_SA, masking was done before softmax (lines 233~237).
I think the masking of lines 150~155 should also be applied before softmax. This is because the thesis has the following passage.
"The coupling coefficients between capsule i and all the capsules in the next layer should sum to 1."
Sorry, I was wrong. It is doing masking for samples but I was confused. You can ignore my question.
Thanks for providing good code.