diff --git a/model_compression_toolkit/core/keras/hessian/weights_trace_hessian_calculator_keras.py b/model_compression_toolkit/core/keras/hessian/weights_trace_hessian_calculator_keras.py index 665a26cf2..77c527599 100644 --- a/model_compression_toolkit/core/keras/hessian/weights_trace_hessian_calculator_keras.py +++ b/model_compression_toolkit/core/keras/hessian/weights_trace_hessian_calculator_keras.py @@ -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)