Packages

class SmoothL1CriterionWithWeights[T] extends AbstractCriterion[Tensor[T], Table, T]

a smooth version of the AbsCriterion It uses a squared term if the absolute element-wise error falls below 1. It is less sensitive to outliers than the MSECriterion and in some cases prevents exploding gradients (e.g. see "Fast R-CNN" paper by Ross Girshick).

d = (x - y) * w_in loss(x, y, w_in, w_out) | 0.5 * (sigma * d_i)^2 * w_out if |d_i| < 1 / sigma / sigma

1/n \sum | | (|d_i| - 0.5 / sigma / sigma) * w_out otherwise

Linear Supertypes
AbstractCriterion[Tensor[T], Table, T], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SmoothL1CriterionWithWeights
  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 SmoothL1CriterionWithWeights(sigma: Double, num: Int = 0)(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

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: Tensor[T], target: Table): Tensor[T]

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

    Deep copy this criterion

    Deep copy this criterion

    returns

    a deep copied criterion

    Definition Classes
    AbstractCriterion
  10. var diff: Tensor[T]
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(other: Any): Boolean
    Definition Classes
    AbstractCriterion → AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def forward(input: Tensor[T], 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
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. var gradInput: Tensor[T]
    Definition Classes
    AbstractCriterion
  17. var hasWeights: Boolean
  18. def hashCode(): Int
    Definition Classes
    AbstractCriterion → AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. val num: Int
  24. var output: T
    Definition Classes
    AbstractCriterion
  25. val sigma: Double
  26. val sigma2: Double
  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    SmoothL1CriterionWithWeights → AnyRef → Any
  29. def updateGradInput(input: Tensor[T], target: Table): Tensor[T]

    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
    SmoothL1CriterionWithWeightsAbstractCriterion
  30. def updateOutput(input: Tensor[T], 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
    SmoothL1CriterionWithWeightsAbstractCriterion
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AbstractCriterion[Tensor[T], Table, T]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped