Closed Gaoang112 closed 3 years ago
剪枝之后如果精度归零了,你需要retrain一下。我刚才剪了一下yolov4tiny,我是可以生成cfg文件的
@Gaoang112 你查询一下, 应该是文件目录或者是 路径的问题;
@SpursLipu yolov4tiny您那边剪完之后,用detect.py可以加载对应pt文件吗?我这边会报这样子的错误:_pickle.UnpicklingError: invalid load key, '\x00'.
@lh-13 你好,我也有这个问题,请问你解决了吗
@lh-13 我找到我的问题了,在我调用normal_prune.py时,save_weights 这个函数本来保存的就是darknet格式的权重,但是文件结尾却是pt,调用convert.py时候就会报错
@ly0303521 @lh-13 问题已解决
Traceback (most recent call last): File "normal_prune.py", line 225, in
pruned_cfg_file = write_cfg(pruned_cfg_name, [model.hyperparams.copy()] + compact_module_defs)
File "/home/ga/YOLOv3v4/utils/prune_utils.py", line 125, in write_cfg
with open(cfg_file, 'w') as f:
IsADirectoryError: [Errno 21] Is a directory: 'cfg/prune_0.5_yolov4-tiny.cfg'