forked from mindspore-Ecosystem/mindspore
!22022 [MSLITE] mindspore::api LoadConfig
Merge pull request !22022 from ling/include
This commit is contained in:
commit
7776e3ef98
|
@ -75,6 +75,13 @@ class MS_API Model {
|
|||
Status Predict(const std::vector<MSTensor> &inputs, std::vector<MSTensor> *outputs,
|
||||
const MSKernelCallBack &before = nullptr, const MSKernelCallBack &after = nullptr);
|
||||
|
||||
/// \brief Load config file.
|
||||
///
|
||||
/// \param[in] config_path config file path.
|
||||
///
|
||||
/// \return Status.
|
||||
Status LoadConfig(const std::string &config_path);
|
||||
|
||||
/// \brief Obtains all input tensors of the model.
|
||||
///
|
||||
/// \return The vector that includes all input tensors.
|
||||
|
|
|
@ -70,15 +70,16 @@ enum StatusCode : uint32_t {
|
|||
kMCInvalidArgs = kMC | 0x4,
|
||||
|
||||
// Lite // Common error code, range: [-1, -100)
|
||||
kLiteError = kLite | (0x0FFFFFFF & -1), /**< Common error code. */
|
||||
kLiteNullptr = kLite | (0x0FFFFFFF & -2), /**< NULL pointer returned.*/
|
||||
kLiteParamInvalid = kLite | (0x0FFFFFFF & -3), /**< Invalid parameter.*/
|
||||
kLiteNoChange = kLite | (0x0FFFFFFF & -4), /**< No change. */
|
||||
kLiteSuccessExit = kLite | (0x0FFFFFFF & -5), /**< No error but exit. */
|
||||
kLiteMemoryFailed = kLite | (0x0FFFFFFF & -6), /**< Fail to create memory. */
|
||||
kLiteNotSupport = kLite | (0x0FFFFFFF & -7), /**< Fail to support. */
|
||||
kLiteThreadPoolError = kLite | (0x0FFFFFFF & -8), /**< Error occur in thread pool. */
|
||||
kLiteError = kLite | (0x0FFFFFFF & -1), /**< Common error code. */
|
||||
kLiteNullptr = kLite | (0x0FFFFFFF & -2), /**< NULL pointer returned.*/
|
||||
kLiteParamInvalid = kLite | (0x0FFFFFFF & -3), /**< Invalid parameter.*/
|
||||
kLiteNoChange = kLite | (0x0FFFFFFF & -4), /**< No change. */
|
||||
kLiteSuccessExit = kLite | (0x0FFFFFFF & -5), /**< No error but exit. */
|
||||
kLiteMemoryFailed = kLite | (0x0FFFFFFF & -6), /**< Fail to create memory. */
|
||||
kLiteNotSupport = kLite | (0x0FFFFFFF & -7), /**< Fail to support. */
|
||||
kLiteThreadPoolError = kLite | (0x0FFFFFFF & -8), /**< Error occur in thread pool. */
|
||||
kLiteUninitializedObj = kLite | (0x0FFFFFFF & -9), /**< Object is not initialized. */
|
||||
kLiteFileError = kLite | (0x0FFFFFFF & -10), /**< Invalid file. */
|
||||
|
||||
// Executor error code, range: [-100,-200)
|
||||
kLiteOutOfTensorRange = kLite | (0x0FFFFFFF & -100), /**< Failed to check range. */
|
||||
|
|
Loading…
Reference in New Issue