Browse Source

!1256 change default enable_auto_mixed_precision form true to false

Merge pull request !1256 from gengdongjie/master
tags/v0.3.0-alpha
mindspore-ci-bot Gitee 6 years ago
parent
commit
2e9206e8bb
4 changed files with 8 additions and 6 deletions
  1. +2
    -1
      example/resnet101_imagenet2012/train.py
  2. +2
    -2
      example/resnet50_cifar10/train.py
  3. +3
    -2
      example/resnet50_imagenet2012/train.py
  4. +1
    -1
      mindspore/ccsrc/utils/context/ms_context.cc

+ 2
- 1
example/resnet101_imagenet2012/train.py View File

@@ -49,7 +49,8 @@ args_opt = parser.parse_args()

device_id = int(os.getenv('DEVICE_ID'))

context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=False, device_id=device_id)
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=False, device_id=device_id,
enable_auto_mixed_precision=True)

if __name__ == '__main__':
if not args_opt.do_eval and args_opt.run_distribute:


+ 2
- 2
example/resnet50_cifar10/train.py View File

@@ -41,8 +41,8 @@ args_opt = parser.parse_args()

device_id = int(os.getenv('DEVICE_ID'))

context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=False)
context.set_context(device_id=device_id)
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=False, device_id=device_id,
enable_auto_mixed_precision=True)

if __name__ == '__main__':
if not args_opt.do_eval and args_opt.run_distribute:


+ 3
- 2
example/resnet50_imagenet2012/train.py View File

@@ -43,8 +43,9 @@ args_opt = parser.parse_args()

device_id = int(os.getenv('DEVICE_ID'))

context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=False)
context.set_context(device_id=device_id)

context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=False, device_id=device_id,
enable_auto_mixed_precision=True)

if __name__ == '__main__':
if not args_opt.do_eval and args_opt.run_distribute:


+ 1
- 1
mindspore/ccsrc/utils/context/ms_context.cc View File

@@ -72,7 +72,7 @@ MsContext::MsContext(const std::string &policy, const std::string &target) {
enable_mem_reuse_ = true;
enable_gpu_summary_ = true;
precompile_only_ = false;
auto_mixed_precision_flag_ = true;
auto_mixed_precision_flag_ = false;
enable_pynative_infer_ = false;
enable_dynamic_mem_pool_ = true;
graph_memory_max_size_ = "0";


Loading…
Cancel
Save