Skip to content

Commit

Permalink
fix a typo in weight_transfer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lmxyy committed Jun 13, 2020
1 parent 3bce937 commit 26d7dc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/weight_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def transfer_ConvTranspose2d(m1, m2, input_index=None, output_index=None):
assert isinstance(m1, nn.ConvTranspose2d) and isinstance(m2, nn.ConvTranspose2d)
assert output_index is None
p = m1.weight.data
if input_index is not None:
if input_index is None:
q = p.abs().sum([1, 2, 3])
_, idxs = q.topk(m2.in_channels, largest=True)
p = p[idxs]
Expand Down

0 comments on commit 26d7dc2

Please sign in to comment.