I'm trying to train my custom data using YoloV3 using YunYang1994/tensorflow-yolov3 implementation on GitHub: This repo

My data has 2 classes: class 1 has 80 images for train, 20 test. class 2 has 48 train, 12 test.

I prepare everything required: train.tfrecords, test.tfrecords ...

But when I run quick_train (after modifying the path) I got this:

Traceback (most recent call last):
  File "thao_train.py", line 47, in <module>
    loss             = model.compute_loss(pred_feature_map, y_true)
  File "C:\Users\thao\tensorflow-yolov3\core\yolov3.py", line 263, in compute_loss
    result = self.loss_layer(pred_feature_map[i], y_true[i], _ANCHORS[i])
  File "C:\Users\thao\tensorflow-yolov3\core\yolov3.py", line 318, in loss_layer
    true_tw_th = y_true[..., 2:4] / anchors
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py", line 824, in binary_op_wrapper
    return func(x, y, name=name)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py", line 920, in _truediv_python3
    return gen_math_ops.real_div(x, y, name=name)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 6897, in real_div
    "RealDiv", x=x, y=y, name=name)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper
    op_def=op_def)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3300, in create_op
    op_def=op_def)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1823, in __init__
    control_input_ops)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1662, in _create_c_op
    raise ValueError(str(e))
ValueError: Dimensions must be equal, but are 3 and 0 for 'yolov3/truediv_8' (op: 'RealDiv') with input shapes: [?,13,13,3,2], [0,2].

Any guess why is that ?

0 Answers