mystic123 / tensorflow-yolo-v3

Implementation of YOLO v3 object detector in Tensorflow (TF-Slim)
https://medium.com/@pawekapica_31302/implementing-yolo-v3-in-tensorflow-tf-slim-c3c55ff59dbe
Apache License 2.0
893 stars 353 forks source link

ValueError: cannot reshape array of size 60663 into shape (258,256,1,1) #15

Closed liuchang8am closed 6 years ago

liuchang8am commented 6 years ago

Following how to demo here , I got an error:

File "/home/lc/codes/tensorflow-yolo-v3/demo.py", line 58, in main
    load_ops = load_weights(tf.global_variables(scope='detector'), FLAGS.weights_file)
  File "/home/lc/codes/tensorflow-yolo-v3/yolo_v3.py", line 298, in load_weights
    var_weights = weights[ptr:ptr + num_params].reshape((shape[3], shape[2], shape[0], shape[1]))
ValueError: cannot reshape array of size 60663 into shape (258,256,1,1)

If helpful, the debugging info is:

image

image

Any thoughts what might be wrong? Awesome work btw!

liuchang8am commented 6 years ago

Nevermind, it turns out I had a blank line after the last line of coco.names file.