Commit db36b929 authored by Patrick Wieschollek's avatar Patrick Wieschollek Committed by Yuxin Wu

more verbose warning (#561)

parent 28ae84d8
...@@ -82,7 +82,8 @@ def layer_register( ...@@ -82,7 +82,8 @@ def layer_register(
if use_scope: if use_scope:
name, inputs = args[0], args[1] name, inputs = args[0], args[1]
args = args[1:] # actual positional args used to call func args = args[1:] # actual positional args used to call func
assert isinstance(name, six.string_types), name assert isinstance(name, six.string_types), "First argument for \"{}\" should be a string. ".format(
func.__name__) + "Did you forget to specify the name of the layer?"
else: else:
assert not log_shape assert not log_shape
if isinstance(args[0], six.string_types): if isinstance(args[0], six.string_types):
......
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