fix format by using ruff instead of black

This commit is contained in:
Dan Brown 2025-12-02 14:10:08 +01:00
parent ec1e074c08
commit d1aa07fcd1

View File

@ -272,9 +272,7 @@ class EdgeTpuTfl(DetectionApi):
) # initialize zero results ) # initialize zero results
scores_output_quantized = self.interpreter.get_tensor( scores_output_quantized = self.interpreter.get_tensor(
self.scores_tensor_index self.scores_tensor_index
)[ )[0] # (2100, NC)
0
] # (2100, NC)
max_scores_quantized = np.max( max_scores_quantized = np.max(
scores_output_quantized, axis=1 scores_output_quantized, axis=1
) # (2100,) ) # (2100,)
@ -293,9 +291,7 @@ class EdgeTpuTfl(DetectionApi):
# remove candidates with probabilities < threshold # remove candidates with probabilities < threshold
boxes_output_quantized_filtered = ( boxes_output_quantized_filtered = (
self.interpreter.get_tensor(self.boxes_tensor_index)[0] self.interpreter.get_tensor(self.boxes_tensor_index)[0]
)[ )[mask] # (N, 64)
mask
] # (N, 64)
boxes_output_filtered = ( boxes_output_filtered = (
boxes_output_quantized_filtered.astype(np.float32) boxes_output_quantized_filtered.astype(np.float32)
- self.boxes_zero_point - self.boxes_zero_point