Predict
predict
logger = ColorLog(console, __name__).logger
module-attribute
CONFIG_PATH = Path(__file__).parent.parent / 'configs'
module-attribute
TransformerPredictor(config: DictConfig)
Bases: AccelerateDeNovoPredictor
Predictor for the InstaNovo model.
num_beams = config.get('num_beams', 1)
instance-attribute
save_beams = config.get('save_beams', False)
instance-attribute
load_model() -> Tuple[nn.Module, DictConfig]
Setup the model.
setup_data_processor() -> DataProcessor
Setup the data processor.
setup_decoder() -> Decoder
Setup the decoder.
get_predictions(batch: Any) -> dict[str, Any]
Get the predictions for a batch.