bxshi / ProjE

Embedding Projection for Knowledge Graph Completion
MIT License
76 stars 41 forks source link

Question about sampled_softmax #4

Closed ZichaoHuang closed 7 years ago

ZichaoHuang commented 7 years ago

Hi, it's me again :) I wonder what's the purpose of rescale in the sampled_softmax function?

bxshi commented 7 years ago

Hi no worries. I think it is some poorly designed numerical trick to help preventing numerical instability when calculating the exp. You can remove the rescale since I already have tf.clip_by_value elsewhere.

Thank you so much for helping me improving the quality of the code!

ZichaoHuang commented 7 years ago

OK, thanks!