Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

fix pruner export #1727

Merged
merged 1 commit into from
Nov 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/sdk/pynni/nni/compression/torch/compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ def export_model(self, model_path, mask_path=None, onnx_path=None, input_shape=N
"""
assert model_path is not None, 'model_path must be specified'
for name, m in self.bound_model.named_modules():
if name == "":
continue
mask = self.mask_dict.get(name)
if mask is not None:
mask_sum = mask.sum().item()
Expand Down