Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prediction ¶
type Prediction struct {
// contains filtered or unexported fields
}
Prediction is the based type that can be used as a training dataset
func NewPrediction ¶
func NewPrediction(input string, runeToIdx func(r rune) (int, error), sampleSize, vocabSize int) *Prediction
NewPrediction return an object suitable for the LSTM
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
Section ...
func (*Section) GetComputedVectors ¶
GetComputedVectors ..
func (*Section) GetExpectedValue ¶
GetExpectedValue returns the encoded value of the rune next to the one present at offset
func (*Section) ReadInputVector ¶
ReadInputVector returns the input vector until it reach the penultimate rune the ultimate rune is not used as input within the current section as an input
type TrainingSet ¶
type TrainingSet struct {
// contains filtered or unexported fields
}
TrainingSet ...
func NewTrainingSet ¶
func NewTrainingSet(rs io.ReadSeeker, runeToIdx func(r rune) (int, error), vocabSize, batchsize, step int) *TrainingSet
NewTrainingSet from a ReadSeeker
func (*TrainingSet) GetTrainer ¶
func (t *TrainingSet) GetTrainer() (datasetter.Trainer, error)
GetTrainer returns a pointer so a Section. It reads batchSize runes and add it to the returned section. The offset of the underlying io.ReadSeeker is set to the position it had when entering the function + step * runes * rune_size Any error in reading is returned