()
| 48 | return [torch.mean(torch.abs(ig)).detach().cpu().numpy() for ig in all_hook_layer_gradiant] |
| 49 | |
| 50 | def main(): |
| 51 | root_path = osp.abspath(osp.join(__file__, osp.pardir, osp.pardir)) |
| 52 | opt, _ = parse_options(root_path, is_train=False) |
| 53 | |
| 54 | analysis = IGAnalysis(opt) |
| 55 | analysis.analyze() |
| 56 | |
| 57 | if __name__ == '__main__': |
| 58 | main() |
no test coverage detected