Class Attention
Defined in File attention.h
Inheritance Relationships
Base Type
public mindspore::ops::BaseOperator
Class Documentation
-
class Attention : public mindspore::ops::BaseOperator
MultiHead-Attention op in MindIR.
Public Functions
-
inline Attention()
Constructor.
-
void Init(int64_t head_num, int64_t head_size, bool cross = false)
Initialize Attention op.
- Parameters
head_num – [in] Define head number.
head_size – [in] Define size per head.
cross – [in] Define is cross attention. Default false.
-
inline Attention()