Packages

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

Creates a criterion that measures the loss given an input x = {x1, x2}, a table of two Tensors, and a Tensor label y with values 1 or -1.

Annotations
@SerialVersionUID()
Linear Supertypes
AbstractCriterion[Table, Table, T], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CosineEmbeddingCriterion
  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 CosineEmbeddingCriterion(margin: Double = 0.0, sizeAverage: Boolean = true)(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    margin

    a number from -1 to 1, 0 to 0.5 is suggested

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def backward(input: Table, target: Table): Table

    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
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def cloneCriterion(): AbstractCriterion[Table, Table, T]

    Deep copy this criterion

    Deep copy this criterion

    returns

    a deep copied criterion

    Definition Classes
    AbstractCriterion
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(other: Any): Boolean
    Definition Classes
    CosineEmbeddingCriterionAbstractCriterion → AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def forward(input: Table, target: Table): T

    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
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. var gradInput: Table
    Definition Classes
    AbstractCriterion
  15. def hashCode(): Int
    Definition Classes
    CosineEmbeddingCriterionAbstractCriterion → AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val margin: Double
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. var output: T
    Definition Classes
    AbstractCriterion
  22. val sizeAverage: Boolean
  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    CosineEmbeddingCriterion → AnyRef → Any
  25. def updateGradInput(input: Table, target: Table): Table

    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

    target

    target data / labels

    returns

    gradient of input

    Definition Classes
    CosineEmbeddingCriterionAbstractCriterion
  26. def updateOutput(input: Table, target: Table): T

    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

    target

    target or labels

    returns

    the loss of the criterion

    Definition Classes
    CosineEmbeddingCriterionAbstractCriterion
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AbstractCriterion[Table, Table, T]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped