Skip to content

Commit

Permalink
Update svd_layer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
juliagusak authored Feb 16, 2021
1 parent e3e0822 commit 74b9f4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions musco/pytorch/compressor/decompositions/svd_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ def __init__(self, layer, layer_name,
self.rank = rank
elif rank_selection == 'param_reduction':
if isinstance(self.layer, nn.Sequential):
prev_rank = self.layer[0].out_features
prev_rank = self.layer[0].out_channels
else:
prev_rank = None

self.rank = estimate_rank_for_compression_rate((self.out_features, self.in_features),
self.rank = estimate_rank_for_compression_rate((self.out_channels, self.in_channels),
rate = param_reduction_rate,
key = 'svd',
prev_rank = prev_rank,
Expand Down

0 comments on commit 74b9f4a

Please sign in to comment.