Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法进行训练:“does not index into shape” #361

Open
huiji123 opened this issue May 9, 2021 · 2 comments
Open

无法进行训练:“does not index into shape” #361

huiji123 opened this issue May 9, 2021 · 2 comments

Comments

@huiji123
Copy link

huiji123 commented May 9, 2021

详细情况如下

tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[16] = [13, 51, 1, 2] does not index into shape [16,26,26,3,6]
[[{{node PartitionedCall_1/TensorScatterUpdate}}]]
[[IteratorGetNext]] [Op:__inference_train_function_28256]

Function call stack:
train_function

请问我应该改如何进行修改?

@RyanCCC
Copy link

RyanCCC commented Aug 13, 2021

你好,我也遇到这个问题了,请问你解决了吗?谢谢

@phajder
Copy link

phajder commented Sep 14, 2021

I am not sure if it will be your case, but in mine this error was caused by not-normalized tensor values (in some cases they were outside of range [0.0;1.0]).
TF Object Detection API requires all the bounding box coords to be normalized according to image shape. More info here: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/using_your_own_dataset.md
You also have to remember, that each of image/object/*/* arrays passed to tf.train.Example must have same sizes. If you modified any part of the tools/voc2012.py, double check this case does not appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants