Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
vpratz committed May 25, 2024
1 parent a7cb054 commit 46139e0
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions inverse_kinematics/benchmark/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,6 @@ def sample_posterior(self, x, n_samples, max_n_batches=1000):
# Weight the samples by their probability under the prior
# Compute Jacobi determinant of the transformation

# TODO: Calculate jacobi determinant
"""
a, b = self.components[-2].length, self.components[-1].length
d3f1 = -a * np.sin(params[:, 1] + params[:, 2]) - b * np.sin(params[:, 1] + params[:, 2] + params[:, 3])
d4f1 = -b * np.sin(params[:, 1] + params[:, 2] + params[:, 3])
d3f2 = +a * np.cos(params[:, 1] + params[:, 2]) + b * np.cos(params[:, 1] + params[:, 2] + params[:, 3])
d4f2 = +b * np.cos(params[:, 1] + params[:, 2] + params[:, 3])
deform_factor = 1 / np.abs(d3f1 * d4f2 - d4f1 * d3f2)
"""

deform_factor = self._get_jacobian_determinant(params, self.forward(params[:-2]))

weights = self._complement_prior_pdf(params[-2:])[:, 0] * deform_factor
Expand Down

0 comments on commit 46139e0

Please sign in to comment.