java.lang.Object
rawDeepLearningClassifier.dlClassification.genericModel.DLModelWorker<StandardPrediction>
rawDeepLearningClassifier.dlClassification.genericModel.GenericModelWorker
Direct Known Subclasses:
ArchiveModelWorker

public class GenericModelWorker extends DLModelWorker<StandardPrediction>
Generic model worker.
Author:
Jamie Macaulay
  • Constructor Details

    • GenericModelWorker

      public GenericModelWorker()
  • Method Details

    • runModel

      public float[] runModel(float[][][] transformedDataStack)
      Description copied from class: DLModelWorker
      Run the model on a stack of transformed data.
      Specified by:
      runModel in class DLModelWorker<StandardPrediction>
      Parameters:
      transformedDataStack - - the input data for the model where the outer array is the number of input images or wavforms.
      Returns:
      the prediction as a flattened array of probabilities for each class.
    • makeModelResult

      public StandardPrediction makeModelResult(float[] prob, double time)
      Description copied from class: DLModelWorker
      Make a model result from the probabilities and the time it took to run the model.
      Specified by:
      makeModelResult in class DLModelWorker<StandardPrediction>
      Parameters:
      prob - - the probabilities for each class.
      time - - the time taken to run the model.
      Returns:
      a model result object.
    • prepModel

      public DLStatus prepModel(StandardModelParams genericParams, DLControl dlControl)
      Description copied from class: DLModelWorker
      Prepare the model for running.
      Specified by:
      prepModel in class DLModelWorker<StandardPrediction>
      Parameters:
      genericParams - - the parameters for the sound spot model.
      dlControl - - the control object for the deep learning process.
      Returns:
      a status of the preparation of the model.
    • setWaveFreqModel

      protected void setWaveFreqModel(StandardModelParams genericParams)
    • closeModel

      public void closeModel()
      Description copied from class: DLModelWorker
      Destroy the model.
      Specified by:
      closeModel in class DLModelWorker<StandardPrediction>
    • getModel

      public org.jamdev.jdl4pam.genericmodel.GenericModel getModel()
      Generic model.
      Returns:
      the generic model.
    • isModelNull

      public boolean isModelNull()
      Description copied from class: DLModelWorker
      Check whether a model is null or not.
      Specified by:
      isModelNull in class DLModelWorker<StandardPrediction>
      Returns:
      true of the model is null.