From 0790ef8a85d624040e444650f681cce82e5d1a20 Mon Sep 17 00:00:00 2001 From: jinyaohui Date: Thu, 9 Apr 2020 09:23:39 +0800 Subject: [PATCH] modify comment --- example/yolov3_coco2017/train.py | 2 +- mindspore/ccsrc/pipeline/pipeline_ge.cc | 2 +- mindspore/ccsrc/transform/convert.cc | 2 +- mindspore/nn/wrap/loss_scale.py | 2 +- tests/ut/python/utils/test_callback.py | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/example/yolov3_coco2017/train.py b/example/yolov3_coco2017/train.py index 0a32a6d30dc..121e2aa810f 100644 --- a/example/yolov3_coco2017/train.py +++ b/example/yolov3_coco2017/train.py @@ -67,7 +67,7 @@ if __name__ == '__main__': parser.add_argument("--distribute", type=bool, default=False, help="Run distribute, default is false.") parser.add_argument("--device_id", type=int, default=0, help="Device id, default is 0.") parser.add_argument("--device_num", type=int, default=1, help="Use device nums, default is 1.") - parser.add_argument("--mode", type=str, default="sink", help="Run sink mode or non-sink mode, default is sink") + parser.add_argument("--mode", type=str, default="sink", help="Run sink mode or not, default is sink") parser.add_argument("--epoch_size", type=int, default=10, help="Epoch size, default is 10") parser.add_argument("--batch_size", type=int, default=32, help="Batch size, default is 32.") parser.add_argument("--checkpoint_path", type=str, default="", help="Checkpoint file path") diff --git a/mindspore/ccsrc/pipeline/pipeline_ge.cc b/mindspore/ccsrc/pipeline/pipeline_ge.cc index 60960a2eb77..6ce0ea53168 100644 --- a/mindspore/ccsrc/pipeline/pipeline_ge.cc +++ b/mindspore/ccsrc/pipeline/pipeline_ge.cc @@ -453,7 +453,7 @@ void ProcessGeArg(const std::map& info, const py:: } // process the first args of tensor - // only in Dataset non-sink Mode, fp_bp graph need input tensors + // only in dataset normal(non-sink) mode, fp_bp graph need input tensors if (ConfigManager::GetInstance().dataset_mode() == DS_NORMAL_MODE) { for (std::size_t i = 0; i < size; i++) { ValuePtr converted = nullptr; diff --git a/mindspore/ccsrc/transform/convert.cc b/mindspore/ccsrc/transform/convert.cc index 24b0188fa11..c9a27a26070 100755 --- a/mindspore/ccsrc/transform/convert.cc +++ b/mindspore/ccsrc/transform/convert.cc @@ -447,7 +447,7 @@ void DfGraphConvertor::InitLoopVar(std::vector *init_input) { if (ConfigManager::GetInstance().dataset_mode() == DS_SINK_MODE) { value = ConfigManager::GetInstance().iter_num(); } else { - MS_LOG(INFO) << "Run with non-sink mode, the iterator number will always be 1"; + MS_LOG(INFO) << "Run with normal(non-sink) mode, the iterator number will always be 1"; value = 1; ConfigManager::GetInstance().set_iter_num(value); } diff --git a/mindspore/nn/wrap/loss_scale.py b/mindspore/nn/wrap/loss_scale.py index fd1c22be1fd..c6d61e6983a 100644 --- a/mindspore/nn/wrap/loss_scale.py +++ b/mindspore/nn/wrap/loss_scale.py @@ -51,7 +51,7 @@ class DynamicLossScaleUpdateCell(Cell): In every training step, the loss scaling value will be updated by loss scaling value/`scale_factor` when there is overflow. And it will be increased by loss scaling value * `scale_factor` if there is no overflow for a continuous `scale_window` steps. This cell is used for Graph mode training in which all - logic will be executed on device side(Another training mode is non-sink mode in which some logic will be + logic will be executed on device side(Another training mode is normal(non-sink) mode in which some logic will be executed on host). Args: diff --git a/tests/ut/python/utils/test_callback.py b/tests/ut/python/utils/test_callback.py index 7e7b893e0c1..8c10c8886d0 100644 --- a/tests/ut/python/utils/test_callback.py +++ b/tests/ut/python/utils/test_callback.py @@ -112,8 +112,8 @@ def test_save_checkpoint(): os.remove('./test_files/test_ckpt-model.pkl') -def test_loss_monitor_sink_model(): - """Test loss monitor sink model.""" +def test_loss_monitor_sink_mode(): + """Test loss monitor sink mode.""" cb_params = _InternalCallbackParam() cb_params.cur_epoch_num = 4 cb_params.cur_step_num = 2 @@ -131,8 +131,8 @@ def test_loss_monitor_sink_model(): callbacklist.end(run_context) -def test_loss_monitor_feed_model(): - """Test loss monitor non-sink mode.""" +def test_loss_monitor_normal_mode(): + """Test loss monitor normal(non-sink) mode.""" cb_params = _InternalCallbackParam() run_context = RunContext(cb_params) loss_cb = LossMonitor(1)