add warning info in exportModel & modify API info in model.h

This commit is contained in:
zhangyanhui 2022-12-14 17:44:09 +08:00
parent 355e8e273b
commit def1f77dba
2 changed files with 7 additions and 3 deletions

View File

@ -151,7 +151,7 @@ class MS_API Model {
/// \return Status.
Status UpdateWeights(const std::vector<MSTensor> &new_weights);
/// \brief Inference model.
/// \brief Inference model API. If use this API in train mode, it's equal to RunStep API.
///
/// \param[in] inputs A vector where model inputs are arranged in sequence.
/// \param[out] outputs Which is a pointer to a vector. The model outputs are filled in the container in sequence.
@ -162,7 +162,7 @@ class MS_API Model {
Status Predict(const std::vector<MSTensor> &inputs, std::vector<MSTensor> *outputs,
const MSKernelCallBack &before = nullptr, const MSKernelCallBack &after = nullptr);
/// \brief Inference model.
/// \brief Inference model API. If use this API in train mode, it's equal to RunStep API.
///
/// \param[in] before CallBack before predict.
/// \param[in] after CallBack after predict.
@ -170,7 +170,7 @@ class MS_API Model {
/// \return Status.
Status Predict(const MSKernelCallBack &before = nullptr, const MSKernelCallBack &after = nullptr);
/// \brief Run model by step.
/// \brief Training API. Run model by step.
///
/// \param[in] before CallBack before RunStep.
/// \param[in] after CallBack after RunStep.

View File

@ -25,6 +25,7 @@
#include "include/train/train_cfg.h"
#include "src/litert/inner_context.h"
#include "src/litert/c_api/context_c.h"
#include "src/common/log_adapter.h"
namespace mindspore {
class ContextUtils {
@ -59,6 +60,9 @@ inline lite::QuantizationType A2L_ConvertQT(mindspore::QuantizationType qt) {
if (qt == kWeightQuant) {
return lite::QT_WEIGHT;
}
if (qt == kFullQuant || qt == kUnknownQuantType) {
MS_LOG(WARNING) << qt << " does not support, set the quantizationType to default.";
}
return lite::QT_DEFAULT;
}