Skip to content
Snippets Groups Projects
Commit 2710c3fc authored by Anjith GEORGE's avatar Anjith GEORGE
Browse files

Fixes error in transform

parent 319a4369
Branches
Tags
1 merge request!20Mccn trainer
Pipeline #26980 passed
...@@ -274,9 +274,11 @@ class RandomHorizontalFlipImage(object): ...@@ -274,9 +274,11 @@ class RandomHorizontalFlipImage(object):
""" """
if numpy.random.random() < self.p: if numpy.random.random() < self.p:
img=numpy.fliplr(img) imgn=numpy.fliplr(img).copy()
else:
imgn=img.copy()
return img return imgn
def __repr__(self): def __repr__(self):
return self.__class__.__name__ + '(Flipping Probability={})'.format(self.p) return self.__class__.__name__ + '(Flipping Probability={})'.format(self.p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment