Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cszn authored Mar 30, 2019
1 parent a276e84 commit eb45f53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import torch.nn as nn


def merge_bn(model):
r''' merge all 'Conv+BN' (or 'TConv+BN') into 'Conv' (or 'TConv')
''' merge all 'Conv+BN' (or 'TConv+BN') into 'Conv' (or 'TConv')
based on https://github.com/pytorch/pytorch/pull/901
by Kai Zhang ([email protected])
https://github.com/cszn/DnCNN
Expand Down Expand Up @@ -52,12 +52,12 @@ def merge_bn(model):
merge_bn(m)


def deploy_sequential(model):
def tidy_sequential(model):
for k, m in list(model.named_children()):
if isinstance(m, nn.Sequential):
if m.__len__() == 1:
model._modules[k] = m.__getitem__(0)
deploy_sequential(m)
tidy_sequential(m)

```

Expand Down

0 comments on commit eb45f53

Please sign in to comment.