recunn.datasets
Class TextGeneration
- java.lang.Object
-
- recunn.datastructs.DataSet
-
- recunn.datasets.TextGeneration
-
- All Implemented Interfaces:
- java.io.Serializable
public class TextGeneration extends DataSet
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static booleanreportPerplexitystatic intreportSequenceLengthstatic booleansingleWordAutocorrect-
Fields inherited from class recunn.datastructs.DataSet
inputDimension, lossReporting, lossTraining, outputDimension, testing, training, validation
-
-
Constructor Summary
Constructors Constructor and Description TextGeneration(java.lang.String path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidDisplayReport(Model model, java.util.Random rng)static java.util.List<java.lang.String>generateText(Model model, int steps, boolean argmax, double temperature, java.util.Random rng)NonlinearitygetModelOutputUnitToUse()static java.lang.StringsequenceToSentence(DataSequence sequence)
-
-
-
Field Detail
-
reportSequenceLength
public static int reportSequenceLength
-
singleWordAutocorrect
public static boolean singleWordAutocorrect
-
reportPerplexity
public static boolean reportPerplexity
-
-
Constructor Detail
-
TextGeneration
public TextGeneration(java.lang.String path) throws java.lang.Exception- Throws:
java.lang.Exception
-
-
Method Detail
-
generateText
public static java.util.List<java.lang.String> generateText(Model model, int steps, boolean argmax, double temperature, java.util.Random rng) throws java.lang.Exception
- Throws:
java.lang.Exception
-
sequenceToSentence
public static java.lang.String sequenceToSentence(DataSequence sequence)
-
DisplayReport
public void DisplayReport(Model model, java.util.Random rng) throws java.lang.Exception
- Specified by:
DisplayReportin classDataSet- Throws:
java.lang.Exception
-
getModelOutputUnitToUse
public Nonlinearity getModelOutputUnitToUse()
- Specified by:
getModelOutputUnitToUsein classDataSet
-
-
DataMelt 3.0 © DataMelt by jWork.ORG