lamoureux-lab / TorchProteinLibrary

PyTorch library of layers acting on protein representations
https://lamoureux-lab.github.io/TorchProteinLibrary/
MIT License
116 stars 23 forks source link

Changed feature correlations from upper diag. to all. #37

Closed truzmeto closed 3 years ago

truzmeto commented 3 years ago

Hi Georgy, Changed feature correlations from upper diagonal to all. Since receptor and ligand representations are different species, all correlations are unique, and should contribute to learning. Thanks! ~Talant

truzmeto commented 3 years ago

Previous push to consider all correlations had a mistake. Fixed it this time. Basically, 1st loop correlates diagonal and upper diagonal, then 2nd loop correlates lower diagonal.

lupoglaz commented 3 years ago

I changed this in the latest commit using torch.repeat instead of python for loop. Inbuilt operations on tensors are much more efficient than python loops, please use them when possible.