Closed 212726320 closed 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.
squared_distance()
Also wrote unit tests for util.squared_distance().
util.squared_distance()
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()
.