Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liyinshuo committed Jun 15, 2021
1 parent 6404db2 commit 0d1f196
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mmedit/models/restorers/dic.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ def __init__(self,
self.align_loss = build_loss(align_loss)

# pretrained
if pretrained:
self.init_weights(pretrained)
self.init_weights(pretrained)

def forward(self, lq, gt=None, test_mode=False, **kwargs):
"""Forward function.
Expand Down Expand Up @@ -167,10 +166,10 @@ def forward_test(self,
# save image
if save_image:
if 'gt_path' in meta[0]:
the_path = meta[0]['gt_path']
pred_path = meta[0]['gt_path']
else:
the_path = meta[0]['lq_path']
folder_name = osp.splitext(osp.basename(the_path))[0]
pred_path = meta[0]['lq_path']
folder_name = osp.splitext(osp.basename(pred_path))[0]
if isinstance(iteration, numbers.Number):
save_path = osp.join(save_path, folder_name,
f'{folder_name}-{iteration + 1:06d}.png')
Expand Down

0 comments on commit 0d1f196

Please sign in to comment.