EdjeElectronics / TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

How to train a TensorFlow Object Detection Classifier for multiple object detection on Windows
Apache License 2.0
2.92k stars 1.3k forks source link

ValueError: Tried to convert 't' to a tensor and failed. #26

Open Alexyitx opened 6 years ago

Alexyitx commented 6 years ago

ValueError: Tried to convert 't' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted []. I have such a problem. but i dont know how to solve it, can you help me .thanks a lot!

chentianyou commented 6 years ago

I have same problem too.

chentianyou commented 6 years ago

I solve this problem by change file "object_detection\utils\learning_schedules.py" line 186: "range(num_boundaries)" -> "[i for i in range(num_boundaries)]"

psi43 commented 6 years ago

Thank you chentianyou, that fixed it for me as well.

Still getting a ton of Warnings though, but it seems to train fine.

Also, it seems to do each step twice and I don't know why. eg: INFO:tensorflow:global step 23: loss = 1.3193 (4.609 sec/step) INFO:tensorflow:global step 23: loss = 1.3193 (4.609 sec/step) INFO:tensorflow:global step 24: loss = 1.2625 (4.132 sec/step) INFO:tensorflow:global step 24: loss = 1.2625 (4.132 sec/step) INFO:tensorflow:global step 25: loss = 1.5012 (4.788 sec/step) INFO:tensorflow:global step 25: loss = 1.5012 (4.788 sec/step)