PaddleDetection/slim/sensitive 如何分析敏感度信息
Created by: llzhaoshuo
对yolov3_r50vd_dcn_db_iouaware_obj365_pretrained_coco.yml进行剪枝,在执行到分析敏感度时遇到了一个问题,如何将敏感度信息可视化以及如何确定剪枝率,官网中并没有详细说明。 涉及到剪枝的卷积层如下: --pruned_params "yolo_block.0.0.0.conv.weights,yolo_block.0.0.1.conv.weights,yolo_block.0.1.0.conv.weights,yolo_block.0.1.1.conv.weights,yolo_block.0.2.conv.weights,yolo_block.0.tip.conv.weights,yolo_block.1.0.0.conv.weights,yolo_block.1.0.1.conv.weights,yolo_block.1.1.0.conv.weights,yolo_block.1.1.1.conv.weights,yolo_block.1.2.conv.weights,yolo_block.1.tip.conv.weights,yolo_block.2.0.0.conv.weights,yolo_block.2.0.1.conv.weights,yolo_block.2.1.0.conv.weights,yolo_block.2.1.1.conv.weights,yolo_block.2.2.conv.weights,yolo_block.2.tip.conv.weights"
官网给的信息如下: 分析敏感度信息 1.可以通过paddleslim.prune.load_sensitivities从文件中加载敏感度信息,并使用Python数据分析工具画图分析。下图展示了MobileNetv1-YOLOv3-VOC模型在VOC数据上的敏感度信息: 通过画图分析,可以确定一组合适的剪裁率 2.通过paddleslim.prune.get_ratios_by_loss获得合适的剪裁率。 官方给定demo: paddleslim.prune.load_sensitivities import pickle from paddleslim.prune import load_sensitivities sen = {"weight_0": {0.1: 0.22, 0.2: 0.33 }, "weight_1": {0.1: 0.21, 0.2: 0.4 } } sensitivities_file = "sensitive_api_demo.data" with open(sensitivities_file, 'w') as f: pickle.dump(sen, f) sensitivities = load_sensitivities(sensitivities_file) print(sensitivities)
我的问题是: sen = {"weight_0": {0.1: 0.22, 0.2: 0.33 }, "weight_1": {0.1: 0.21, 0.2: 0.4 } } 上面的weight_0和weight_1是什么含义,如何根据卷积层修改