(self, opt)
| 14 | self.mask_generator.eval() |
| 15 | |
| 16 | def _load_mask_generator(self, opt): |
| 17 | mask_opt = opt.get('network_mask', {}) |
| 18 | mask_generator = build_network(mask_opt).to(self.device) |
| 19 | mask_path_opt = opt.get('net_mask_path', {}) |
| 20 | mask_path = mask_path_opt.get('path', None) |
| 21 | self.load_network( |
| 22 | mask_generator, |
| 23 | mask_path, |
| 24 | strict=mask_path_opt.get('strict_load', True), |
| 25 | param_key=mask_path_opt.get('param_key', 'params') |
| 26 | ) |
| 27 | mask_generator.eval() |
| 28 | return mask_generator |
| 29 | |
| 30 | def analyze(self): |
| 31 | total_filter_mac = [0.0] * len(self.hook_list) |
no test coverage detected