diff --git a/mindspore/lite/java/java/fl_client/src/main/java/com/mindspore/flclient/model/Client.java b/mindspore/lite/java/java/fl_client/src/main/java/com/mindspore/flclient/model/Client.java index 40d9c70fe57..dc04f16b96f 100644 --- a/mindspore/lite/java/java/fl_client/src/main/java/com/mindspore/flclient/model/Client.java +++ b/mindspore/lite/java/java/fl_client/src/main/java/com/mindspore/flclient/model/Client.java @@ -277,13 +277,13 @@ public abstract class Client { Model model = new Model(); boolean isSuccess = model.loadModel(modelPath); if (!isSuccess) { - logger.severe(Common.addTag("load model failed:" + modelPath)); + logger.severe(Common.addTag("load model failed:" + modelPath+" ,please check model is valid or disk" + + "space is enough,please check lite log for detail.")); return Optional.empty(); } trainSession = LiteSession.createSession(msConfig); if (trainSession == null) { - logger.severe(Common.addTag("init session failed,please check model :" + modelPath + " is valid or " + - "disk space is enough")); + logger.severe(Common.addTag("init session failed.please check lite log for detail.")); msConfig.free(); model.free(); return Optional.empty(); @@ -291,7 +291,7 @@ public abstract class Client { msConfig.free(); isSuccess = trainSession.compileGraph(model); if (!isSuccess) { - logger.severe(Common.addTag("compile graph failed:" + modelPath)); + logger.severe(Common.addTag("compile graph failed,please check lite log for detail.")); model.free(); trainSession.free(); return Optional.empty(); @@ -302,7 +302,7 @@ public abstract class Client { trainSession = TrainSession.createTrainSession(modelPath, msConfig, false); if (trainSession == null) { logger.severe(Common.addTag("init session failed,please check model :" + modelPath + " is valid or " + - "disk space is enough")); + "disk space is enough.please check lite log for detail.")); return Optional.empty(); } return Optional.of(trainSession); diff --git a/mindspore/lite/src/runtime/kernel/arm/base/reduce_base.cc b/mindspore/lite/src/runtime/kernel/arm/base/reduce_base.cc index 9d09724c6c1..b0b15134ac3 100644 --- a/mindspore/lite/src/runtime/kernel/arm/base/reduce_base.cc +++ b/mindspore/lite/src/runtime/kernel/arm/base/reduce_base.cc @@ -106,7 +106,7 @@ int ReduceBaseCPUKernel::Prepare() { MS_CHECK_FALSE_MSG((axes_tensor->data_type() != kNumberTypeInt && axes_tensor->data_type() != kNumberTypeInt32), RET_ERROR, "The data type of axes tensor should be int32"); num_axes_ = axes_tensor->ElementsNum(); - if (num_axes_ <= 0 || num_axes_ > MAX_SHAPE_SIZE) { + if (axes_tensor->data() != nullptr && (num_axes_ <= 0 || num_axes_ > MAX_SHAPE_SIZE)) { MS_LOG(ERROR) << "input axes invalid."; return RET_ERROR; }