Skip to content

Commit

Permalink
Update new -> new_lietensor.
Browse files Browse the repository at this point in the history
  • Loading branch information
luisenp committed Apr 27, 2023
1 parent 31e83b3 commit 3130d06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/lie_labs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def is_shared(t1, t2): # utility to check if memory is shared
assert is_shared(g3_data, g6)

# -- LieTensor.new()
g7 = g3.new(g3_data)
assert is_shared(g3_data, g7) # shares storage
assert g7.grad_fn is not None # differentiable
g7 = g3.new_lietensor(g3_data)
assert not is_shared(g3_data, g7) # doesn't share storage
assert g7.grad_fn is None # creates a leaf

# ### Lie operations
v = torch.randn(batch_size, 6)
Expand Down

0 comments on commit 3130d06

Please sign in to comment.