'Detect' object has no attribute 'nm'. Did you mean: 'm'? #12409
Unanswered
Polaris-Zhang
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I trained myself dataset,but during the training,I have face some questions:
AutoAnchor: 2.77 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset
Plotting labels to ..\runs\train-seg\exp25\labels.jpg...
Traceback (most recent call last):
File "D:\DL\yolov5-7.0\yolov5-7.0\segment\train.py", line 658, in
main(opt)
File "D:\DL\yolov5-7.0\yolov5-7.0\segment\train.py", line 554, in main
train(opt.hyp, opt, device, callbacks)
File "D:\DL\yolov5-7.0\yolov5-7.0\segment\train.py", line 254, in train
compute_loss = ComputeLoss(model, overlap=overlap) # init loss class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\DL\yolov5-7.0\yolov5-7.0\utils\segment\loss.py", line 40, in init
self.nm = m.nm # number of masks
^^^^
File "C:\Users\15401.conda\envs\pytorch\Lib\site-packages\torch\nn\modules\module.py", line 1614, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Detect' object has no attribute 'nm'. Did you mean: 'm'?
I changed the model:
parser.add_argument('--data', type=str, default=ROOT / 'data/bvn.yaml', help='dataset.yaml path') .bvn.yamal:
path: ./datasets # dataset root dir
train: images/train # train images (relative to 'path') 128 images
val: images/val # val images (relative to 'path') 128 images
test: # test images (optional)
Classes
names:
0: peach
1: cover
why?Thanks
Beta Was this translation helpful? Give feedback.
All reactions