Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The reporting of training errors. #9

Open
vinson-xj opened this issue Mar 29, 2024 · 0 comments
Open

The reporting of training errors. #9

vinson-xj opened this issue Mar 29, 2024 · 0 comments

Comments

@vinson-xj
Copy link

Hello, may I ask if you have encountered the situation that training cannot be done after modifying block.py and head.py? The model exported after modification can indeed be used, but it seems to have an impact on normal training

AMP: running Automatic Mixed Precision (AMP) checks with YOLOv8n...
AMP: checks failed ❌. Anomalies were detected with AMP on your system that may lead to NaN losses or zero-mAP results, so AMP will be disabled during training.
train: Scanning D:\BaiduSyncdisk\CHENGXU\yolov8\ultralytics-main\ultralytics\Fruit_data\data_3new\image\apple.cache... 1170 images, 361 backgrounds, 0 corrupt: 100%|██████████| 1528/1528 [00:00<?, ?it/s]
val: Scanning D:\BaiduSyncdisk\CHENGXU\yolov8\ultralytics-main\ultralytics\Fruit_data\data_3new\image\apple.cache... 1170 images, 361 backgrounds, 0 corrupt: 100%|██████████| 1528/1528 [00:00<?, ?it/s]
PySide6/init.py: Unable to import Shiboken from D:\BaiduSyncdisk\CHENGXU\yolov8\ultralytics-main\ultralytics\Fruit_data, C:\Users\93748.conda\envs\yolov8\python38.zip, C:\Users\93748.conda\envs\yolov8\DLLs, C:\Users\93748.conda\envs\yolov8\lib, C:\Users\93748.conda\envs\yolov8, C:\Users\93748.conda\envs\yolov8\lib\site-packages, C:\Users\93748.conda\envs\yolov8\lib\site-packages\win32, C:\Users\93748.conda\envs\yolov8\lib\site-packages\win32\lib, C:\Users\93748.conda\envs\yolov8\lib\site-packages\Pythonwin
Plotting labels to runs\detect\train13\labels.jpg...
optimizer: 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically...
optimizer: SGD(lr=0.01, momentum=0.9) with parameter groups 57 weight(decay=0.0), 64 weight(decay=0.0005), 63 bias(decay=0.0)
1500 epochs...

  Epoch    GPU_mem   box_loss   cls_loss   dfl_loss  Instances       Size
 1/1500      2.23G      0.795      3.674     0.9231         34        320: 100%|██████████| 48/48 [00:07<00:00,  6.26it/s]
             Class     Images  Instances      Box(P          R      mAP50  mAP50-95):   0%|          | 0/24 [00:00<?, ?it/s]

Traceback (most recent call last):
File "D:\BaiduSyncdisk\CHENGXU\yolov8\ultralytics-main\ultralytics\Fruit_data\start.py", line 12, in
results = model.train(
File "C:\Users\93748.conda\envs\yolov8\lib\site-packages\ultralytics\engine\model.py", line 390, in train
self.trainer.train()
File "C:\Users\93748.conda\envs\yolov8\lib\site-packages\ultralytics\engine\trainer.py", line 208, in train
self._do_train(world_size)
File "C:\Users\93748.conda\envs\yolov8\lib\site-packages\ultralytics\engine\trainer.py", line 427, in _do_train
self.metrics, self.fitness = self.validate()
File "C:\Users\93748.conda\envs\yolov8\lib\site-packages\ultralytics\engine\trainer.py", line 546, in validate
metrics = self.validator(self)
File "C:\Users\93748.conda\envs\yolov8\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\Users\93748.conda\envs\yolov8\lib\site-packages\ultralytics\engine\validator.py", line 181, in call
self.loss += model.loss(batch, preds)[1]
File "C:\Users\93748.conda\envs\yolov8\lib\site-packages\ultralytics\nn\tasks.py", line 258, in loss
return self.criterion(preds, batch)
File "C:\Users\93748.conda\envs\yolov8\lib\site-packages\ultralytics\utils\loss.py", line 209, in call
anchor_points, stride_tensor = make_anchors(feats, self.stride, 0.5)
File "C:\Users\93748.conda\envs\yolov8\lib\site-packages\ultralytics\utils\tal.py", line 301, in make_anchors
_, _, h, w = feats[i].shape
ValueError: not enough values to unpack (expected 4, got 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant