Object

com.thoughtworks.deeplearning

DifferentiableINDArray

Related Doc: package deeplearning

Permalink

object DifferentiableINDArray

A namespace of common operators for INDArray layers.

After importing DifferentiableINDArray._,

You will able to use MathFunctions,like

You will able to use MathMethods,like

You will able to use INDArrayLayerOps,like

You will able to use some methods like conv2d

Author:

杨博 (Yang Bo) <[email protected]>

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

Type Members

  1. final class INDArrayLayerOps[Input <: Tape] extends AnyRef

    Permalink
  2. implicit final class INDArrayOps extends AnyRef

    Permalink
  3. trait OptimizerFactory extends AnyRef

    Permalink

    If a Optimizer has state, then learningRate can NOT been shared, such as Adam, so you will need:

    If a Optimizer has state, then learningRate can NOT been shared, such as Adam, so you will need:

    Example:
    1. implicit val optimizerFactory = new DifferentiableINDArray.OptimizerFactory {
        override def ndArrayOptimizer(weight: Weight): Optimizer = {
          new LearningRate with L2Regularization with Adam {
            var learningRate = 0.00003
            override protected def l2Regularization: Double = 0.00003
            override protected def currentLearningRate(): Double = {
            learningRate * 0.75
            learningRate
           }
         }
       }
      }
  4. final class ToINDArrayLayerOps[Input <: Tape] extends AnyRef

    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. implicit def Double*INDArray[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts a Double Layer and a INDArray Layer.

    Returns a Case that accepts a Double Layer and a INDArray Layer.

    The returned Case is used by the polymorphic function *, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherDoubleLayer: Double @Symbolic) = {
        Poly.MathMethods.*(inputINDArrayLayer,anotherDoubleLayer)
      }
  5. implicit def Double+INDArray[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts a Double Layer and a INDArray Layer.

    Returns a Case that accepts a Double Layer and a INDArray Layer.

    The returned Case is used by the polymorphic function +, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherDoubleLayer: Double @Symbolic) = {
        Poly.MathMethods.+(inputINDArrayLayer,anotherDoubleLayer)
      }
  6. implicit def Double-INDArray[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts a Double Layer and a INDArray Layer.

    Returns a Case that accepts a Double Layer and a INDArray Layer.

    The returned Case is used by the polymorphic function -, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherDoubleLayer: Double @Symbolic) = {
        Poly.MathMethods.-(inputINDArrayLayer,anotherDoubleLayer)
      }
  7. implicit def Double/INDArray[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts a Double Layer and a INDArray Layer.

    Returns a Case that accepts a Double Layer and a INDArray Layer.

    The returned Case is used by the polymorphic function /, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherDoubleLayer: Double @Symbolic) = {
        Poly.MathMethods./(inputINDArrayLayer,anotherDoubleLayer)
      }
  8. implicit def INDArray*Double[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts a INDArray Layer and a Double Layer.

    Returns a Case that accepts a INDArray Layer and a Double Layer.

    The returned Case is used by the polymorphic function *, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherDoubleLayer: Double @Symbolic) = {
        Poly.MathMethods.*(inputINDArrayLayer,anotherDoubleLayer)
      }
  9. implicit def INDArray*INDArray[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts two INDArray Layers.

    Returns a Case that accepts two INDArray Layers.

    The returned Case is used by the polymorphic function *, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherINDArrayLayer: INDArray @Symbolic) = {
        Poly.MathMethods.*(inputINDArrayLayer,anotherINDArrayLayer)
      }
  10. implicit def INDArray+Double[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts a INDArray Layer and a Double Layer.

    Returns a Case that accepts a INDArray Layer and a Double Layer.

    The returned Case is used by the polymorphic function +, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherDoubleLayer: Double @Symbolic) = {
        Poly.MathMethods.+(inputINDArrayLayer,anotherDoubleLayer)
      }
  11. implicit def INDArray+INDArray[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts two INDArray Layers.

    Returns a Case that accepts two INDArray Layers.

    The returned Case is used by the polymorphic function +, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherINDArrayLayer: INDarray @Symbolic) = {
        Poly.MathMethods.+(inputINDArrayLayer,anotherINDArrayLayer)
      }
  12. implicit def INDArray-Double[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts a INDArray Layer and a Double Layer.

    Returns a Case that accepts a INDArray Layer and a Double Layer.

    The returned Case is used by the polymorphic function -, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherDoubleLayer: Double @Symbolic) = {
        Poly.MathMethods.-(inputINDArrayLayer,anotherDoubleLayer)
      }
  13. implicit def INDArray-INDArray[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts two INDArray Layers.

    Returns a Case that accepts two INDArray Layers.

    The returned Case is used by the polymorphic function -, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherINDArrayLayer: INDarray @Symbolic) = {
        Poly.MathMethods.-(inputINDArrayLayer,anotherINDArrayLayer)
      }
  14. implicit def INDArray/Double[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts a INDArray Layer and a Double Layer.

    Returns a Case that accepts a INDArray Layer and a Double Layer.

    The returned Case is used by the polymorphic function /, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherDoubleLayer: Double @Symbolic) = {
        Poly.MathMethods./(inputINDArrayLayer,anotherDoubleLayer)
      }
  15. implicit def INDArray/INDArray[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts two INDArray Layers.

    Returns a Case that accepts two INDArray Layers.

    The returned Case is used by the polymorphic function /, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherINDArrayLayer: INDArray @Symbolic) = {
        Poly.MathMethods./(inputINDArrayLayer,anotherINDArrayLayer)
      }
  16. object Layers

    Permalink
  17. object OptimizerFactory

    Permalink

    If you write something like this:

    If you write something like this:

    implicit def optimizer: Optimizer = new LearningRate {
      def currentLearningRate() = 0.001
    }

    the learningRate will shared with all layers. If a Optimizer has state, then learningRate can NOT been shared.

  18. object Optimizers

    Permalink

    A namespaces contains Optimizers for INDArray.

    A namespaces contains Optimizers for INDArray.

    See also

    Weight

  19. implicit def abs(INDArray)[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts INDArray Layers for the polymorphic function abs

    Returns a Case that accepts INDArray Layers for the polymorphic function abs

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray.`abs(INDArray)`
      import com.thoughtworks.deeplearning.Symbolic
      def absNetwork(implicit inputINDArrayLayer: INDArray @Symbolic) = {
        Poly.MathFunctions.abs(indArrayLayer)
      }
    Note

    Importing this method will enable abs for INDArray layers or any value able to convert to a INDArray layer

    See also

    Poly.LayerPoly1

  20. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  21. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def conv2d[Layer, Weight, Bias, Input <: Tape](layer: Layer, weight: Weight, bias: Bias, kernel: (Int, Int), stride: (Int, Int), padding: (Int, Int))(implicit layerToLayer: Aux[Layer, Input, INDArray, INDArray], weightToLayer: Aux[Weight, Input, INDArray, INDArray], biasToLayer: Aux[Bias, Input, INDArray, INDArray]): Aux[Input, Tape]

    Permalink

    Calculates the 2D convolution

    Calculates the 2D convolution

    layer

    4 dimensions INDArray input

    weight

    4 dimensions INDArray weight

    bias

    1 dimension bias

    kernel

    the kernel/filter width and height

    stride

    the stride width and height

    padding

    the padding width and height

    returns

    convolution result

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

    Permalink
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. implicit def exp(INDArray)[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts INDArray Layers.

    Returns a Case that accepts INDArray Layers.

    The returned Case is used by the polymorphic function exp, which is called in MathOps.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray.`exp(INDArray)`
      import com.thoughtworks.deeplearning.Symbolic
      def expNetwork(implicit inputINDArrayLayer: INDArray @Symbolic) = {
        Poly.MathFunctions.exp(indArrayLayer)
      }
    Note

    Importing this method will enable exp for INDArray layers or any value able to convert to a INDArray layer

    See also

    Poly.LayerPoly1

  26. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  29. implicit def indArrayToLiteral: Aux[INDArray, INDArray, INDArray]

    Permalink
  30. implicit def indArrayTrainable: Trainable[INDArray, INDArray]

    Permalink

    See also

    Trainable

  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. implicit def log(INDArray)[Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts INDArray Layers for the polymorphic function log

    Returns a Case that accepts INDArray Layers for the polymorphic function log

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray.`log(INDArray)`
      import com.thoughtworks.deeplearning.Symbolic
      def logNetwork(implicit inputINDArrayLayer: INDArray @Symbolic) = {
        Poly.MathFunctions.log(indArrayLayer)
      }
    Note

    Importing this method will enable log for INDArray layers or any value able to convert to a INDArray layer

    See also

    Poly.LayerPoly1

  33. implicit def max(INDArray,Double)[Left, Right, Input <: Tape]: Aux[Aux[Input, Tape], Aux[Input, Tape], Aux[Input, Tape]]

    Permalink

    Returns a Case that accepts a INDArray Layer and a Double Layer for the polymorphic function max

    Returns a Case that accepts a INDArray Layer and a Double Layer for the polymorphic function max

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
      import com.thoughtworks.deeplearning.Symbolic
      def myNetwork(implicit inputINDArrayLayer: INDArray @Symbolic)(anotherDoubleLayer: Double @Symbolic) = {
        Poly.MathFunctions.max(inputINDArrayLayer,anotherDoubleLayer)
      }
  34. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. implicit def toINDArrayLayerOps[From, Input <: Tape, OutputData, OutputDelta](from: From)(implicit toLayer: Aux[From, Input, OutputData, OutputDelta], constrait: <:<[Aux[Input, Aux[OutputData, OutputDelta]], Aux[Input, Aux[INDArray, INDArray]]]): INDArrayLayerOps[Input]

    Permalink

    Implicitly converts any layer to INDArrayLayerOps, which enables common methods for INDArray layers.

    Implicitly converts any layer to INDArrayLayerOps, which enables common methods for INDArray layers.

    Example:
    1. import com.thoughtworks.deeplearning.DifferentiableINDArray._
  39. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  40. implicit def toToINDArrayLayerOps[Element, Input <: Tape](layerVector: Seq[Seq[Element]])(implicit toLayer: OfPlaceholder[Element, Input, DoublePlaceholder]): ToINDArrayLayerOps[Input]

    Permalink
  41. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped