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

traing error #36

Open
OPPOA113 opened this issue Jan 22, 2019 · 11 comments
Open

traing error #36

OPPOA113 opened this issue Jan 22, 2019 · 11 comments

Comments

@OPPOA113
Copy link

=> EPOCH: 341 loss_xy: 1.6257 loss_wh: 4.0940 loss_conf:4570.6030 loss_class:14.2002
=> EPOCH: 342 loss_xy: 1.5741 loss_wh: 2.6803 loss_conf:4656.8652 loss_class:11.8622
=> EPOCH: 343 loss_xy: 1.3638 loss_wh: 2.3212 loss_conf:4657.7090 loss_class:11.4552
2019-01-22 16:34:48.172989: W tensorflow/core/framework/op_kernel.cc:1261] Unknown: IndexError: index 13 is out of bounds for axis 0 with size 13
Traceback (most recent call last):

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/script_ops.py", line 206, in call
ret = func(*args)

File "........../tensorflow-yolov3/core/dataset.py", line 105, in preprocess_true_boxes
y_true[l][j, i, k, 0:4] = gt_boxes[t, 0:4]

IndexError: index 13 is out of bounds for axis 0 with size 13

what's wrong

@wangyazhao001
Copy link

When I run the train.py,I also can‘t train my data.It's also the problem:

OutOfRangeError: End of sequence
[[{{node cond/IteratorGetNext_1}} = IteratorGetNextoutput_shapes=[[?,416,416,3], , , ], output_types=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

During handling of the above exception, another exception occurred。OutOfRangeError Traceback (most recent call last)
in ()
78 if (epoch+1)%1000 == 0: saver.save(sess, save_path="./checkpoint/yolov3.ckpt", global_step=epoch)

Do you know what's the problem?

@rainley123
Copy link

=> EPOCH: 341 loss_xy: 1.6257 loss_wh: 4.0940 loss_conf:4570.6030 loss_class:14.2002
=> EPOCH: 342 loss_xy: 1.5741 loss_wh: 2.6803 loss_conf:4656.8652 loss_class:11.8622
=> EPOCH: 343 loss_xy: 1.3638 loss_wh: 2.3212 loss_conf:4657.7090 loss_class:11.4552
2019-01-22 16:34:48.172989: W tensorflow/core/framework/op_kernel.cc:1261] Unknown: IndexError: index 13 is out of bounds for axis 0 with size 13
Traceback (most recent call last):

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/script_ops.py", line 206, in call
ret = func(*args)

File "........../tensorflow-yolov3/core/dataset.py", line 105, in preprocess_true_boxes
y_true[l][j, i, k, 0:4] = gt_boxes[t, 0:4]

IndexError: index 13 is out of bounds for axis 0 with size 13

what's wrong

I also got this problems and have solved this problems. when you do data_augmentation. there are some problems in crop code. if one object is not in the distort_box, the croped_xmin and croped_xmax will be the same, in this way, you will get this problems

@ChienLiu
Copy link

@rainley123 . So how did you solved this?

@rainley123
Copy link

@rainley123 . So how did you solved this?

Just add a code to judge if the croped_xmin is equal to the croped_xmax, is they are the same, remove the label and box, because this object will not be in the picture after crop.
the code is like this:

if the object is not in the dist_box, just remove it

mask = tf.logical_not(tf.logical_or(tf.equal(croped_xmin, croped_xmax), tf.equal(croped_ymin, croped_ymax)))        
croped_xmin = tf.boolean_mask(croped_xmin, mask)
croped_ymin = tf.boolean_mask(croped_ymin, mask)
croped_xmax = tf.boolean_mask(croped_xmax, mask)
croped_ymax = tf.boolean_mask(croped_ymax, mask)
labels = tf.boolean_mask(labels, mask) 

@ChienLiu
Copy link

Thanks a lot, I gonna try it.

@madhu-korada
Copy link

UnknownError: IndexError: index 89 is out of bounds for axis 0 with size 88
Traceback (most recent call last):

File "D:\Users\madhu\Anaconda3\envs\yolo\lib\site-packages\tensorflow\python\ops\script_ops.py", line 206, in call
ret = func(*args)

File "C:\Users\madhu\Desktop\working\tensorflow-yolov3-master\core\dataset.py", line 180, in preprocess_true_boxes
y_true[l][j, i, k, 0:4] = gt_boxes[t, 0:4]

IndexError: index 89 is out of bounds for axis 0 with size 88

 [[{{node PyFunc}} = PyFunc[Tin=[DT_FLOAT], Tout=[DT_FLOAT, DT_FLOAT, DT_FLOAT], token="pyfunc_0"](stack)]]
 [[node cond/IteratorGetNext (defined at C:\Users\madhu\Desktop\working\tensorflow-yolov3-master\core\dataset.py:230)  = IteratorGetNext[output_shapes=[[?,704,1280,3], <unknown>, <unknown>, <unknown>], output_types=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](cond/IteratorGetNext/Switch:1)]]

for some reason i am also getting the same error. I have included the above code, still there is no change.

@chaowentao
Copy link

UnknownError: IndexError: index 89 is out of bounds for axis 0 with size 88
Traceback (most recent call last):

File "D:\Users\madhu\Anaconda3\envs\yolo\lib\site-packages\tensorflow\python\ops\script_ops.py", line 206, in call
ret = func(*args)

File "C:\Users\madhu\Desktop\working\tensorflow-yolov3-master\core\dataset.py", line 180, in preprocess_true_boxes
y_true[l][j, i, k, 0:4] = gt_boxes[t, 0:4]

IndexError: index 89 is out of bounds for axis 0 with size 88

 [[{{node PyFunc}} = PyFunc[Tin=[DT_FLOAT], Tout=[DT_FLOAT, DT_FLOAT, DT_FLOAT], token="pyfunc_0"](stack)]]
 [[node cond/IteratorGetNext (defined at C:\Users\madhu\Desktop\working\tensorflow-yolov3-master\core\dataset.py:230)  = IteratorGetNext[output_shapes=[[?,704,1280,3], <unknown>, <unknown>, <unknown>], output_types=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](cond/IteratorGetNext/Switch:1)]]

for some reason i am also getting the same error. I have included the above code, still there is no change.

I was receiving this same error.If you have some classes like me, make sure your label class names start from index 0 and not 1.

@madhu-korada
Copy link

My class names are labeled from zero only. If you know any further info please let me know

@15151874182
Copy link

=> EPOCH: 341 loss_xy: 1.6257 loss_wh: 4.0940 loss_conf:4570.6030 loss_class:14.2002
=> EPOCH: 342 loss_xy: 1.5741 loss_wh: 2.6803 loss_conf:4656.8652 loss_class:11.8622
=> EPOCH: 343 loss_xy: 1.3638 loss_wh: 2.3212 loss_conf:4657.7090 loss_class:11.4552
2019-01-22 16:34:48.172989: W tensorflow/core/framework/op_kernel.cc:1261] Unknown: IndexError: index 13 is out of bounds for axis 0 with size 13
Traceback (most recent call last):

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/script_ops.py", line 206, in call
ret = func(*args)

File "........../tensorflow-yolov3/core/dataset.py", line 105, in preprocess_true_boxes
y_true[l][j, i, k, 0:4] = gt_boxes[t, 0:4]

IndexError: index 13 is out of bounds for axis 0 with size 13

what's wrong

hello,i met the same problem with u,have u solved it?

@madhu-korada
Copy link

yes, i cropped my images and labels were not modified.
Still, Nan is not going away even with so many tweeks

@ChenShisen
Copy link

@rainley123 . So how did you solved this?

Just add a code to judge if the croped_xmin is equal to the croped_xmax, is they are the same, remove the label and box, because this object will not be in the picture after crop.
the code is like this:

if the object is not in the dist_box, just remove it

mask = tf.logical_not(tf.logical_or(tf.equal(croped_xmin, croped_xmax), tf.equal(croped_ymin, croped_ymax)))        
croped_xmin = tf.boolean_mask(croped_xmin, mask)
croped_ymin = tf.boolean_mask(croped_ymin, mask)
croped_xmax = tf.boolean_mask(croped_xmax, mask)
croped_ymax = tf.boolean_mask(croped_ymax, mask)
labels = tf.boolean_mask(labels, mask) 

请问这段代码添加在哪里

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

8 participants