Hi,
while trying to implement the following paper in PyTorch: https://arxiv.org/abs/1705.08039 31, I encountered some issues with my gradients. I tried checking the sanity of the values and everything seems to be correct but still get some NaN values for the gradients.
Here is the repo implementing the code in a Jupyter Notebook:

  
      
      GitHub
  
  
    

Timonzimm/poincare-embedding 175

poincare-embedding - Poincaré Embeddings for Learning Hierarchical Representations (https://arxiv.org/abs/1705.08039) in PyTorch


  
  
    
    
  
  


Also, since this is the first time I try to implement some paper in PyTorch primitives, I would be glad if someone more experienced could review my code and maybe point some best practices and/or optimization that I could apply.
Thank you for your precious help and guidance for the code review!