masskit_ai.spectrum.small_mol.models package¶
Submodules¶
masskit_ai.spectrum.small_mol.models.small_mol_models module¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.AIMSNet(*args: Any, **kwargs: Any)¶
Bases:
SpectrumModel
generates fingerprint for AIMS hybrid search
- forward(x)¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.BasicBlock(*args: Any, **kwargs: Any)¶
Bases:
Module
ResNet Basic Block
- forward(x)¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.Conv1dSamePadding(*args: Any, **kwargs: Any)¶
Bases:
Conv1d
Represents the “Same” padding functionality from Tensorflow. See: https://github.com/pytorch/pytorch/issues/3867 Note that the padding argument in the initializer doesn’t do anything now
- forward(input)¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.ConvBlock(*args: Any, **kwargs: Any)¶
Bases:
Module
- forward(x: torch.Tensor) torch.Tensor ¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.LocalLinear(*args: Any, **kwargs: Any)¶
Bases:
Module
- forward(x: torch.Tensor)¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.MyConv1dPadSame(*args: Any, **kwargs: Any)¶
Bases:
Module
extend nn.Conv1d to support SAME padding
- forward(x)¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.MyMaxPool1dPadSame(*args: Any, **kwargs: Any)¶
Bases:
Module
extend nn.MaxPool1d to support SAME padding
- forward(x)¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.ResNetBaseline(*args: Any, **kwargs: Any)¶
Bases:
SpectrumModel
A PyTorch implementation of the ResNet Baseline From https://arxiv.org/abs/1909.04939 Attributes ———- sequence_length: The size of the input sequence self.config.ml.model.ResNetBaseline.mid_channels:The 3 residual blocks will have as output channels: [self.config.ml.model.ResNetBaseline.mid_channels, self.config.ml.model.ResNetBaseline.mid_channels * 2, self.config.ml.model.ResNetBaseline.mid_channels * 2] self.config.ml.model.ResNetBaseline.fp_size:The number of output classes
- forward(x: torch.Tensor) torch.Tensor ¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.ResNetBaseline_new(*args: Any, **kwargs: Any)¶
Bases:
SpectrumModel
- Input:
X: (n_samples, n_channel, n_length) Y: (n_samples)
- Output:
out: (n_samples)
- Pararmetes:
in_channels: dim of input, the same as n_channel base_filters: number of filters in the first several Conv layer, it will double at every 4 layers kernel_size: width of kernel stride: stride of kernel moving groups: set larget to 1 as ResNeXt n_block: number of blocks n_classes: number of classes
- forward(x)¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.ResNetBlock(*args: Any, **kwargs: Any)¶
Bases:
Module
- forward(x: torch.Tensor) torch.Tensor ¶
- class masskit_ai.spectrum.small_mol.models.small_mol_models.SimpleNet(*args: Any, **kwargs: Any)¶
Bases:
SpectrumModel
simple n layer dense network
- forward(x)¶
- masskit_ai.spectrum.small_mol.models.small_mol_models.conv1d_same_padding(input, weight, bias, stride, dilation, groups)¶