Skip to content

Commit

Permalink
Update main.py due to the issues 2669
Browse files Browse the repository at this point in the history
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=[])
  • Loading branch information
openvino-book authored May 25, 2024
1 parent b8b3e3b commit 3120cfa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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]})
Expand Down

0 comments on commit 3120cfa

Please sign in to comment.