class TensorflowT5 extends Serializable
This class is used to run T5 model for For Sequence Batches of WordpieceTokenizedSentence. Input for this model must be tokenized with a SentencePieceModel,
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- TensorflowT5
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
-
new
TensorflowT5(tensorflow: TensorflowWrapper, spp: SentencePieceWrapper, configProtoBytes: Option[Array[Byte]] = None, signatures: Option[Map[String, String]] = None)
- tensorflow
Albert Model wrapper with TensorFlowWrapper
- spp
Albert SentencePiece model with SentencePieceWrapper
- configProtoBytes
Configuration for TensorFlow session
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def createNextTokenLogitsPenalties(inputIds: Seq[Array[Int]], logits: Array[Array[Float]], repetitionPenalty: Double): Array[Array[Float]]
- def decode(sentences: Array[Array[Int]]): Seq[String]
- def encode(sentences: Seq[Annotation], task: String): Seq[Array[Int]]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def generateNoBeamSearch(inputIds: Seq[Array[Int]], decoderEncoderStateTensors: Tensor, encoderAttentionMaskTensors: Tensor, maxOutputLength: Int, minOutputLength: Int, doSample: Boolean, temperature: Double, topK: Int, topP: Double, repetitionPenalty: Double, noRepeatNgramSize: Int, batch_size: Int, vocab_size: Int, randomSeed: Option[Long], session: Session, ignoreTokenIds: Array[Int] = Array()): Array[Array[Int]]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getGeneratedNgrams(prevInputIds: Seq[Array[Int]], generatedNgrams: Array[Map[IndexedSeq[Int], List[Int]]], hypoIdx: Int, curLen: Int, noRepeatNgramSize: Int): Array[Int]
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def predict(sentences: Seq[Annotation], batchSize: Int, minOutputLength: Int, maxOutputLength: Int, doSample: Boolean, temperature: Double, topK: Int, topP: Double, repetitionPenalty: Double, noRepeatNgramSize: Int, task: String, randomSeed: Option[Long] = None, ignoreTokenIds: Array[Int] = Array()): Seq[Annotation]
- val spp: SentencePieceWrapper
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def tag(batch: Seq[Array[Int]], minOutputLength: Int, maxOutputLength: Int, doSample: Boolean, temperature: Double, topK: Int, topP: Double, repetitionPenalty: Double, noRepeatNgramSize: Int, randomSeed: Option[Long], ignoreTokenIds: Array[Int] = Array()): Array[Array[Int]]
- val tensorflow: TensorflowWrapper
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()