未验证 提交 7d9ca164 编写于 作者: C chentianyu03 提交者: GitHub

Remove autograd/grad api (#35579)

* remove autograd/grad api

* import grad, no_grad set_grad_enable from autograd module

* modify import no_grad_ as no_grad
上级 7ec90060
......@@ -255,9 +255,9 @@ from .framework import CUDAPlace # noqa: F401
from .framework import NPUPlace # noqa: F401
from .framework import CUDAPinnedPlace # noqa: F401
from .framework import grad # noqa: F401
from .framework import no_grad # noqa: F401
from .framework import set_grad_enabled # noqa: F401
from .autograd import grad # noqa: F401
from .autograd import no_grad # noqa: F401
from .autograd import set_grad_enabled # noqa: F401
from .framework import save # noqa: F401
from .framework import load # noqa: F401
from .framework import DataParallel # noqa: F401
......
......@@ -16,5 +16,7 @@ from ..fluid.dygraph.base import grad # noqa: F401
from . import backward_mode # noqa: F401
from .backward_mode import backward # noqa: F401
from .py_layer import PyLayer, PyLayerContext # noqa: F401
from ..framework import set_grad_enabled # noqa: F401
from ..fluid.dygraph.base import no_grad_ as no_grad # noqa: F401
__all__ = ['grad', 'backward', 'PyLayer', 'PyLayerContext']
__all__ = ['backward', 'PyLayer', 'PyLayerContext']
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册