yolov5-face icon indicating copy to clipboard operation
yolov5-face copied to clipboard

when I train with widerface,error occured

Open futureflsl opened this issue 3 years ago • 4 comments

Traceback (most recent call last): File "train.py", line 513, in train(hyp, opt, device, tb_writer, wandb) File "train.py", line 299, in train scaler.step(optimizer) # optimizer.step File "/home/fut/miniconda3/lib/python3.8/site-packages/torch/cuda/amp/grad_scaler.py", line 321, in step retval = optimizer.step(*args, **kwargs) File "/home/fut/miniconda3/lib/python3.8/site-packages/torch/optim/lr_scheduler.py", line 67, in wrapper return wrapped(*args, **kwargs) File "/home/fut/miniconda3/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context return func(*args, **kwargs) File "/home/fut/miniconda3/lib/python3.8/site-packages/torch/optim/sgd.py", line 106, in step buf.mul_(momentum).add_(d_p, alpha=1 - dampening) RuntimeError: The size of tensor a (32) must match the size of tensor b (24) at non-singleton dimension 0

futureflsl avatar May 31 '21 07:05 futureflsl

+1

Bohrhh avatar Jun 09 '21 02:06 Bohrhh

@derronqi same question

yongjingli avatar Jun 21 '21 08:06 yongjingli

+1

ssmy199 avatar Jul 01 '21 05:07 ssmy199

Change yolov5s-face.pt to yolov5 official file>>yolov5s.pt,this is my solution

ssmy199 avatar Jul 01 '21 07:07 ssmy199