deprecated

paddle.utils. deprecated ( update_to='', since='', reason='' ) [source]

Decorate a function to signify its deprecation.

This function wraps a method that will soon be removed and does two things:
  • The docstring of the API will be modified to include a notice about deprecation.”

  • Raises a DeprecatedWarning when old API is called.

Parameters
  • since (str) – The version at which the decorated method is considered deprecated.

  • update_to (str) – The new API users should use.

  • reason (str) – The reason why the API is deprecated.

Returns

decorated function or class.

Return type

decorator