forked from mindspore-Ecosystem/mindspore
modify headerfile
This commit is contained in:
parent
baa4a8864b
commit
cad10c0de1
|
@ -37,7 +37,7 @@ class MixPrecisionCfg {
|
|||
|
||||
~MixPrecisionCfg() = default;
|
||||
|
||||
bool dynamic_loss_scale_ = false; /**< Enable\disable dynamic loss scale during mix precision training */
|
||||
bool dynamic_loss_scale_ = false; /**< Enable/disable dynamic loss scale during mix precision training */
|
||||
float loss_scale_; /**< Initial loss scale factor */
|
||||
bool keep_batchnorm_fp32_ = true; /**< Keep batch norm in FP32 while training */
|
||||
uint32_t num_of_not_nan_iter_th_; /**< a threshold for modifying loss scale when dynamic loss scale is enabled */
|
||||
|
|
|
@ -128,7 +128,7 @@ class MS_API Model {
|
|||
/// \param[in] backbone The static, non-learnable part of the graph
|
||||
/// \param[in] head The trainable part of the graph
|
||||
/// \param[in] context A context used to store options during execution
|
||||
/// \param[in] cfg A config used by training
|
||||
/// \param[in] train_cfg A config used by training
|
||||
///
|
||||
/// \return Status
|
||||
Status BuildTransferLearning(GraphCell backbone, GraphCell head, const std::shared_ptr<Context> &context,
|
||||
|
@ -173,7 +173,6 @@ class MS_API Model {
|
|||
///
|
||||
/// \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.
|
||||
/// \param[in] whether to use data preprocess in model.
|
||||
/// \param[in] before CallBack before predict.
|
||||
/// \param[in] after CallBack after predict.
|
||||
///
|
||||
|
@ -225,7 +224,7 @@ class MS_API Model {
|
|||
|
||||
/// \brief update gradient tensors of the model.
|
||||
///
|
||||
/// \param[in] inputs A vector new gradients.
|
||||
/// \param[in] gradients A vector new gradients.
|
||||
/// \return Status of operation
|
||||
Status ApplyGradients(const std::vector<MSTensor> &gradients);
|
||||
|
||||
|
@ -236,7 +235,7 @@ class MS_API Model {
|
|||
|
||||
/// \brief update weights tensors of the model.
|
||||
///
|
||||
/// \param[in] inputs A vector new weights.
|
||||
/// \param[in] new_weights A vector new weights.
|
||||
/// \return Status of operation
|
||||
Status UpdateFeatureMaps(const std::vector<MSTensor> &new_weights);
|
||||
|
||||
|
@ -247,7 +246,7 @@ class MS_API Model {
|
|||
|
||||
/// \brief update the optimizer parameters
|
||||
///
|
||||
/// \param[in] inputs A vector new optimizer params.
|
||||
/// \param[in] params A vector new optimizer params.
|
||||
/// \return Status of operation
|
||||
Status SetOptimizerParams(const std::vector<MSTensor> ¶ms);
|
||||
|
||||
|
@ -299,7 +298,7 @@ class MS_API Model {
|
|||
|
||||
/// \brief Bind GLTexture2D object to cl Memory.
|
||||
///
|
||||
/// \param[in] inputGlTexture The input GLTexture id for Model.
|
||||
/// \param[in] inputGLTexture The input GLTexture id for Model.
|
||||
/// \param[in] outputGLTexture The output GLTexture id for Model.
|
||||
///
|
||||
/// \return Status of operation.
|
||||
|
|
|
@ -59,7 +59,7 @@ class MS_API Serialization {
|
|||
///
|
||||
/// \param[in] files The path of model files.
|
||||
/// \param[in] model_type The Type of model file, options are ModelType::kMindIR, ModelType::kOM.
|
||||
/// \param[out] graph The output parameter, an object saves graph data.
|
||||
/// \param[out] graphs The output parameter, an object saves graph data.
|
||||
/// \param[in] dec_key The decryption key, key length is 16, 24, or 32.
|
||||
/// \param[in] dec_mode The decryption mode, optional options are AES-GCM, AES-CBC.
|
||||
///
|
||||
|
|
|
@ -216,22 +216,22 @@ class MS_API MSTensor {
|
|||
|
||||
/// \brief Set the shape of for the MSTensor. Only valid for Lite.
|
||||
///
|
||||
/// \param[in] Shape of the MSTensor, a vector of int64_t.
|
||||
/// \param[in] shape Shape of the MSTensor, a vector of int64_t.
|
||||
void SetShape(const std::vector<int64_t> &shape);
|
||||
|
||||
/// \brief Set the data type for the MSTensor. Only valid for Lite.
|
||||
///
|
||||
/// \param[in] The data type of the MSTensor.
|
||||
/// \param[in] data_type The data type of the MSTensor.
|
||||
void SetDataType(enum DataType data_type);
|
||||
|
||||
/// \brief Set the name for the MSTensor. Only valid for Lite.
|
||||
///
|
||||
/// \param[in] The name of the MSTensor.
|
||||
/// \param[in] name The name of the MSTensor.
|
||||
inline void SetTensorName(const std::string &name);
|
||||
|
||||
/// \brief Set the Allocator for the MSTensor. Only valid for Lite.
|
||||
///
|
||||
/// \param[in] A pointer to Allocator.
|
||||
/// \param[in] allocator A pointer to Allocator.
|
||||
void SetAllocator(std::shared_ptr<Allocator> allocator);
|
||||
|
||||
/// \brief Obtain the Allocator of the MSTensor. Only valid for Lite.
|
||||
|
@ -241,7 +241,7 @@ class MS_API MSTensor {
|
|||
|
||||
/// \brief Set the format for the MSTensor. Only valid for Lite.
|
||||
///
|
||||
/// \param[in] The format of the MSTensor.
|
||||
/// \param[in] format The format of the MSTensor.
|
||||
void SetFormat(mindspore::Format format);
|
||||
|
||||
/// \brief Obtain the format of the MSTensor. Only valid for Lite.
|
||||
|
@ -257,7 +257,7 @@ class MS_API MSTensor {
|
|||
///
|
||||
/// \note The memory pointed to origin data pointer of MSTensor needs to be managed by the user
|
||||
///
|
||||
/// \param[in] A pointer to the data of the MSTensor.
|
||||
/// \param[in] data A pointer to the data of the MSTensor.
|
||||
void SetData(void *data);
|
||||
|
||||
/// \brief Get the quantization parameters of the MSTensor. Only valid for Lite.
|
||||
|
@ -267,7 +267,7 @@ class MS_API MSTensor {
|
|||
|
||||
/// \brief Set the quantization parameters for the MSTensor. Only valid for Lite.
|
||||
///
|
||||
/// \param[in] The quantization parameters of the MSTensor.
|
||||
/// \param[in] quant_params The quantization parameters of the MSTensor.
|
||||
void SetQuantParams(std::vector<QuantParam> quant_params);
|
||||
|
||||
const std::shared_ptr<Impl> impl() const { return impl_; }
|
||||
|
|
|
@ -93,7 +93,7 @@ class MS_CORE_API AbstractBase : public Base {
|
|||
|
||||
/// \brief Set the type for the AbstractBase.
|
||||
///
|
||||
/// \param[in] value The type of an anf node.
|
||||
/// \param[in] type The type of an anf node.
|
||||
void set_type(const TypePtr &type) {
|
||||
MS_EXCEPTION_IF_NULL(type);
|
||||
type_ = type;
|
||||
|
@ -101,7 +101,7 @@ class MS_CORE_API AbstractBase : public Base {
|
|||
|
||||
/// \brief Set the shape for the AbstractBase.
|
||||
///
|
||||
/// \param[in] value The shape of an anf node.
|
||||
/// \param[in] shape The shape of an anf node.
|
||||
virtual void set_shape(const BaseShapePtr &shape) {
|
||||
MS_EXCEPTION_IF_NULL(shape);
|
||||
shape_ = shape;
|
||||
|
@ -852,7 +852,7 @@ class MS_CORE_API AbstractTuple final : public AbstractSequence {
|
|||
/// \brief Constructor of AbstractTuple.
|
||||
///
|
||||
/// \param[in] elements A list of abstracts.
|
||||
/// \param[in] tuple_node The nodes of tuple, usually are MakeTuple CNodes or tuple ValueNodes.
|
||||
/// \param[in] tuple_nodes The nodes of tuple, usually are MakeTuple CNodes or tuple ValueNodes.
|
||||
explicit AbstractTuple(AbstractBasePtrList &&elements,
|
||||
const std::shared_ptr<AnfNodeWeakPtrList> &tuple_nodes = nullptr)
|
||||
: AbstractSequence(std::move(elements), tuple_nodes) {}
|
||||
|
@ -860,7 +860,7 @@ class MS_CORE_API AbstractTuple final : public AbstractSequence {
|
|||
/// \brief Constructor of AbstractTuple.
|
||||
///
|
||||
/// \param[in] elements A list of abstracts.
|
||||
/// \param[in] tuple_node The nodes of tuple, usually are MakeTuple CNodes or tuple ValueNodes.
|
||||
/// \param[in] tuple_nodes The nodes of tuple, usually are MakeTuple CNodes or tuple ValueNodes.
|
||||
explicit AbstractTuple(const AbstractBasePtrList &elements,
|
||||
const std::shared_ptr<AnfNodeWeakPtrList> &tuple_nodes = nullptr)
|
||||
: AbstractSequence(elements, tuple_nodes) {}
|
||||
|
@ -915,14 +915,14 @@ class MS_CORE_API AbstractList final : public AbstractSequence {
|
|||
/// \brief Constructor of AbstractList.
|
||||
///
|
||||
/// \param[in] elements A list of abstracts.
|
||||
/// \param[in] list_node The nodes of list, usually are MakeList CNodes or list ValueNodes.
|
||||
/// \param[in] list_nodes The nodes of list, usually are MakeList CNodes or list ValueNodes.
|
||||
explicit AbstractList(AbstractBasePtrList &&elements, const std::shared_ptr<AnfNodeWeakPtrList> &list_nodes = nullptr)
|
||||
: AbstractSequence(std::move(elements), list_nodes) {}
|
||||
|
||||
/// \brief Constructor of AbstractList.
|
||||
///
|
||||
/// \param[in] elements A list of abstracts.
|
||||
/// \param[in] list_node The nodes of list, usually are MakeList CNodes or list ValueNodes.
|
||||
/// \param[in] list_nodes The nodes of list, usually are MakeList CNodes or list ValueNodes.
|
||||
explicit AbstractList(const AbstractBasePtrList &elements,
|
||||
const std::shared_ptr<AnfNodeWeakPtrList> &list_nodes = nullptr)
|
||||
: AbstractSequence(elements, list_nodes) {}
|
||||
|
@ -1269,7 +1269,7 @@ class MS_CORE_API AbstractRefKey final : public AbstractBase {
|
|||
|
||||
/// \brief Get the ref key.
|
||||
///
|
||||
/// \param[in] The pointer to RefKey.
|
||||
/// \return The pointer to RefKey.
|
||||
RefKeyPtr ref_key_value() const { return ref_key_value_; }
|
||||
|
||||
AbstractBasePtr Join(const AbstractBasePtr &other) override;
|
||||
|
|
|
@ -69,7 +69,7 @@ class MS_CORE_API Number : public Object {
|
|||
|
||||
/// \brief Get type name for Number object.
|
||||
///
|
||||
/// \param Define the type name.
|
||||
/// \param type_name Define the type name.
|
||||
/// \return The full type name of the Number object.
|
||||
std::string GetTypeName(const std::string &type_name) const {
|
||||
std::ostringstream oss;
|
||||
|
|
|
@ -116,7 +116,7 @@ class MIND_API Parameter : public AnfNode {
|
|||
|
||||
/// \brief Set the name of this Parameter.
|
||||
///
|
||||
/// \param[in] The name.
|
||||
/// \param[in] name The name.
|
||||
void set_name(const std::string &name);
|
||||
|
||||
/// \brief Check if there is a default parameter.
|
||||
|
|
Loading…
Reference in New Issue