Yolov5_tf
Yolov5_tf copied to clipboard
when i train with yolov5 and no weights,i get some error .please help ,thanks
=> Now it starts to train YOLO-yolov5 from scratch ... 0%| | 0/5979 [00:00<?, ?it/s] 2021-02-05 11:11:31.769602: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7 2021-02-05 11:11:32.382686: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10 0%| | 0/5979 [00:08<?, ?it/s] Traceback (most recent call last): File "/root/.virtualenvs/yolov5-tf/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1365, in _do _call return fn(*args) File "/root/.virtualenvs/yolov5-tf/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1350, in _ru n_fn target_list, run_metadata) File "/root/.virtualenvs/yolov5-tf/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1443, in _ca ll_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: ConcatOp : Dimensions of inputs should match: shape[0] = [2,76,76,256] vs. shape[1] = [2,38,38,2 56] [[{{node define_loss/route_0/concat}}]] [[define_loss/conf_loss/add_1/_913]] (1) Invalid argument: ConcatOp : Dimensions of inputs should match: shape[0] = [2,76,76,256] vs. shape[1] = [2,38,38,2 56] [[{{node define_loss/route_0/concat}}]] 0 successful operations. 0 derived errors ignored.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 260, in
Errors may have originated from an input operation. Input Source operations connected to node define_loss/route_0/concat: define_loss/upsample0/ResizeNearestNeighbor (defined at /home/yolov5-tf/Yolov5_tf/core/yolov5.py:75) define_loss/route_0/conv_route_0/LeakyRelu (defined at /home/yolov5-tf/Yolov5_tf/core/yolov5.py:55)
Input Source operations connected to node define_loss/route_0/concat: define_loss/upsample0/ResizeNearestNeighbor (defined at /home/yolov5-tf/Yolov5_tf/core/yolov5.py:75) define_loss/route_0/conv_route_0/LeakyRelu (defined at /home/yolov5-tf/Yolov5_tf/core/yolov5.py:55)
Original stack trace for 'define_loss/route_0/concat':
File "train.py", line 260, in
Did you find any thing related to this ?
core/yolov5.py : line 155
# 4096x38x38 -> 1024x38x38
input_data = conv(input_data, (1, 1, 64*init_width_size, 16*init_width_size), trainable=trainable,
name='conv%d' % (layer_num + 2), downsample=True, act_fun='mish')
downsample=True should be False
@lyghe i use your method , the error is missing. thank you .but i don't know why this working
@lyghe i use your method , the error is missing. thank you .but i don't know why this working
if u look into function conv, u will find the difference of strides.
@lyghe, I tried your method and model training started successfully. But model is not converge very well. And so that output is also not good. Any suggestions?
Thanks in advance.