K - Type of key, associated with each example. Used to keep track of which score belongs to which examplepublic class ScoreExamplesWithKeyFunction<K> extends Object implements org.apache.spark.api.java.function.PairFlatMapFunction<Iterator<scala.Tuple2<K,org.nd4j.linalg.dataset.api.MultiDataSet>>,K,Double>
ComputationGraph.scoreExamples(MultiDataSet, boolean) methodScoreExamplesFunction,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
ScoreExamplesWithKeyFunction(org.apache.spark.broadcast.Broadcast<org.nd4j.linalg.api.ndarray.INDArray> params,
org.apache.spark.broadcast.Broadcast<String> jsonConfig,
boolean addRegularizationTerms,
int batchSize) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<scala.Tuple2<K,Double>> |
call(Iterator<scala.Tuple2<K,org.nd4j.linalg.dataset.api.MultiDataSet>> iterator) |
public ScoreExamplesWithKeyFunction(org.apache.spark.broadcast.Broadcast<org.nd4j.linalg.api.ndarray.INDArray> params,
org.apache.spark.broadcast.Broadcast<String> jsonConfig,
boolean addRegularizationTerms,
int batchSize)
params - ComputationGraph parametersjsonConfig - ComputationGraphConfiguration, as jsonaddRegularizationTerms - if true: add regularization terms (l1/l2) if applicable; false: don't add regularization termsbatchSize - Batch size to use when scoring examplesCopyright © 2016. All Rights Reserved.