Skip to content

Commit

Permalink
Change in_dygraph_mode to in_dynamic_mode (#1754)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghaoshuang authored May 26, 2023
1 parent cb4c11a commit 2de33a0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions paddleslim/nas/ofa/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from ...common import get_logger
from .utils.utils import compute_start_end, get_same_padding, convert_to_list
from .layers_base import *
from paddle.framework import in_dygraph_mode

__all__ = [
'SuperConv2D', 'SuperConv2DTranspose', 'SuperSeparableConv2D',
Expand Down Expand Up @@ -985,7 +984,7 @@ def forward(self, input):
"use_global_stats", self._use_global_stats,
"trainable_statistics", trainable_statistics)

if in_dygraph_mode():
if paddle.in_dynamic_mode():
paddle_compile = os.environ.get("paddle_compile")
if feature_dim != self._mean.shape[0]:
if not paddle_compile or "Develop" in paddle_compile:
Expand Down

0 comments on commit 2de33a0

Please # to comment.