Decoding
BaseDecoder(model, i2s, max_length=30, eos_id=2, bos_id=1, pad_id=0)
Base model decoder.
Source code in instanovo/transformer/decoding.py
__call__(*args, **kwargs)
batch_idx_to_aa(idx)
decode(*args, **kwds)
abstractmethod
idx_to_aa(idx)
Decode a single sample of indices to aa list.
Source code in instanovo/transformer/decoding.py
GreedyDecoder(model, i2s, max_length=30, eos_id=2, bos_id=1, pad_id=0)
Bases: BaseDecoder
Greedy model decoder.
Source code in instanovo/transformer/decoding.py
decode(spectra, precursors, spectra_mask)
greedy(spectra, precursors, spectra_mask)
Greedy decoding strategy.
Source code in instanovo/transformer/decoding.py
score(spectra, precursors, peptide, spectra_mask, y_mask)
Score peptide sequences.