Packages

class Tanh extends AnyRef

The Tanh class implements Tanh and derivative for vector version

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Tanh
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Tanh()

Value Members

  1. def backward(input: VectoD, top_diff: VectoD): VectoD

    Compute the derivative correponding to the input.

    Compute the derivative correponding to the input.

    input

    the input vector

    top_diff

    dl/dz where l is the loss, z is the output

  2. def forward(input: VectoD): VectoD

    Compute tanh on the vector input.

    Compute tanh on the vector input.

    input

    the input vector