From 3120cfa79f4f898a43c35639d303b3631ba185fc Mon Sep 17 00:00:00 2001 From: openvino-book <180585215@qq.com> Date: Sat, 25 May 2024 13:28:21 +0800 Subject: [PATCH] Update main.py due to the issues 2669 AttributeError: 'list' object has no attribute 'keys' change the L149 of the main.py to validator.stats = dict(tp_m=[], tp=[], conf=[], pred_cls=[], target_cls=[]) --- .../openvino/yolov8_quantize_with_accuracy_control/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/post_training_quantization/openvino/yolov8_quantize_with_accuracy_control/main.py b/examples/post_training_quantization/openvino/yolov8_quantize_with_accuracy_control/main.py index 4b6cd2c0f75..4008ae27da7 100644 --- a/examples/post_training_quantization/openvino/yolov8_quantize_with_accuracy_control/main.py +++ b/examples/post_training_quantization/openvino/yolov8_quantize_with_accuracy_control/main.py @@ -38,7 +38,7 @@ def validate( ) -> Tuple[Dict, int, int]: validator.seen = 0 validator.jdict = [] - validator.stats = [] + validator.stats = dict(tp_m=[], tp=[], conf=[], pred_cls=[], target_cls=[]) validator.batch_i = 1 validator.confusion_matrix = ConfusionMatrix(nc=validator.nc) model.reshape({0: [1, 3, -1, -1]})