Class/Object

com.intel.analytics.bigdl.nn

MarginRankingCriterion

Related Docs: object MarginRankingCriterion | package nn

Permalink

class MarginRankingCriterion[T] extends AbstractCriterion[Table, Table, T]

Creates a criterion that measures the loss given an input x = {x1, x2}, a table of two Tensors of size 1 (they contain only scalars), and a label y (1 or -1). In batch mode, x is a table of two Tensors of size batchsize, and y is a Tensor of size batchsize containing 1 or -1 for each corresponding pair of elements in the input Tensor. If y == 1 then it assumed the first input should be ranked higher (have a larger value) than the second input, and vice-versa for y == -1.

Annotations
@SerialVersionUID()
Linear Supertypes
AbstractCriterion[Table, Table, T], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MarginRankingCriterion
  2. AbstractCriterion
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MarginRankingCriterion(margin: Double = 1.0, sizeAverage: Boolean = true)(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def backward(input: Table, target: Table): Table

    Permalink

    Performs a back-propagation step through the criterion, with respect to the given input.

    Performs a back-propagation step through the criterion, with respect to the given input.

    input

    input data

    target

    target

    returns

    gradient corresponding to input data

    Definition Classes
    AbstractCriterion
  6. def canEqual(other: Any): Boolean

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def cloneCriterion(): AbstractCriterion[Table, Table, T]

    Permalink

    Deep copy this criterion

    Deep copy this criterion

    returns

    a deep copied criterion

    Definition Classes
    AbstractCriterion
  9. var dist: Tensor[T]

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(other: Any): Boolean

    Permalink
    Definition Classes
    MarginRankingCriterionAbstractCriterion → AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def forward(input: Table, target: Table): T

    Permalink

    Takes an input object, and computes the corresponding loss of the criterion, compared with target.

    Takes an input object, and computes the corresponding loss of the criterion, compared with target.

    input

    input data

    target

    target

    returns

    the loss of criterion

    Definition Classes
    AbstractCriterion
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. var gradInput: Table

    Permalink
    Definition Classes
    AbstractCriterion
  16. def hashCode(): Int

    Permalink
    Definition Classes
    MarginRankingCriterionAbstractCriterion → AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. val margin: Double

    Permalink
  19. var mask: Tensor[T]

    Permalink
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. var output: T

    Permalink
    Definition Classes
    AbstractCriterion
  24. val sizeAverage: Boolean

    Permalink
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    MarginRankingCriterion → AnyRef → Any
  27. def updateGradInput(input: Table, y: Table): Table

    Permalink

    Computing the gradient of the criterion with respect to its own input.

    Computing the gradient of the criterion with respect to its own input. This is returned in gradInput. Also, the gradInput state variable is updated accordingly.

    input

    input data

    returns

    gradient of input

    Definition Classes
    MarginRankingCriterionAbstractCriterion
  28. def updateOutput(input: Table, y: Table): T

    Permalink

    Computes the loss using input and objective function.

    Computes the loss using input and objective function. This function returns the result which is stored in the output field.

    input

    input of the criterion

    returns

    the loss of the criterion

    Definition Classes
    MarginRankingCriterionAbstractCriterion
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AbstractCriterion[Table, Table, T]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped