com
.
johnsnowlabs
.
ml
.
tensorflow
TensorflowGPT2
Related Doc:
package tensorflow
class
TensorflowGPT2
extends
Serializable
Linear Supertypes
Serializable
,
Serializable
,
AnyRef
,
Any
Ordering
Alphabetic
By Inheritance
Inherited
TensorflowGPT2
Serializable
Serializable
AnyRef
Any
Hide All
Show All
Visibility
Public
All
Instance Constructors
new
TensorflowGPT2
(
tensorflow:
TensorflowWrapper
,
bpeTokenizer:
Gpt2Tokenizer
,
configProtoBytes:
Option
[
Array
[
Byte
]] =
None
)
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
val
bpeTokenizer
:
Gpt2Tokenizer
def
clone
()
:
AnyRef
Attributes
protected[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
(
...
)
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[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
(
classOf[java.lang.Throwable]
)
def
generateNoBeamSearch
(
inputIds:
Seq
[
Array
[
Int
]]
,
maxOutputLength:
Int
,
minOutputLength:
Int
,
doSample:
Boolean
,
temperature:
Double
,
topK:
Int
,
topP:
Double
,
repetitionPenalty:
Double
,
noRepeatNgramSize:
Int
,
batch_size:
Int
,
vocab_size:
Int
,
randomSeed:
Option
[
Int
]
,
session:
Session
,
ignoreTokenIds:
Array
[
Int
] =
Array()
)
:
Array
[
Array
[
Int
]]
final
def
getClass
()
:
Class
[_]
Definition Classes
AnyRef → Any
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
final
def
isInstanceOf
[
T0
]
:
Boolean
Definition Classes
Any
final
def
ne
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
notify
()
:
Unit
Definition Classes
AnyRef
final
def
notifyAll
()
:
Unit
Definition Classes
AnyRef
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
[
Int
] =
None
,
ignoreTokenIds:
Array
[
Int
] =
Array()
)
:
Seq
[
Annotation
]
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
[
Int
]
,
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
(
...
)
Inherited from
Serializable
Inherited from
Serializable
Inherited from
AnyRef
Inherited from
Any
Ungrouped