Skip to content

Commit

Permalink
[Enhancement] Remove useless comments from MS-SSIM (#1676)
Browse files Browse the repository at this point in the history
remove useless comments from MS-SSIM
  • Loading branch information
LeoXing1996 authored Feb 28, 2023
1 parent d0bbfe5 commit c504704
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions mmedit/evaluation/metrics/ms_ssim.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,6 @@ def process(self, data_batch: dict, data_samples: Sequence[dict]) -> None:
minibatch = torch.stack(fake_imgs, dim=0)

assert minibatch.shape[0] % 2 == 0, 'batch size must be divided by 2.'
# minibatch = ((minibatch + 1) / 2)
# minibatch = minibatch.clamp_(0, 1)
# half1 = minibatch[0::2].cpu().data.numpy().transpose((0, 2, 3, 1))
# half1 = (half1 * 255).astype('uint8')
# half2 = minibatch[1::2].cpu().data.numpy().transpose((0, 2, 3, 1))
# half2 = (half2 * 255).astype('uint8')

half1 = minibatch[0::2].cpu().data.numpy().transpose((0, 2, 3, 1))
half2 = minibatch[1::2].cpu().data.numpy().transpose((0, 2, 3, 1))
Expand Down

0 comments on commit c504704

Please sign in to comment.