Package com.gengoai.hermes.ml
Class ElmoSeq2SeqModel
- java.lang.Object
-
- com.gengoai.apollo.ml.model.TensorFlowModel
-
- com.gengoai.hermes.ml.TensorFlowSequenceLabeler
-
- com.gengoai.hermes.ml.ElmoSeq2SeqModel
-
- All Implemented Interfaces:
Model
,Transform
,Copyable<Transform>
,SerializableFunction<HString,HString>
,HStringMLModel
,Serializable
,Function<HString,HString>
- Direct Known Subclasses:
ElmoNERModel
public abstract class ElmoSeq2SeqModel extends TensorFlowSequenceLabeler
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
LABEL
static String
SEQUENCE_LENGTH
static String
TOKENS
-
Fields inherited from class com.gengoai.apollo.ml.model.TensorFlowModel
inputs, modelFile, outputs, transformer
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ElmoSeq2SeqModel(@NonNull AnnotationType annotationType, @NonNull AnnotationType trainingAnnotationType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,org.tensorflow.Tensor<?>>
createTensors(DataSet batch)
HStringDataSetGenerator
getDataGenerator()
Gets data generator.-
Methods inherited from class com.gengoai.hermes.ml.TensorFlowSequenceLabeler
apply, decodeNDArray, delegate, getLabelType, setVersion
-
Methods inherited from class com.gengoai.apollo.ml.model.TensorFlowModel
calculate_max_sequence_length, createTransformer, estimate, getFitParameters, getInputs, getOutputs, load, processBatch, save, setEncoder, transform, transform
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gengoai.hermes.ml.HStringMLModel
estimate, estimate, getEvaluator, getFitParameters, getInputs, getOutput, getOutputs, getVersion, transform, transform, transform, transform
-
Methods inherited from interface com.gengoai.apollo.ml.model.Model
copy, fitAndTransform, getLabelType, save
-
Methods inherited from interface com.gengoai.function.SerializableFunction
andThen, asConsumer, compose
-
-
-
-
Field Detail
-
LABEL
public static final String LABEL
- See Also:
- Constant Field Values
-
TOKENS
public static final String TOKENS
- See Also:
- Constant Field Values
-
SEQUENCE_LENGTH
public static final String SEQUENCE_LENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ElmoSeq2SeqModel
protected ElmoSeq2SeqModel(@NonNull @NonNull AnnotationType annotationType, @NonNull @NonNull AnnotationType trainingAnnotationType)
-
-
Method Detail
-
createTensors
protected Map<String,org.tensorflow.Tensor<?>> createTensors(DataSet batch)
- Overrides:
createTensors
in classTensorFlowModel
-
getDataGenerator
public HStringDataSetGenerator getDataGenerator()
Description copied from interface:HStringMLModel
Gets data generator.- Returns:
- the data generator
-
-