Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prediction ¶
type Prediction struct{}
Prediction is the based type that can be used as a training dataset
func (*Prediction) GetComputedVectors ¶
func (p *Prediction) GetComputedVectors() G.Nodes
GetComputedVectors ...
func (*Prediction) ReadInputVector ¶
ReadInputVector ...
func (*Prediction) WriteComputedVector ¶
func (p *Prediction) WriteComputedVector(n *G.Node) error
WriteComputedVector ...
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) GetTrainingSet ¶
func (t *TrainingSet) GetTrainingSet() (*Section, error)
GetTrainingSet 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