Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sample ¶
type Sample struct {
Sentence []Token
}
Sample is one sentence
func NewDataset ¶
func (*Sample) V1 ¶
func (s *Sample) V1(dim, pos int) SampleSentence
func (*Sample) V2 ¶ added in v0.2.0
func (s *Sample) V2(dim, pos int) SampleSentence
type SampleSentence ¶
type SampleSentence struct { Sample *Sample // contains filtered or unexported fields }
func (*SampleSentence) IO ¶
func (s *SampleSentence) IO(n int) (ret *SampleSentenceIO)
func (*SampleSentence) Len ¶
func (s *SampleSentence) Len() int
type SampleSentenceIO ¶
type SampleSentenceIO struct { SampleSentence *SampleSentence // contains filtered or unexported fields }
func (*SampleSentenceIO) Feature ¶
func (s *SampleSentenceIO) Feature(n int) (ret uint32)
Feature: calculates query, key, value input for attention matrix n - if dividible by 3, it's supposed to return the homograph n - if equal to 1 divided by 3, it calculates the key token n - if equal to 2 divided by 3, it calculates the value token
func (*SampleSentenceIO) Output ¶
func (s *SampleSentenceIO) Output() (ret uint16)
func (*SampleSentenceIO) Parity ¶
func (s *SampleSentenceIO) Parity() (ret uint16)
Click to show internal directories.
Click to hide internal directories.