- Initialize the ComputationGraph model configuration using the init() method:
ComputationGraphConfiguration configuration = compGraphBuilder.build();
ComputationGraph model = new ComputationGraph(configuration);
model.init();
- Set a score listener to monitor the training process:
model.setListeners(new ScoreIterationListener(20), new EvaluativeListener(testIterator, 1, InvocationType.EPOCH_END));
- Start the training instance by calling the fit() method:
model.fit(trainIterator,numOfEpochs);
- Call evaluate() to calculate the evaluation metrics:
Evaluation evaluation = model.evaluate(testIterator);
System.out.println(evaluation.stats());
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.