paddlets.models.anomaly.dl._anomaly_transformer.embedding
- class PositionalEmbedding(d_model: int, max_len: int = 5000)[source]
Bases:
LayerCompute the positional encodings once in log space.
- Parameters
d_model (int) – The expected feature size for the input of the anomaly transformer.
max_len (int) – The dimensionality of the computed positional encoding array.
- _nn
Dynamic graph LayerList.
- Type
paddle.nn.Sequential
- class TokenEmbedding(c_in: int, d_model: int)[source]
Bases:
Layer- Fills the input Tensor with values according to the method described in Delving deep into rectifiers:
Surpassing human-level performance on ImageNet classification - He, K. et al. (2015), using a normal distribution.
- Parameters
c_in (int) – The Number of channels for Conv1D.
d_model (int) – The expected feature size for the input of the anomaly transformer.
- _nn
Dynamic graph LayerList.
- Type
paddle.nn.Sequential
- class DataEmbedding(c_in: int, d_model: int, dropout: int = 0.0)[source]
Bases:
Layerdata embedding = PositionalEmbedding + TokenEmbedding.
- Parameters
c_in (int) – The Number of channels for embedding.
d_model (int) – The expected feature size for the input of the anomaly transformer.
dropout (int) – Dropout regularization parameter.
- _nn
Dynamic graph LayerList.
- Type
paddle.nn.Sequential