Layers
MultiScalePeakEmbedding(h_size, dropout=0)
Bases: Module
Multi-scale sinusoidal embedding based on Voronov et. al.
Source code in instanovo/transformer/layers.py
encode_mass(x)
forward(mz_values, intensities)
PositionalEncoding(d_model, dropout=0.1, max_len=5000)
Bases: Module
Standard sinusoidal positional encoding.
Source code in instanovo/transformer/layers.py
forward(x)
Positional encoding forward pass.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Tensor
|
Tensor, shape |
required |