@ptrblck  thank you, but it doesn’t work   
/usr/local/lib/python3.6/dist-packages/torch/_jit_internal.py in _overload_method(func)
    610         existing_lineno = _overloaded_method_class_fileno[(qual_name, class_name)]
    611         if existing_lineno != line_no:
--> 612             raise RuntimeError("Cannot currently overload the same method name in two different"
    613                                " classes with the same name in the same module")
    614 

RuntimeError: Cannot currently overload the same method name in two different classes with the same name in the same module