AttributeError: 'NoneType' object has no attribute 'items'

报错内容

Namespace(adam=False, artifact_alias='latest', batch_size=16, bbox_interval=-1, bucket='', cache_images=False, cfg='', data='D:\\study\\yolov5-5.0\\data\\mydata.yaml', device='', entity=None, epochs=300, evolve=False, exist_ok=False, global_rank=-1, hyp='data/hyp.scratch.yaml', image_weights=False, img_size=[640, 640], label_smoothing=0.0, linear_lr=False, local_rank=-1, multi_scale=False, name='exp', noautoanchor=False, nosave=False, notest=False, project='runs/train', quad=False, rect=False, resume=False, save_dir='runs\\train\\exp14', save_period=-1, single_cls=False, sync_bn=False, total_batch_size=16, upload_dataset=False, weights='yolov5s.pt', workers=0, world_size=1)
tensorboard: Start with 'tensorboard --logdir runs/train', view at http://localhost:6006/
Traceback (most recent call last):
  File "D:/study/yolov5-5.0/train.py", line 543, in <module>
    train(hyp, opt, device, tb_writer)
  File "D:/study/yolov5-5.0/train.py", line 42, in train
    logger.info(colorstr('hyperparameters: ') + ', '.join(f'{k}={v}' for k, v in hyp.items()))
AttributeError: 'NoneType' object has no attribute 'items'

第42行内容

def train(hyp, opt, device, tb_writer=None):
    logger.info(colorstr('hyperparameters: ') + ', '.join(f'{k}={v}' for k, v in hyp.items()))
    save_dir, epochs, batch_size, total_batch_size, weights, rank = \
        Path(opt.save_dir), opt.epochs, opt.batch_size, opt.total_batch_size, opt.weights, opt.global_rank

第543行内容

train(hyp, opt, device, tb_writer)

你print(hyp)看看数据内容,它应该是一个None,然后看看那里调用train函数,,,分析这个函数参数hyp

同问,请问博主解决了吗