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);
}
Aggregations