class LinearLayer extends AnyRef

Implements one linear layer

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

Instance Constructors

  1. new LinearLayer(name: String, dual: Boolean, weights: MathMatrix, biasesOpt: Option[MathColVector], labelsOpt: Option[Array[String]])

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. val biasesOpt: Option[MathColVector]
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def concatenateModifierAndHead(sentenceHiddenStates: MathMatrix, modifierAbsolutePosition: Int, headRelativePosition: Int): MathMatrix

    Generates a 1-row matrix containing a concatenation of the modifier and head embeddings

  8. def concatenateModifiersAndHeads(sentenceHiddenStates: MathMatrix, headRelativePositions: Array[Int]): MathMatrix
  9. val dual: Boolean
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. def forward(inputBatch: Array[MathMatrix]): Array[MathMatrix]

    Forward pass for a batch of sentences

    Forward pass for a batch of sentences

    inputBatch

    Each matrix in the batch has dimensions (sentence size x hidden state size)

    returns

    Each output matrix has dimensions (sentence size x labels size)

  14. def forward(inputSentence: MathMatrix): MathMatrix

    Forward pass for a single sentence

  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. val labelsOpt: Option[Array[String]]
  19. val name: String
  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. def predict(inputBatch: Array[MathMatrix], batchHeads: Option[Array[Array[Int]]], batchMasks: Option[Array[Array[Boolean]]]): Array[Array[String]]

    Predict the top label for each token in each sentence in the batch

  24. def predict(inputSentence: MathMatrix, heads: Option[Array[Int]], masks: Option[Array[Boolean]]): Array[String]

    Predict the top label per token

  25. def predictDual(inputBatch: Array[MathMatrix], batchHeads: Option[Array[Array[Int]]] = None, batchMasks: Option[Array[Array[Boolean]]] = None): Array[Array[String]]

    Predict the top label for each combination of modifier token and corresponding head token

  26. def predictDualWithScores(inputBatch: Array[MathMatrix], batchHeads: Option[Array[Array[Array[Int]]]] = None, batchMasks: Option[Array[Array[Boolean]]] = None): Array[Array[Array[(String, Float)]]]
  27. def predictPrimal(inputBatch: Array[MathMatrix]): Array[Array[String]]
  28. def predictPrimalWithScores(inputBatch: Array[MathMatrix]): Array[Array[Array[(String, Float)]]]
  29. def predictWithScores(inputBatch: Array[MathMatrix], batchHeads: Option[Array[Array[Array[Int]]]], batchMasks: Option[Array[Array[Boolean]]]): Array[Array[Array[(String, Float)]]]

    Predict all labels and their scores per token in each sentence in the batch

  30. def predictWithScores(inputSentence: MathMatrix, heads: Option[Array[Array[Int]]], masks: Option[Array[Boolean]]): Array[Array[(String, Float)]]

    Predict all labels and their scores per token

  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  36. val weights: MathMatrix

Inherited from AnyRef

Inherited from Any

Ungrouped