when i train my datasets,after i execute “python train.py --model_def config\yolov3.cfg --data_config config\custom.data --pretrained_weights weights\darknet53.conv.74“ in cmd,it gives me the following "Runtime error":
Traceback (most recent call last):
File "train.py", line 99, in
for batch_i, (_, imgs, targets) in enumerate(dataloader):
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 568, in __next__
return self._process_next_batch(batch)
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data_utils\worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data_utils\worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "C:\Users\Administrator.SC-201907191055\Desktop\PyTorch-YOLOv3-master\utils\datasets.py", line 121, in __getitem__
boxes[:, 3] *= w_factor / padded_w
RuntimeError: Trying to resize storage that is not resizable at ..\aten\src\TH\THStorageFunctions.cpp:76
i don't know why,please help me.thank you.
by the way,the cfg file named "yolov3.cfg" was edited according to my datasets' classes,the classes are 2 and fliiters is 21
I also met the problem,but it told me that it could't find the file
我也遇到同样的报错,解决了.我这边出现这个问题的原因是trian中某个图像文件对应的标签文件为空,剔除掉后,问题就解决了.(for English speaker: I met the same "Runtime error" as you and have solved it.I fond that there were some image files for training get an empty labels files(.txt).After I deleted it from my train date sets,every thing goes right. )
he same "Runtime error" as you and have solved it.I fond that there were some image files for training get an empty labels files(.txt).After I deleted it from my train date sets,every thing goes right.
solve it ,thank u !
确实是因为某张图片对应的txt标注文件中是空的,导致了这个报错。
when i use bdd100k:100k detection to train yolov3-pytorch, this occurs in with 2019d3d4-f10fe8c4.txt
additionaly, 100k only have 69863 training lables(including the 2019d3d4-f10fe8c4.txt)
may help your to save time.
--southeast university ins department auto-lab
Most helpful comment
我也遇到同样的报错,解决了.我这边出现这个问题的原因是trian中某个图像文件对应的标签文件为空,剔除掉后,问题就解决了.(for English speaker: I met the same "Runtime error" as you and have solved it.I fond that there were some image files for training get an empty labels files(.txt).After I deleted it from my train date sets,every thing goes right. )