Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenvivek committed Feb 7, 2024
1 parent e870fde commit ee17c09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions diffdrr/pose.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class RigidTransform(torch.nn.Module):

def __init__(self, matrix):
super().__init__()
if specimen.extrinsic.matrix.dim() == 2:
if matrix.dim() == 2:
matrix = matrix.unsqueeze(0)
self.register_buffer("matrix", matrix)

Expand All @@ -39,7 +39,7 @@ def inverse(self):
t = self.matrix[..., :3, 3]
Rinv = R.mT
tinv = -torch.einsum("bij, bj -> bi", Rinv, t)
make_matrix(Rinv, tinv)
matrix = make_matrix(Rinv, tinv)
return RigidTransform(matrix)

def compose(self, T):
Expand Down
4 changes: 2 additions & 2 deletions notebooks/api/06_pose.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"\n",
" def __init__(self, matrix):\n",
" super().__init__()\n",
" if specimen.extrinsic.matrix.dim() == 2:\n",
" if matrix.dim() == 2:\n",
" matrix = matrix.unsqueeze(0)\n",
" self.register_buffer(\"matrix\", matrix)\n",
"\n",
Expand All @@ -115,7 +115,7 @@
" t = self.matrix[..., :3, 3]\n",
" Rinv = R.mT\n",
" tinv = -torch.einsum(\"bij, bj -> bi\", Rinv, t)\n",
" make_matrix(Rinv, tinv)\n",
" matrix = make_matrix(Rinv, tinv)\n",
" return RigidTransform(matrix)\n",
"\n",
" def compose(self, T):\n",
Expand Down

0 comments on commit ee17c09

Please sign in to comment.