Skip to content

Instantly share code, notes, and snippets.

@joannapurosto
Created August 29, 2019 09:56
Show Gist options
  • Save joannapurosto/c508ebfabbf76f86d22cc781a6d4c881 to your computer and use it in GitHub Desktop.
Save joannapurosto/c508ebfabbf76f86d22cc781a6d4c881 to your computer and use it in GitHub Desktop.
How to do deep learning for java on the Valohai platform? -blog | Valohai
public void iterationDone(Model model, int iteration, int epoch) {
if (printIterations <= 0)
printIterations = 1;
if (iteration % printIterations == 0) {
double score = model.score();
System.out.println(String.format(
"{\"epoch\": %d, \"iteration\": %d, \"score (loss function)\": %f}",
epoch,
iteration,
score)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment