Class TrainFastText


  • public final class TrainFastText
    extends java.lang.Object
    A utility to aggregate options for training with fasttext.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static FtTextClassification textClassification​(FtTrainingConfig config, ai.djl.training.dataset.RawDataset<java.nio.file.Path> dataset)
      Trains a fastText Application.NLP.TEXT_CLASSIFICATION model.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • textClassification

        public static FtTextClassification textClassification​(FtTrainingConfig config,
                                                              ai.djl.training.dataset.RawDataset<java.nio.file.Path> dataset)
                                                       throws java.io.IOException
        Trains a fastText Application.NLP.TEXT_CLASSIFICATION model.
        Parameters:
        config - the training configuration to use
        dataset - the training dataset
        Returns:
        the result of the training
        Throws:
        java.io.IOException - when IO operation fails in loading a resource
        See Also:
        FtTextClassification.fit(FtTrainingConfig, RawDataset)