The main module for run inference

class neural_pipeline.predict.Predictor(model: neural_pipeline.data_processor.model.Model, fsm: neural_pipeline.utils.file_structure_manager.FileStructManager, device: torch.device = None)[source]

Predictor run inference by training parameters

  • model – model object, used for predict
  • fsmFileStructManager object
  • device – device for run inference
predict(data: torch.Tensor)[source]

Predict ine data

Parameters:data – data as torch.Tensor or dict with key data
Returns:processed output
Return type:model output type
predict_dataset(data_producer: neural_pipeline.data_producer.data_producer.DataProducer, callback: callable) → None[source]

Run prediction iterates by data_producer

  • data_producerDataProducer object
  • callback – callback, that call for every data prediction and get it’s result as parameter