Commit b0acd55c authored by Will Frey's avatar Will Frey Committed by Soumith Chintala
Browse files

Relax assertion in `transforms.Lambda.__init__` (#637)

Check if `lambd` is callable instead of checking if its a `types.Lambda` object.
parent b94e2c82
......@@ -295,7 +295,7 @@ class Lambda(object):
"""
def __init__(self, lambd):
assert isinstance(lambd, types.LambdaType)
assert callable(lambd), repr(type(lambd).__name__) + " object is not callable"
self.lambd = lambd
def __call__(self, img):
......
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