espnet.transform.functional.FuncTrans
Less than 1 minute
espnet.transform.functional.FuncTrans
class espnet.transform.functional.FuncTrans(**kwargs)
Bases: TransformInterface
Functional Transformation
WARNING
Builtin or C/C++ functions may not work properly because this class heavily depends on the inspect module.
Usage:
>>> def foo_bar(x, a=1, b=2):
...     '''Foo bar
...     :param x: input
...     :param int a: default 1
...     :param int b: default 2
...     '''
...     return x + a - b>>> class FooBar(FuncTrans):
...     _func = foo_bar
...     __doc__ = foo_bar.__doc__classmethod add_arguments(parser)
classmethod default_params()
property func
