Skip to content

Commit

Permalink
Merge pull request #225 from pytti-tools/not_inplace
Browse files Browse the repository at this point in the history
[BUGFIX] remove inplace operations from spherical_dist to resolve new backprop error
  • Loading branch information
dmarx authored Dec 15, 2022
2 parents bdd0d96 + 8a5e5c6 commit 9e85683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pytti/Perceptor/Prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
def spherical_dist_loss(x, y):
x = F.normalize(x, dim=-1)
y = F.normalize(y, dim=-1)
return x.sub_(y).norm(dim=-1).div_(2).arcsin_().pow_(2).mul_(2)
return x.sub(y).norm(dim=-1).div(2).arcsin().pow(2).mul(2)


def make_mask(mask, thresh):
Expand Down

0 comments on commit 9e85683

Please sign in to comment.