paddlets.models.anomaly.dl._ed.ed

class MLP(input_dim: int, feature_dim: int, hidden_config: List[int], activation: Callable[[...], Tensor], last_layer_activation: Callable[[...], Tensor], dropout_rate: float = 0.5, use_bn: bool = True, use_drop: bool = True)[源代码]

基类:Layer

编解码使用的MLP网络。

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

  • feature_dim (int) – 特征的维度。

  • hidden_config (List(int)) – 列表第i个元素表示第i层神经元的个数。

  • activation (Callable[..., paddle.Tensor]) – 隐层的激活函数。

  • last_layer_activation (Callable[..., paddle.Tensor]) – 最后一层使用的激活函数。

  • dropout_rate (float) – 神经元丢弃的比例。

  • use_bn (bool) – 是否开启batch normalization。

  • use_drop (bool) – 是否使用dropout。

_nn

动态图网络。

Type

paddle.nn.Sequential

forward(x)[源代码]

定义前馈网络计算过程。

参数
  • *inputs (tuple) – 输入数据。

  • **kwargs (dict) – 其他参数。

class CNN(input_dim: int, hidden_config: List[int], activation: Callable[[...], Tensor], last_layer_activation: Callable[[...], Tensor], kernel_size: int, dropout_rate: float = 0.5, use_bn: bool = True, is_encoder: bool = True, use_drop: bool = True, data_format: str = 'NCL')[源代码]

基类:Layer

编解码器使用的CNN网络。

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

  • hidden_config (List(int)) – 列表第i个元素表示第i层神经元的个数。

  • activation (Callable[..., paddle.Tensor]) – 隐层的激活函数。

  • last_layer_activation (Callable[..., paddle.Tensor]) – 最后一层使用的激活函数。

  • kernel_size (int) – 卷积核的大小。

  • use_drop (bool) – 是否使用dropout。

  • dropout_rate (float) – 神经元丢弃的比例。

  • use_bn (bool) – 是否开启batch normalization。

  • is_encoder (bool) – 编码或者解码。

  • data_format (str) – 指定输入数据的格式。

_nn

动态图网络。

Type

paddle.nn.Sequential

forward(x)[源代码]

定义前馈网络计算过程。

参数
  • *inputs (tuple) – 输入数据。

  • **kwargs (dict) – 其他参数。

class LSTM(input_dim: int, hidden_config: List[int], activation: Callable[[...], Tensor], last_layer_activation: Callable[[...], Tensor], dropout_rate: float = 0, use_drop: bool = True, num_layers: int = 1, direction: str = 'forward')[源代码]

基类:Layer

编解码器使用的LSTM网络。

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

  • hidden_config (List(int)) – 列表第i个元素表示第i层神经元的个数。

  • activation (Callable[..., paddle.Tensor]) – 隐层的激活函数。

  • last_layer_activation (Callable[..., paddle.Tensor]) – 最后一层使用的激活函数。

  • dropout_rate (float) – 神经元丢弃的比例。

  • use_drop (bool) – 是否使用dropout。

  • num_layers (int) – LSTM的层数。

  • direction (str) – LSTM网络迭代方向。

_nn

动态图网络。

Type

paddle.nn.Sequential

forward(x)[源代码]

定义前馈网络计算过程。

参数
  • *inputs (tuple) – 输入数据。

  • **kwargs (dict) – 其他参数。