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

Commit

Permalink
fix pruner export (#1727)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanglang96 authored and QuanluZhang committed Nov 11, 2019
1 parent b37fbca commit 7c4e81b
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit 7c4e81b

Please sign in to comment.