Skip to content

Commit 843111c

Browse files
authored
Fix the order of the input tensors
The order of the input tensors is incorrect and therefore the sample notebook does not run. The sample code has the order of the input tensors as `boxes, classes, scores, num_detections`, but actually the order should be `scores, boxes, num_detections, classes` After correcting the indexes of the input tensor, the sample notebook runs.
1 parent ea90f0c commit 843111c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

research/object_detection/colab_tutorials/centernet_on_device.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@
244244
"\r\n",
245245
" interpreter.invoke()\r\n",
246246
"\r\n",
247-
" boxes = interpreter.get_tensor(output_details[0]['index'])\r\n",
248-
" classes = interpreter.get_tensor(output_details[1]['index'])\r\n",
249-
" scores = interpreter.get_tensor(output_details[2]['index'])\r\n",
250-
" num_detections = interpreter.get_tensor(output_details[3]['index'])\r\n",
247+
" scores = interpreter.get_tensor(output_details[0]['index'])\r\n",
248+
" boxes = interpreter.get_tensor(output_details[1]['index'])\r\n",
249+
" num_detections = interpreter.get_tensor(output_details[2]['index'])\r\n",
250+
" classes = interpreter.get_tensor(output_details[3]['index'])\r\n",
251251
"\r\n",
252252
" if include_keypoint:\r\n",
253253
" kpts = interpreter.get_tensor(output_details[4]['index'])\r\n",
@@ -759,4 +759,4 @@
759759
]
760760
}
761761
]
762-
}
762+
}

0 commit comments

Comments
 (0)