Package

com.intel.analytics.bigdl

optim

Permalink

package optim

Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractOptimizer extends AnyRef

    Permalink
  2. class AccuracyResult extends ValidationResult

    Permalink

    Represent an accuracy result.

    Represent an accuracy result. Accuracy means a ratio of correct number and total number.

  3. class Adadelta[T] extends OptimMethod[T]

    Permalink

    Adadelta implementation for SGD: http://arxiv.org/abs/1212.5701

  4. class Adagrad[T] extends OptimMethod[T]

    Permalink

    An implementation of Adagrad.

    An implementation of Adagrad. See the original paper: http://jmlr.org/papers/volume12/duchi11a/duchi11a.pdf

  5. class Adam[T] extends OptimMethod[T]

    Permalink

    An implementation of Adam http://arxiv.org/pdf/1412.6980.pdf

  6. class Adamax[T] extends OptimMethod[T]

    Permalink

    An implementation of Adamax http://arxiv.org/pdf/1412.6980.pdf

  7. class ArrayBufferAccumulator extends AccumulatorV2[ArrayBuffer[Double], ArrayBuffer[Double]]

    Permalink
  8. class ContiguousResult extends ValidationResult

    Permalink

    A generic result type who's data is contiguous float.

  9. class DistriOptimizer[T] extends Optimizer[T, MiniBatch[T]]

    Permalink

    The optimizer run on a distributed cluster.

  10. class DistriOptimizerV2[T] extends Optimizer[T, MiniBatch[T]]

    Permalink

    The optimizer run on a distributed cluster.

  11. class DistriValidator[T] extends Validator[T, MiniBatch[T]]

    Permalink

    Validate model on a distributed cluster.

  12. class Evaluator[T] extends Serializable

    Permalink

    model evaluator

  13. class Ftrl[T] extends OptimMethod[T]

    Permalink

    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.

  14. class HitRatio[T] extends ValidationMethod[T]

    Permalink

    Hit Ratio(HR).

    Hit Ratio(HR). HR intuitively measures whether the test item is present on the top-k list.

  15. class L1L2Regularizer[T] extends Regularizer[T]

    Permalink

    Apply both L1 and L2 regularization

    Apply both L1 and L2 regularization

    T

    type parameters Float or Double

    Annotations
    @SerialVersionUID()
  16. case class L1Regularizer[T](l1: Double)(implicit evidence$3: ClassTag[T], ev: TensorNumeric[T]) extends L1L2Regularizer[T] with Product with Serializable

    Permalink

    Apply L1 regularization

    Apply L1 regularization

    T

    type parameters Float or Double

    l1

    l1 regularization rate

    Annotations
    @SerialVersionUID()
  17. case class L2Regularizer[T](l2: Double)(implicit evidence$4: ClassTag[T], ev: TensorNumeric[T]) extends L1L2Regularizer[T] with Product with Serializable

    Permalink

    Apply L2 regularization

    Apply L2 regularization

    T

    type parameters Float or Double

    l2

    l2 regularization rate

    Annotations
    @SerialVersionUID()
  18. class LBFGS[T] extends OptimMethod[T]

    Permalink

    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.

  19. class LarsSGD[T] extends SGD[T]

    Permalink

    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

  20. trait LineSearch[T] extends AnyRef

    Permalink

    Line Search strategy

  21. class LocalOptimizer[T] extends Optimizer[T, MiniBatch[T]]

    Permalink

    Optimize a model on a single machine

  22. class LocalPredictor[T] extends Serializable

    Permalink

    Predictor for local data

  23. class LocalValidator[T] extends Validator[T, MiniBatch[T]]

    Permalink

    Validate a model on a single machine Use given dataset with certain validation methods such as Top1Accuracy as an argument of its test method

  24. class Loss[T] extends ValidationMethod[T]

    Permalink

    This evaluation method is calculate loss of output with respect to target

  25. class LossResult extends ContiguousResult

    Permalink

    Use loss as a validation result

  26. case class LossWithElapsedTime(index: Int, loss: Double, elapsed: Long) extends Product with Serializable

    Permalink
  27. class MAE[T] extends ValidationMethod[T]

    Permalink

    This evaluation method is calculate mean absolute error of output with respect to target

  28. class MAPMultiIOUValidationResult extends ValidationResult

    Permalink
  29. class MAPType extends Serializable

    Permalink
  30. class MAPValidationResult extends ValidationResult

    Permalink

    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

  31. class MeanAveragePrecision[T] extends ValidationMethod[T]

    Permalink

    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

  32. class MeanAveragePrecisionObjectDetection[T] extends ValidationMethod[T]

    Permalink

    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

  33. class Metrics extends Serializable

    Permalink

    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.

  34. class NDCG[T] extends ValidationMethod[T]

    Permalink

    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.

  35. trait OptimMethod[T] extends Serializable

    Permalink

    Similar to torch Optim method, which is used to update the parameter

  36. abstract class Optimizer[T, D] extends AnyRef

    Permalink

    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.

    T

    numeric type, which can be Float or Double

    D

    the type of elements in DataSet, such as MiniBatch

  37. trait OptimizerLogger extends AnyRef

    Permalink
  38. class PRAUCResult extends ValidationResult

    Permalink
  39. class ParallelAdam[T] extends OptimMethod[T]

    Permalink

    An multi-thread implementation of Adam http://arxiv.org/pdf/1412.6980.pdf

  40. class ParallelOptimizer[T] extends Optimizer[T, MiniBatch[T]]

    Permalink

    The optimizer run on a distributed cluster.

  41. case class ParamSegments[T](start: Int, length: Int, method: OptimMethod[T]) extends Product with Serializable

    Permalink
  42. class PrecisionRecallAUC[T] extends ValidationMethod[T]

    Permalink

    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()

    T

    class tag for tensor numeric

  43. class PredictionService[T] extends AnyRef

    Permalink

    In this service, concurrency is kept not greater than numThreads by a BlockingQueue, which contains available model instances.

    Thread-safe Prediction Service for Concurrent Calls

    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.

  44. class Predictor[T] extends Serializable

    Permalink

    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.

  45. class RMSprop[T] extends OptimMethod[T]

    Permalink

    An implementation of RMSprop

  46. trait Regularizer[T] extends Serializable

    Permalink

    It is a trait for all regularizers.

    It is a trait for all regularizers. Any regularizers need to inherit the result.

    T

    type parameters Float or Double

  47. class SGD[T] extends OptimMethod[T]

    Permalink

    A plain implementation of SGD

  48. class Top1Accuracy[T] extends ValidationMethod[T]

    Permalink

    Caculate the percentage that output's max probability index equals target

  49. class Top5Accuracy[T] extends ValidationMethod[T]

    Permalink

    Calculate the percentage that target in output's top5 probability indexes

  50. class TrainingContext[T] extends Serializable

    Permalink
  51. class TreeNNAccuracy[T] extends ValidationMethod[T]

    Permalink

    This is a metric to measure the accuracy of Tree Neural Network/Recursive Neural Network

  52. trait Trigger extends Serializable

    Permalink

    A trigger specifies a timespot or several timespots during training, and a corresponding action will be taken when the timespot(s) is reached.

  53. trait ValidationMethod[T] extends Serializable

    Permalink

    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

  54. trait ValidationResult extends Serializable

    Permalink

    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.

  55. abstract class Validator[T, D] extends AnyRef

    Permalink

    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.

    T

    numeric type, which can be Float or Double

    D

    the type of elements in DataSet, such as MiniBatch

Value Members

  1. object DistriOptimizer extends AbstractOptimizer

    Permalink
  2. object DistriOptimizerV2 extends AbstractOptimizer

    Permalink
  3. object DistriValidator

    Permalink
  4. object EvaluateMethods

    Permalink
  5. object Evaluator extends Serializable

    Permalink
  6. object L1L2Regularizer extends Serializable

    Permalink
  7. object LarsSGD extends Serializable

    Permalink
  8. object LocalOptimizer

    Permalink
  9. object LocalPredictor extends Serializable

    Permalink
  10. object LocalValidator

    Permalink
  11. object MAPCOCO extends MAPType

    Permalink
  12. object MAPPascalVoc2007 extends MAPType

    Permalink
  13. object MAPPascalVoc2010 extends MAPType

    Permalink
  14. object MAPUtil

    Permalink
  15. object MeanAveragePrecision extends Serializable

    Permalink
  16. object OptimMethod extends Serializable

    Permalink
  17. object Optimizer

    Permalink
  18. object ParallelAdam extends Serializable

    Permalink
  19. object ParallelOptimizer extends AbstractOptimizer

    Permalink
  20. object PredictionService

    Permalink
  21. object Predictor extends Serializable

    Permalink
  22. object SGD extends Serializable

    Permalink
  23. object StateEntry

    Permalink
  24. object Trigger extends Serializable

    Permalink

Deprecated Value Members

  1. object Validator

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.2.0) Validator(model, dataset) is deprecated. Please use model.evaluate instead

Ungrouped