public class SparkLossCalculatorComputationGraph extends java.lang.Object implements ScoreCalculator<ComputationGraph>
ComputationGraph
on that data set (data set
as a JavaRDD
), using Spark.DataSet
use DataSetToMultiDataSetFn
Constructor and Description |
---|
SparkLossCalculatorComputationGraph(org.apache.spark.api.java.JavaRDD<org.nd4j.linalg.dataset.api.MultiDataSet> data,
boolean average,
org.apache.spark.SparkContext sc)
Calculate the score (loss function value) on a given data set (usually a test set)
|
Modifier and Type | Method and Description |
---|---|
double |
calculateScore(ComputationGraph network)
Calculate the score for the given MultiLayerNetwork
|
public SparkLossCalculatorComputationGraph(org.apache.spark.api.java.JavaRDD<org.nd4j.linalg.dataset.api.MultiDataSet> data, boolean average, org.apache.spark.SparkContext sc)
data
- Data set to calculate the score foraverage
- Whether to return the average (sum of loss / N) or just (sum of loss)public double calculateScore(ComputationGraph network)
ScoreCalculator
calculateScore
in interface ScoreCalculator<ComputationGraph>