Search in sources :

Example 1 with TensorflowTrainer

use of ml.shifu.shifu.core.alg.TensorflowTrainer in project shifu by ShifuML.

the class TrainModelProcessor method runTensorflowLocalTrain.

private void runTensorflowLocalTrain() throws IOException {
    List<Scanner> scanners = null;
    TensorflowTrainer trainer = new TensorflowTrainer(modelConfig, columnConfigList);
    LOG.info("Normalized data for training {}.", pathFinder.getNormalizedDataPath());
    try {
        scanners = ShifuFileUtils.getDataScanners(pathFinder.getNormalizedDataPath(), modelConfig.getDataSet().getSource());
    } catch (IOException e) {
        throw new ShifuException(ShifuErrorCode.ERROR_INPUT_NOT_FOUND, e, pathFinder.getNormalizedDataPath());
    }
    if (CollectionUtils.isNotEmpty(scanners)) {
        trainer.train();
    }
    closeScanners(scanners);
}
Also used : TensorflowTrainer(ml.shifu.shifu.core.alg.TensorflowTrainer) ShifuException(ml.shifu.shifu.exception.ShifuException)

Aggregations

TensorflowTrainer (ml.shifu.shifu.core.alg.TensorflowTrainer)1 ShifuException (ml.shifu.shifu.exception.ShifuException)1