Commit 84a8d8d3 authored by Patrick Wieschollek's avatar Patrick Wieschollek Committed by Yuxin Wu

fix 207 (#208)

parent 77e293be
......@@ -109,13 +109,14 @@ class AugmentImageComponents(MapData):
self._nr_error = 0
def func(dp):
copy_func = lambda x: x if copy else copy_mod.deepcopy # noqa
copy_func = copy_mod.deepcopy if copy else lambda x: x # noqa
dp = copy_func(dp)
try:
im = copy_func(dp[index[0]])
im = dp[index[0]]
im, prms = self.augs._augment_return_params(im)
dp[index[0]] = im
for idx in index[1:]:
dp[idx] = self.augs._augment(copy_func(dp[idx]), prms)
dp[idx] = self.augs._augment(dp[idx], prms)
return dp
except KeyboardInterrupt:
raise
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment