Commit 68b8a7b7 authored by Yuxin Wu's avatar Yuxin Wu

_init(locals()) set everything except for self and privates. fix #893

parent 4a917d6e
......@@ -25,7 +25,7 @@ class Augmentor(object):
def _init(self, params=None):
if params:
for k, v in params.items():
if k != 'self':
if k != 'self' and not k.startswith('_'):
setattr(self, k, v)
def reset_state(self):
......
......@@ -42,7 +42,7 @@ class ImageTransform(object):
def _init(self, params=None):
if params:
for k, v in params.items():
if k != 'self':
if k != 'self' and not k.startswith('_'):
setattr(self, k, v)
@abstractmethod
......
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