Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package thoughtworks
    Definition Classes
    com
  • package deeplearning

    This is the documentation for the DeepLearning.Scala

    This is the documentation for the DeepLearning.Scala

    Overview

    BufferedLayer, DifferentiableAny, DifferentiableNothing, Layer, Poly and Symbolic are base packages which contains necessary operations , all other packages dependent on those base packages.

    If you want to implement a layer, you need to know how to use base packages.

    Imports guidelines

    If you want use some operations of Type T, you should import:

    import com.thoughtworks.deeplearning.DifferentiableT._

    it means: If you want use some operations of INDArray, you should import:

    import com.thoughtworks.deeplearning.DifferentiableINDArray._

    If you write something like this:

    def softmax(implicit scores: INDArray @Symbolic): INDArray @Symbolic = {
      val expScores = exp(scores)
      expScores / expScores.sum(1)
    }

    If compiler shows error :

    Could not infer implicit value for com.thoughtworks.deeplearning.Symbolic[org.nd4j.linalg.api.ndarray.INDArray]

    you need add import this time :

    import com.thoughtworks.deeplearning.DifferentiableINDArray._

    If you write something like this:

    def crossEntropyLossFunction(
      implicit pair: (INDArray :: INDArray :: HNil) @Symbolic)
    : Double @Symbolic = {
     val score = pair.head
     val label = pair.tail.head
     -(label * log(score * 0.9 + 0.1) + (1.0 - label) * log(1.0 - score * 0.9)).mean
    }

    If the compiler shows error:

    value * is not a member of com.thoughtworks.deeplearning.Layer.Aux[com.thoughtworks.deeplearning.Layer.Tape.Aux[org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray],com.thoughtworks.deeplearning.DifferentiableINDArray.INDArrayPlaceholder.Tape]val bias = Nd4j.ones(numberOfOutputKernels).toWeight * 0.1...

    you need add import :

    import com.thoughtworks.deeplearning.Poly.MathMethods.*
    import com.thoughtworks.deeplearning.DifferentiableINDArray._

    If the compiler shows error:

    not found: value log -(label * log(score * 0.9 + 0.1) + (1.0 - label) * log(1.0 - score * 0.9)).mean...

    you need add import:

    import com.thoughtworks.deeplearning.Poly.MathFunctions.*
    import com.thoughtworks.deeplearning.DifferentiableINDArray._

    Those + - * / and log exp abs max min are defined at MathMethods and MathFunctions,those method are been implemented at DifferentiableType,so you need to import the implicit of DifferentiableType.

    Composability

    Neural networks created by DeepLearning.scala are composable. You can create large networks by combining smaller networks. If two larger networks share some sub-networks, the weights in shared sub-networks trained with one network affect the other network.

    Definition Classes
    thoughtworks
    See also

    Compose

  • object Poly

    A namespace of common math operators.

    A namespace of common math operators.

    MathMethods and MathFunctions provide functions like +, -, *, /, log, abs, max, min and exp, those functions been implements in specific Differentiable Object such as DifferentiableINDArray

    Author:

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

    Definition Classes
    deeplearning
    See also

    DifferentiableINDArray.exp(INDArray)

    DifferentiableINDArray.Double+INDArray

  • object MathFunctions

    Provide log, abs, max, min and exp

    Provide log, abs, max, min and exp

    Definition Classes
    Poly
  • abs
  • exp
  • log
  • max
  • min

object max extends LayerPoly2

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. max
  2. LayerPoly2
  3. Poly2
  4. Poly
  5. Serializable
  6. Serializable
  7. PolyApply
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Case[A, B] = shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, HNil]]]
    Definition Classes
    Poly2
  2. class CaseBuilder[A, B] extends AnyRef
    Definition Classes
    Poly2
  3. trait LowPriorityCaseBuilder extends AnyRef
    Definition Classes
    Poly
  4. type ProductCase[L <: HList] = shapeless.PolyDefns.Case[max.this.type, L]
    Definition Classes
    Poly

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. def andThen(f: shapeless.Poly): Compose[f.type, max.this.type]
    Definition Classes
    Poly
  5. def apply[R](implicit c: Aux[HNil, R]): R
    Definition Classes
    Poly
  6. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N, o: O, p: P, q: Q, r: R, s: S, t: T, u: U, v: V)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, ::[N, ::[O, ::[P, ::[Q, ::[R, ::[S, ::[T, ::[U, ::[V, HNil]]]]]]]]]]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  7. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N, o: O, p: P, q: Q, r: R, s: S, t: T, u: U)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, ::[N, ::[O, ::[P, ::[Q, ::[R, ::[S, ::[T, ::[U, HNil]]]]]]]]]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  8. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N, o: O, p: P, q: Q, r: R, s: S, t: T)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, ::[N, ::[O, ::[P, ::[Q, ::[R, ::[S, ::[T, HNil]]]]]]]]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  9. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N, o: O, p: P, q: Q, r: R, s: S)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, ::[N, ::[O, ::[P, ::[Q, ::[R, ::[S, HNil]]]]]]]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  10. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N, o: O, p: P, q: Q, r: R)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, ::[N, ::[O, ::[P, ::[Q, ::[R, HNil]]]]]]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  11. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N, o: O, p: P, q: Q)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, ::[N, ::[O, ::[P, ::[Q, HNil]]]]]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  12. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N, o: O, p: P)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, ::[N, ::[O, ::[P, HNil]]]]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  13. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N, o: O)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, ::[N, ::[O, HNil]]]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  14. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M, N](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, ::[N, HNil]]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  15. def apply[A, B, C, D, E, F, G, H, I, J, K, L, M](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, ::[M, HNil]]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  16. def apply[A, B, C, D, E, F, G, H, I, J, K, L](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, ::[L, HNil]]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  17. def apply[A, B, C, D, E, F, G, H, I, J, K](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, ::[K, HNil]]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  18. def apply[A, B, C, D, E, F, G, H, I, J](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, ::[J, HNil]]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  19. def apply[A, B, C, D, E, F, G, H, I](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, ::[I, HNil]]]]]]]]]]): Result
    Definition Classes
    PolyApply
  20. def apply[A, B, C, D, E, F, G, H](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, ::[H, HNil]]]]]]]]]): Result
    Definition Classes
    PolyApply
  21. def apply[A, B, C, D, E, F, G](a: A, b: B, c: C, d: D, e: E, f: F, g: G)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, ::[G, HNil]]]]]]]]): Result
    Definition Classes
    PolyApply
  22. def apply[A, B, C, D, E, F](a: A, b: B, c: C, d: D, e: E, f: F)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, ::[F, HNil]]]]]]]): Result
    Definition Classes
    PolyApply
  23. def apply[A, B, C, D, E](a: A, b: B, c: C, d: D, e: E)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, ::[E, HNil]]]]]]): Result
    Definition Classes
    PolyApply
  24. def apply[A, B, C, D](a: A, b: B, c: C, d: D)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, ::[D, HNil]]]]]): Result
    Definition Classes
    PolyApply
  25. def apply[A, B, C](a: A, b: B, c: C)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, ::[C, HNil]]]]): Result
    Definition Classes
    PolyApply
  26. def apply[A, B](a: A, b: B)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, ::[B, HNil]]]): Result
    Definition Classes
    PolyApply
  27. def apply[A](a: A)(implicit cse: shapeless.PolyDefns.Case[max.this.type, ::[A, HNil]]): Result
    Definition Classes
    PolyApply
  28. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  29. def at[A, B]: CaseBuilder[A, B]
    Definition Classes
    Poly2
  30. def caseAt[L <: HList](implicit c: ProductCase[L]): ProductCase[L]
    Definition Classes
    Poly
  31. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def compose(f: shapeless.Poly): Compose[max.this.type, f.type]
    Definition Classes
    Poly
  33. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  35. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  36. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  37. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. final def notify(): Unit
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  42. def rotateLeft[N <: Nat]: RotateLeft[max.this.type, N]
    Definition Classes
    Poly
  43. def rotateRight[N <: Nat]: RotateRight[max.this.type, N]
    Definition Classes
    Poly
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. implicit def toLayerCase[LeftOperand, RightOperand, Input <: Tape, LeftData, LeftDelta, RightData, RightDelta](implicit leftToLayer: Aux[LeftOperand, Input, LeftData, LeftDelta], rightToLayer: Aux[RightOperand, Input, RightData, RightDelta], layerCase: Lazy[Case[Aux[Input, Aux[LeftData, LeftDelta]], Aux[Input, Aux[RightData, RightDelta]]]]): Aux[LeftOperand, RightOperand, Result]
    Definition Classes
    LayerPoly2
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. def use[T, L <: HList, R](t: T)(implicit cb: max.CaseBuilder[T, L, R]): Aux[L, R]
    Definition Classes
    Poly
  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. object Case
    Definition Classes
    Poly2

Inherited from LayerPoly2

Inherited from Poly2

Inherited from shapeless.Poly

Inherited from Serializable

Inherited from Serializable

Inherited from PolyApply

Inherited from AnyRef

Inherited from Any

Ungrouped