Browse Source

modify export air and ckpt file authority

tags/v1.6.0
changzherui 4 years ago
parent
commit
06ec804b09
3 changed files with 4 additions and 1 deletions
  1. +2
    -0
      mindspore/ccsrc/transform/graph_ir/convert.cc
  2. +1
    -1
      mindspore/python/mindspore/train/callback/_loss_monitor.py
  3. +1
    -0
      mindspore/python/mindspore/train/serialization.py

+ 2
- 0
mindspore/ccsrc/transform/graph_ir/convert.cc View File

@@ -1880,6 +1880,8 @@ void DfGraphConvertor::SaveParamFormat(const CNodePtr node) {
} else {
CheckAndConvertUtils::GetFormatStringVal(prim, &format);
}
} else if (attr.second->isa<StringImm>()) {
format = attr.second->ToString();
}
if (format != "NCDHW" && format != "NHWC") {
break;


+ 1
- 1
mindspore/python/mindspore/train/callback/_loss_monitor.py View File

@@ -31,7 +31,7 @@ class LossMonitor(Callback):

Args:
per_print_times (int): How many steps to print once loss. During sink mode, it will print loss in the
nearest step. Default: 1.
nearest step. Default: 1.

Raises:
ValueError: If per_print_times is not an integer or less than zero.


+ 1
- 0
mindspore/python/mindspore/train/serialization.py View File

@@ -160,6 +160,7 @@ def _exec_save(ckpt_file_name, data_list, enc_key=None, enc_mode="AES-GCM"):
try:
with _ckpt_mutex:
if os.path.exists(ckpt_file_name):
os.chmod(ckpt_file_name, stat.S_IWUSR)
os.remove(ckpt_file_name)
with open(ckpt_file_name, "ab") as f:
if enc_key is not None:


Loading…
Cancel
Save