mana-ysh / knowledge-graph-embeddings

Implementations of Embedding-based methods for Knowledge Base Completion tasks
Apache License 2.0
257 stars 63 forks source link

Question about the computing of gradient in transe #7

Closed shaoyx closed 6 years ago

shaoyx commented 6 years ago

Hi, @mana-ysh I doubt there are some mistakes in the implementation of TransE when computing the gradient. It seems that the gradients in a mini-batch are not averaged by the batch_size.

https://github.com/mana-ysh/knowledge-graph-embeddings/blob/master/src/models/transe.py

Can you give some reason about such implementation?

Thanks!