diff --git a/model_zoo/official/cv/nasnet/src/nasnet_a_mobile.py b/model_zoo/official/cv/nasnet/src/nasnet_a_mobile.py index ec92d42fcad..2be7503d68a 100755 --- a/model_zoo/official/cv/nasnet/src/nasnet_a_mobile.py +++ b/model_zoo/official/cv/nasnet/src/nasnet_a_mobile.py @@ -23,7 +23,7 @@ import mindspore.ops.functional as F import mindspore.ops.composite as C import mindspore.common.dtype as mstype from mindspore.nn.wrap.grad_reducer import DistributedGradReducer -from mindspore.train.parallel_utils import ParallelMode +from mindspore.context import ParallelMode from mindspore.parallel._utils import _get_device_num, _get_parallel_mode, _get_gradients_mean diff --git a/model_zoo/official/cv/nasnet/train.py b/model_zoo/official/cv/nasnet/train.py index 604d9d433d1..ded3713637a 100755 --- a/model_zoo/official/cv/nasnet/train.py +++ b/model_zoo/official/cv/nasnet/train.py @@ -18,7 +18,7 @@ import os from mindspore import Tensor from mindspore import context -from mindspore import ParallelMode +from mindspore.context import ParallelMode from mindspore.communication.management import init, get_rank, get_group_size from mindspore.nn.optim.rmsprop import RMSProp from mindspore.train.callback import ModelCheckpoint, CheckpointConfig, LossMonitor, TimeMonitor