cics-nd / gptorch

Gaussian processes with PyTorch
MIT License
30 stars 8 forks source link

squared_distance #16

Closed 212726320 closed 5 years ago

212726320 commented 5 years ago

This PR fixes the computation of squared_distance() so that second derivatives are correct by using a better "clamp" that doesn't disrupt the gradient flow.

Also wrote unit tests for util.squared_distance().