问题描述
在修改resume
参数进行断点训练时可能会出现yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object/apply:pathlib.PosixPath' in "runs/train/exp7/opt.yaml", line 42, column 11
这个报错
解决方法
出现这个问题的原因是opt.yaml
文件的save_dir
字段出现问题
只需要将save_dir
字段的值修改为runs/train/exp7
再运行train.py
就可以解决问题
runs/train/exp7
这个字段要视情况而定,总之要将save_dir
字段设置在上一次训练停下来的文件夹位置