paddlets.models.anomaly.dl._mtad_gat.attention

class FeatOrTempAttention(feature_dim: int, in_chunk_len: int, dropout: float, alpha: int, embed_dim: Union[None, int] = None, use_gatv2: bool = True, use_bias: bool = True, name: str = 'feature')[源代码]

基类:Layer

特征/时间 图注意力层。

参数
  • feature_dim (int) – 特征的数目。

  • in_chunk_len (int) – 模型输入的时间序列长度。

  • dropout (float) – dropout比例。

  • alpha (float) – leakyrelu激活函数中的参数。

  • embed_dim (None|int) – 线性变换的输出维数。

  • use_gatv2 (bool) – 是否使用GATv2。

  • use_bias (bool) – 在attention层中是否使用偏置。

  • name (str) – 特征图或者时间图。

_feature_dim

特征或者节点数目。

Type

int

_in_chunk_len

模型输入的时间序列长度。

Type

int

_dropout

dropout比例。

Type

float

_alpha

leakyrelu激活函数中的参数。

Type

float

_embed_dim

线性变换的输出维数。

Type

None|int

_use_gatv2

是否使用GATv2。

Type

bool

_use_bias

在attention层中是否使用偏置。

Type

bool

_name

特征图或者时间图。

Type

str

_nodes_num

图中的节点数目。

Type

int

_lin

线性变换层。

Type

paddle.nn.Layer

_att

attention层的参数。

Type

paddle.Parameter

_bias

bias参数。

Type

paddle.Parameter

_leakyrelu

leakrelu激活层。

Type

paddle.nn.Layer

_sigmoid

sigmoid层。

Type

paddle.nn.Layer

forward(x) Tensor[源代码]

基于图注意力网络的特征提取。

参数

x (paddle.Tensor) – 输入的数据。

返回

网络输出结果。

返回类型

paddle.Tensor