Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move some fluid apis #55986

Merged
merged 7 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/paddle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
from .framework import enable_static # noqa: F401
from .framework import in_dynamic_mode # noqa: F401
from .fluid.dataset import * # noqa: F401, F403
from .fluid.lazy_init import LazyGuard # noqa: F401

from .framework.dtype import iinfo # noqa: F401
from .framework.dtype import finfo # noqa: F401
Expand Down Expand Up @@ -437,6 +436,7 @@
import paddle.vision # noqa: F401

from .tensor.random import check_shape # noqa: F401
from .nn.initializer.lazy_init import LazyGuard # noqa: F401

# CINN has to set a flag to include a lib
if is_compiled_with_cinn():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def minimize_impl(

p2s = self.create_snapshot_vars(main_block.program)
with program_guard(main_block.program, startup_program):
step = paddle.fluid.layers.autoincreased_step_counter(begin=1)
step = paddle.optimizer.lr.autoincreased_step_counter(begin=1)
k_steps = paddle.static.create_global_var(
name="k_steps",
shape=[1],
Expand Down Expand Up @@ -330,7 +330,7 @@ def minimize_impl(

p2s = self.create_snapshot_vars(main_block.program)
with program_guard(main_block.program, startup_program):
step = paddle.fluid.layers.autoincreased_step_counter(begin=1)
step = paddle.optimizer.lr.autoincreased_step_counter(begin=1)

k_steps = paddle.static.create_global_var(
name="k_steps",
Expand Down
8 changes: 3 additions & 5 deletions python/paddle/distributed/passes/ps_server_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@
import logging

import paddle
from paddle.fluid.layers.learning_rate_scheduler import (
exponential_decay,
inverse_time_decay,
noam_decay,
)
from paddle.optimizer.lr import (
ExponentialDecay,
InverseTimeDecay,
LRScheduler,
NaturalExpDecay,
NoamDecay,
exponential_decay,
inverse_time_decay,
noam_decay,
)

from ..ps.utils.public import (
Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
default_main_program,
_current_expected_place,
)
from .lazy_init import lazy_init_helper
from .framework import program_guard
import numpy as np
from .core import VarDesc
Expand Down
5 changes: 0 additions & 5 deletions python/paddle/fluid/layers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from . import nn
from .nn import *
from . import io
from .io import *
from . import math_op_patch
from .math_op_patch import *
from .learning_rate_scheduler import *
from ..layer_helper import LayerHelper


__all__ = []
__all__ += nn.__all__
__all__ += io.__all__
__all__ += learning_rate_scheduler.__all__
Loading