From 122378549a37833124725ef2f3ae51f2dff4421a Mon Sep 17 00:00:00 2001 From: chenhaozhe Date: Tue, 27 Apr 2021 10:57:11 +0800 Subject: [PATCH] fix env error --- model_zoo/official/cv/mobilenetv1/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model_zoo/official/cv/mobilenetv1/train.py b/model_zoo/official/cv/mobilenetv1/train.py index 32f5452c95c..5427dbb2ee6 100755 --- a/model_zoo/official/cv/mobilenetv1/train.py +++ b/model_zoo/official/cv/mobilenetv1/train.py @@ -61,7 +61,7 @@ if __name__ == '__main__': context.set_context(mode=context.GRAPH_MODE, device_target=target, save_graphs=False) if args_opt.parameter_server: context.set_ps_context(enable_ps=True) - device_id = int(os.getenv('DEVICE_ID'), '0') + device_id = int(os.getenv('DEVICE_ID', '0')) if args_opt.run_distribute: if target == "Ascend": context.set_context(device_id=device_id, enable_auto_mixed_precision=True)