preprocessor¶
Classes¶
Preprocessor for codon sequence states |
Module Contents¶
- class preprocessor.CodonSequencePreprocessor(seq_length, embedding_dim, device)¶
Bases:
gfn.preprocessors.PreprocessorPreprocessor for codon sequence states
- Parameters:
seq_length (int)
embedding_dim (int)
device (torch.device)
- device¶
- embedding¶
- embedding_dim¶
- preprocess(states)¶
Transforms the states to the input format for neural networks.
- Parameters:
states (gfn.states.States) – The states to preprocess.
- Returns:
A tensor of shape (*batch_shape, output_dim) containing the preprocessed states.
- Return type:
torch.Tensor
- seq_length¶