Commit c77433d5 authored by Yuxin Wu's avatar Yuxin Wu

small sanity check

parent 75925343
......@@ -65,6 +65,7 @@ def layer_register(
def wrapper(func):
@wraps(func)
def wrapped_func(*args, **kwargs):
assert args[0] is not None, args
if use_scope:
name, inputs = args[0], args[1]
args = args[1:] # actual positional args used to call func
......
......@@ -81,6 +81,8 @@ class TrainConfig(object):
assert_type(self.data, InputData)
self.dataflow = None
if callbacks is None:
callbacks = []
if isinstance(callbacks, Callbacks):
# keep quiet now because I haven't determined the final API yet.
log_deprecated(
......
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