Function MSExportWeightsCollaborateWithMicro

Function Documentation

MSStatus MSExportWeightsCollaborateWithMicro(MSModelHandle model, MSModelType model_type, const char *weight_file, bool is_inference, bool enable_fp16, char **changeable_weights_name, size_t num)

Export model's weights, which can be used in micro only. Only valid for Lite Train.

参数
  • model[in] The model data.

  • model_type[in] The model file type.

  • weight_file[in] The path of exported weight file.

  • is_inference[in] Whether to export weights from a reasoning model. Currently, only support this is true.

  • enable_fp16[in] Float-weight is whether to be saved in float16 format.

  • changeable_weights_name[in] The set the name of these weight tensors, whose shape is changeable.

  • num[in] The number of changeable_weights_name.

返回

MSStatus.