an encoder object
a decoder object
shape of encoder input, for variable length, please input -1
shape of decoder input, for variable length, please input -1
connect encoder and decoder
Feeding decoder output to generator to generate final result
connect encoder and decoder
Override this method to define a model.
a decoder object
an encoder object
Feeding decoder output to generator to generate final result
Infer output with given input
Infer output with given input
a sequence of data feed into encoder, eg: batch x seqLen x featureSize
a tensor which represents start and is fed into decoder
max sequence length for final output
a tensor that indicates model should stop infer further if current output is the same with stopSign
Feeding model output to buildOutput to generate final result
shape of encoder input, for variable length, please input -1
The defined model, either from buildModel() or loaded from file.
The defined model, either from buildModel() or loaded from file.
shape of decoder input, for variable length, please input -1
Predict for classes.
Predict for classes. By default, label predictions start from 0.
Prediction data, RDD of Sample.
Number of samples per batch. Default is 32.
Boolean. Whether result labels start from 0. Default is true. If false, result labels start from 1.
Save the model to the specified path.
Save the model to the specified path.
The path to save the model. Local file system, HDFS and Amazon S3 are supported. HDFS path should be like "hdfs://[host]:[port]/xxx". Amazon S3 path should be like "s3a://bucket/xxx".
The path to save weights. Default is null.
Whether to overwrite the file if it already exists. Default is false.
Set the model to be in evaluate status, i.e.
Set the model to be in evaluate status, i.e. remove the effect of Dropout, etc.
Print out the summary of the model.
Print out the summary of the model.
(Since version 0.3.0) please use recommended saveModule(path, overWrite)
Seq2seq A trainable interface for a simple, generic encoder + decoder model