From d39d8bee4ee34d44f7012a0e5715f00f3ea31a90 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Thu, 20 Feb 2020 17:57:19 +0800 Subject: [PATCH] unexpose tracer, test=develop (#22661) --- python/paddle/fluid/dygraph/__init__.py | 1 - python/paddle/fluid/dygraph/tracer.py | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/python/paddle/fluid/dygraph/__init__.py b/python/paddle/fluid/dygraph/__init__.py index 44378a1c6f..7ce43d900a 100644 --- a/python/paddle/fluid/dygraph/__init__.py +++ b/python/paddle/fluid/dygraph/__init__.py @@ -49,7 +49,6 @@ __all__ += layers.__all__ __all__ += base.__all__ __all__ += container.__all__ __all__ += nn.__all__ -__all__ += tracer.__all__ __all__ += parallel.__all__ __all__ += checkpoint.__all__ __all__ += learning_rate_scheduler.__all__ diff --git a/python/paddle/fluid/dygraph/tracer.py b/python/paddle/fluid/dygraph/tracer.py index a753e465c6..2d2e238d62 100644 --- a/python/paddle/fluid/dygraph/tracer.py +++ b/python/paddle/fluid/dygraph/tracer.py @@ -20,12 +20,16 @@ from collections import defaultdict from paddle.fluid import core from paddle.fluid import framework -__all__ = ['Tracer'] - class Tracer(core.Tracer): """ - Python wrapper of dygraph tracer + Tracer is used to execute and record the operators executed, to construct the + computation graph in dygraph model. Tracer has two mode, :code:`train_mode` + and :code:`eval_mode`. In :code:`train_mode`, Tracer would add backward network + automatically and perform AutoGrad by method :code:`loss.backward()`. + In :code:`eval_mode`, Tracer would not add backward network. + + This is a low level API, users don't need to use it directly. """ def __init__(self): -- GitLab