diff --git a/tensorflow/python/util/function_utils.py b/tensorflow/python/util/function_utils.py index a56dfbff8e3..c2a7f1fbfc7 100644 --- a/tensorflow/python/util/function_utils.py +++ b/tensorflow/python/util/function_utils.py @@ -55,7 +55,7 @@ def fn_args(fn): fn = fn.__call__ args = tf_inspect.getfullargspec(fn).args if _is_bounded_method(fn): - args.remove('self') + args.pop(0) # remove `self` or `cls` return tuple(args)