From 95ab395eef8288f1612b479838c065a2d43c4cf2 Mon Sep 17 00:00:00 2001 From: Xiaoquan Kong Date: Mon, 19 Nov 2018 18:59:25 +0800 Subject: [PATCH] Bugfix: remove first arg instead of `self` to make the function more robust and worked for classmethod --- tensorflow/python/util/function_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)