Skip to content

Commit

Permalink
Align the label index in LABEL_MAP to match cls_id (#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
noamzbr committed Apr 11, 2022
1 parent 3b74680 commit 0475894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/tutorials/vision/plot_detection_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def infer_on_batch(self, batch, model, device):
# We have a single label here, which is the tomato class
# The label_map is a dictionary that maps the class id to the class name, for display purposes.
LABEL_MAP = {
0: 'Tomato'
1: 'Tomato'
}
training_data = TomatoData(data_loader=train_loader, label_map=LABEL_MAP)
val_data = TomatoData(data_loader=val_loader, label_map=LABEL_MAP)
Expand Down

0 comments on commit 0475894

Please sign in to comment.