Class Parameter
Defined in File anf.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public mindspore::ANode
Class Documentation
-
class Parameter : public mindspore::ANode
Public Functions
-
inline explicit Parameter(const FuncGraphPtr &func_graph)
Constructor.
- Parameters
func_graph – [in] The FuncGraph to which this Parameter belongs.
-
inline Parameter(const FuncGraphPtr &func_graph, NodeDebugInfoPtr &&debug_info)
Constructor.
- Parameters
func_graph – [in] The FuncGraph to which this Parameter belongs.
debug_info – [in] The debug info to be used for this Parameter.
-
~Parameter() override = default
Destructor.
-
inline std::string name() const
Get the name of this Parameter.
- Returns
The name.
-
inline void set_name(const std::string &name)
Set the name of this Parameter.
- Parameters
The – [in] name.
-
inline bool has_default() const
Check if there is a default parameter.
- Returns
True if this Parameter has a default parameter, otherwise false.
-
inline void set_default_param(const ValuePtr ¶m)
Set the default parameter.
- Parameters
param – [in] The default parameter.
-
inline const ValuePtr &default_param() const
Get the default parameter.
- Returns
The default parameter.
-
ParamInfoPtr param_info() const
Get the parameter information.
- Returns
The parameter information.
-
inline void IncreaseUsedGraphCount()
Increase used_graph_count.
-
inline void DecreaseUsedGraphCount()
Decrease used_graph_count.
-
inline int used_graph_count() const
Get used_graph_count.
- Returns
used_graph_count.
-
inline void SetNotUsedByRealKernelInGraph(uint32_t graph_id)
This parameter is not used in graph with id.
- Parameters
graph_id – [in] The graph id.
-
inline bool IsUsedByRealKernelInGraph(uint32_t graph_id) const
Check if this Parameter is used in graph with id.
- Parameters
graph_id – [in] True if used, otherwise false.
-
inline void set_has_dynamic_shape(bool flag)
Set whether this Parameter has a dynamic shape.
- Parameters
flag – [in] Boolean.
-
inline bool has_dynamic_shape() const
Check whether this Parameter has a dynamic shape.
- Returns
True if this Parameter has a dynamic shape, otherwise false.
-
inline void set_fracz_group(int64_t fracz_group)
Set groups attr in FracZ format.
- Parameters
fracz_group – [in] Groups attr in FracZ format.
-
inline int64_t fracz_group() const
Get groups attr in FracZ format.
- Returns
Groups attr in FracZ format.
-
inline void set_input_size(int64_t input_size)
Set input_size attr in FracNZ_RNN or ND_RNN_Bias format.
- Parameters
input_size – [in] input_size attr in FracNZ_RNN or ND_RNN_Bias format.
-
inline int64_t input_size() const
Get input_size attr in FracNZ_RNN or ND_RNN_Bias format.
- Returns
input_size attr in FracNZ_RNN or ND_RNN_Bias format.
-
inline void set_hidden_size(int64_t hidden_size)
Set hidden_size attr in FracNZ_RNN or ND_RNN_Bias format.
- Parameters
hidden_size – [in] hidden_size attr in FracNZ_RNN or ND_RNN_Bias format.
-
inline int64_t hidden_size() const
Get hidden_size attr in FracNZ_RNN or ND_RNN_Bias format.
- Returns
hidden_size attr in FracNZ_RNN or ND_RNN_Bias format.
-
inline explicit Parameter(const FuncGraphPtr &func_graph)