Skip to content

Commit

Permalink
fix: normalize redundant loop (open-mmlab#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
hejm37 authored Jul 26, 2020
1 parent 7794b00 commit d152e15
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mmedit/datasets/pipelines/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ def __call__(self, results):
"""
for key in self.keys:
if isinstance(results[key], list):
for v in results[key]:
results[key] = [
mmcv.imnormalize(v, self.mean, self.std, self.to_rgb)
for v in results[key]
]
results[key] = [
mmcv.imnormalize(v, self.mean, self.std, self.to_rgb)
for v in results[key]
]
else:
results[key] = mmcv.imnormalize(results[key], self.mean,
self.std, self.to_rgb)
Expand Down

0 comments on commit d152e15

Please sign in to comment.