Class

com.intel.analytics.bigdl.nn.abstractnn

AbstractCriterion

Related Doc: package abstractnn

Permalink

abstract class AbstractCriterion[A <: Activity, B <: Activity, T] extends Serializable

AbstractCriterion is an abstract class the concrete criterion should extend. Criterions are helpful to train a neural network. Given an input and a target, they compute the gradient according to a loss function.

It provides some important method such as forward, backward, updateOutput, updateGradInput frequently used as a criteria. Some of them need to be override in a concrete criterion class.

A

represents the input type of the criterion, which an be abstract type Activity, or concrete type Tensor or Table

B

represents the output type of the criterion

T

The numeric type in the criterion, usually which are Float or Double

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractCriterion
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractCriterion()(implicit arg0: ClassTag[A], arg1: ClassTag[B], arg2: ClassTag[T], ev: TensorNumeric[T])

    Permalink

Abstract Value Members

  1. abstract def updateGradInput(input: A, target: B): A

    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

    target

    target data / labels

    returns

    gradient of input

Concrete 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: A, target: B): A

    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

  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[A, B, T]

    Permalink

    Deep copy this criterion

    Deep copy this criterion

    returns

    a deep copied criterion

  9. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AbstractCriterion → AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def forward(input: A, target: B): 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

  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. var gradInput: A

    Permalink
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AbstractCriterion → AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  20. var output: T

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. def updateOutput(input: A, target: B): 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

    target

    target or labels

    returns

    the loss of the criterion

  24. final def wait(): Unit

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped