Represent an accuracy result.
Adadelta implementation for SGD: http://arxiv.org/abs/1212.5701
An implementation of Adagrad.
An implementation of Adagrad. See the original paper: http://jmlr.org/papers/volume12/duchi11a/duchi11a.pdf
An implementation of Adam http://arxiv.org/pdf/1412.6980.pdf
An implementation of Adamax http://arxiv.org/pdf/1412.6980.pdf
A generic result type who's data is contiguous float.
The optimizer run on a distributed cluster.
The optimizer run on a distributed cluster.
Validate model on a distributed cluster.
model evaluator
An implementation of Ftrl https://www.eecs.tufts.edu/~dsculley/papers/ad-click-prediction.pdf.
An implementation of Ftrl https://www.eecs.tufts.edu/~dsculley/papers/ad-click-prediction.pdf. Support L1 penalty, L2 penalty and shrinkage-type L2 penalty.
Hit Ratio(HR).
Hit Ratio(HR). HR intuitively measures whether the test item is present on the top-k list.
Apply both L1 and L2 regularization
Apply both L1 and L2 regularization
type parameters Float or Double
Apply L1 regularization
Apply L1 regularization
type parameters Float or Double
l1 regularization rate
Apply L2 regularization
Apply L2 regularization
type parameters Float or Double
l2 regularization rate
This implementation of L-BFGS relies on a user-provided line search function (state.lineSearch).
This implementation of L-BFGS relies on a user-provided line search function (state.lineSearch). If this function is not provided, then a simple learningRate is used to produce fixed size steps. Fixed size steps are much less costly than line searches, and can be useful for stochastic problems.
The learning rate is used even when a line search is provided. This is also useful for large-scale stochastic problems, where opfunc is a noisy approximation of f(x). In that case, the learning rate allows a reduction of confidence in the step size.
An implementation of LARS https://arxiv.org/abs/1708.03888 Lars.createOptimForModule is recommended to be used to create LARS optim methods for multiple layers
Line Search strategy
Optimize a model on a single machine
Predictor for local data
Validate a model on a single machine
Use given dataset with certain validation methods such as Top1Accuracy
as an argument of its test
method
This evaluation method is calculate loss of output with respect to target
Use loss as a validation result
This evaluation method is calculate mean absolute error of output with respect to target
The MAP Validation Result.
The MAP Validation Result. The results are not calculated until result() or format() is called require class label beginning with 0
Calculate the Mean Average Precision (MAP).
Calculate the Mean Average Precision (MAP). The algorithm follows VOC Challenge after 2007 Require class label beginning with 0
MeanAveragePrecision for Object Detection The class label begins with 0
MeanAveragePrecision for Object Detection The class label begins with 0
The expected output from the last layer should be a Tensor[Float] or a Table If output is a tensor, it should be [num_of_batch X (1 + maxDetection * 6)] matrix The format of the matrix should be [<batch>, <batch>, ...], where each row vector is <batch> = [<size_of_batch>, <sample>,...]. Each sample has format: <sample> = <label, score, bbox x4> imgId is the batch number of the sample. imgId begins with 0. Multiple samples may share one imgId
If output is a table, it is a table of tables. output(i) is the results of the i-th image in the batch, where i = 1 to sizeof(batch) output(i) is a table, which contains the same keys (fields) of image info in the "target" Please refer to RoiMiniBatch/RoiImageInfo's documents. Besides, the inner tables also contain the scores for the detections in the image.
The "target" (Ground truth) is a table with the same structure of "output", except that it does not have "score" field
Performance metrics for the training process.
Performance metrics for the training process. Beyond collect local metrics(e.g. throughput) in driver node, it can also be used to collect distributed metrics (e.g. time of some steps among the workers). The is useful for performance analysis.
Normalized Discounted Cumulative Gain(NDCG).
Normalized Discounted Cumulative Gain(NDCG). NDCG accounts for the position of the hit by assigning higher scores to hits at top ranks.
Similar to torch Optim method, which is used to update the parameter
Optimizer is an abstract class which is used to train a model automatically with some certain optimization algorithms.
Optimizer is an abstract class which is used to train a model automatically with some certain optimization algorithms.
numeric type, which can be Float or Double
the type of elements in DataSet, such as MiniBatch
An multi-thread implementation of Adam http://arxiv.org/pdf/1412.6980.pdf
The optimizer run on a distributed cluster.
Precision Recall Area Under Curve will compute the precision-recall pairs and get the area under the curve.
Precision Recall Area Under Curve will compute the precision-recall pairs and get the area under the curve.
Note: It will gather all output probabilities and targets to driver and will compute the
precision, recall and the auc every calling of result()
class tag for tensor numeric
In this service, concurrency is kept not greater than numThreads by a BlockingQueue
,
which contains available model instances.
In this service, concurrency is kept not greater than numThreads by a BlockingQueue
,
which contains available model instances.
numThreads model instances sharing weights/bias
will be put into the BlockingQueue
during initialization.
When predict method called, service will try to take an instance from BlockingQueue
,
which means if all instances are on serving, the predicting request will be blocked until
some instances are released.
If exceptions caught during predict,
a scalar Tensor[String] will be returned with thrown message.
Predictor for distributed data
Predictor for distributed data
NOTE: The predictClass
, predict
and predictImage
will call the relevant methods of
object Predictor
. Why we do this? Because every these methods uses the ClassTag T
. If we do
these jobs in the methods of classPredictor
, when we do mapPartition
, Spark will find all
used values and do serialization. The T
is the argument of constructor, the serialization will
package the whole Predictor
class, which contains themodel
. It will send a duplicate model
to the workers. So we should move these methods to object Predictor
.
An implementation of RMSprop
It is a trait for all regularizers.
It is a trait for all regularizers. Any regularizers need to inherit the result.
type parameters Float or Double
A plain implementation of SGD
Caculate the percentage that output's max probability index equals target
Calculate the percentage that target in output's top5 probability indexes
This is a metric to measure the accuracy of Tree Neural Network/Recursive Neural Network
A trigger specifies a timespot or several timespots during training, and a corresponding action will be taken when the timespot(s) is reached.
A method defined to evaluate the model.
A method defined to evaluate the model. This trait can be extended by user-defined method. Such as Top1Accuracy
A result that calculate the numeric value of a validation method.
A result that calculate the numeric value of a validation method. User-defined valuation results must override the + operation and result() method. It is executed over the samples in each batch.
Validator is an abstract class which is used to test a model automatically
with some certain validation methods such as Top1Accuracy, as an argument of
its test
method.
Validator is an abstract class which is used to test a model automatically
with some certain validation methods such as Top1Accuracy, as an argument of
its test
method.
numeric type, which can be Float or Double
the type of elements in DataSet, such as MiniBatch
(Since version 0.2.0) Validator(model, dataset) is deprecated. Please use model.evaluate instead
Represent an accuracy result. Accuracy means a ratio of correct number and total number.