Skip to content

Commit

Permalink
Fix weights hessian gradient tape (#1105)
Browse files Browse the repository at this point in the history
Co-authored-by: Ofir Gordon <Ofir.Gordon@altair-semi.com>
  • Loading branch information
ofirgo and Ofir Gordon authored Jun 16, 2024
1 parent 6342825 commit f9a1f1b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def compute(self) -> List[np.ndarray]:
model, _ = FloatKerasModelBuilder(graph=self.graph).build_model()

# Initiate a gradient tape for automatic differentiation
with (tf.GradientTape(persistent=True) as tape):
with tf.GradientTape(persistent=True) as tape:
# Perform a forward pass (inference) to get the output, while watching
# the input tensor for gradient computation
tape.watch(self.input_images)
Expand Down

0 comments on commit f9a1f1b

Please sign in to comment.