Skip to content

Commit

Permalink
fix pytorch interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dham committed Jan 2, 2025
1 parent da47938 commit 7d03656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firedrake/ml/pytorch/fem_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def backward(ctx, grad_output):
adj_input = float(adj_input)

# Compute adjoint model of `F`: delegated to pyadjoint.ReducedFunctional
adj_output = F.derivative(adj_input=adj_input, options={"riesz_representation": "l2"})
adj_output = F.derivative(adj_input=adj_input)

# Tuplify adjoint output
adj_output = (adj_output,) if not isinstance(adj_output, collections.abc.Sequence) else adj_output
Expand Down

0 comments on commit 7d03656

Please sign in to comment.