pytorch-YOLOv4
pytorch-YOLOv4 copied to clipboard
Train problem
when I train my own dataset ,I met a problem and the train process is ended,please help me
(base) E:\pytorch-YOLOv4-master>python train.py -l 0.001 -g 4 -pretrained ./yolov.pth -classes 2 -dir ./train/ log file path:log\log_2020-08-11_11-29-44.txt 2020-08-11 11:29:45,591 train.py[line:611] INFO: Using device cpu convalution havn't activate linear convalution havn't activate linear convalution havn't activate linear 2020-08-11 11:29:45,928 train.py[line:327] INFO: Starting training: Epochs: 10 Batch size: 4 Subdivisions: 4 Learning rate: 0.001 Training size: 12 Validation size: 12 Checkpoints: True Device: cpu Images size: 608 Optimizer: sgd Dataset classes: 2 Train label path:train.txt Pretrained:
Epoch 1/10: 33%|▎| 4/12 [00:39<01:19, 9.91s/img]
Traceback (most recent call last):
File "train.py", line 626, in
I met this problem, too. do u solve it?
in binary_cross_entropy input, target, weight, reduction_enum) RuntimeError: all elements of input should be between 0 and 1
Binary Crossentropy loss must have inputs between 0 and 1. Your labels are not between 0 and 1. I don't think you want to use binary crossentropy.
See this document for how to train yolov4 pytorch. Use Google Translate if you need: https://github.com/Tianxiaomo/pytorch-YOLOv4/blob/master/Use_yolov4_to_train_your_own_data.md
Alternatively, you can train yolov4 natively with AlexeyAB's Darknet, then use pytorchyolov4 to convert the .weights file to pytorch weights. This option is more robust in my experience. https://github.com/AlexeyAB/darknet
I met this problem, too. do u solve it?
in binary_cross_entropy input, target, weight, reduction_enum) RuntimeError: all elements of input should be between 0 and 1
Hello, i meet the same problem, did you solve it?
in binary_cross_entropy input, target, weight, reduction_enum) RuntimeError: all elements of input should be between 0 and 1
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。