Documentation ¶
Overview ¶
Package xor implements a extremely simple network that can perform the xor operation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Benchmark ¶
type Benchmark struct {
// contains filtered or unexported fields
}
Benchmark defines the XOR network training benchmark.
func NewBenchmark ¶
NewBenchmark creates a new benchmark.
func (*Benchmark) SetUnifiedMemory ¶
func (b *Benchmark) SetUnifiedMemory()
SetUnifiedMemory asks the benchmark to use unified memory.
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
DataSource defines the training dataset for the xor operation.
func NewDataSource ¶
func NewDataSource(to tensor.Operator) *DataSource
NewDataSource creates a new XOR datasource
func (*DataSource) NextBatch ¶
func (ds *DataSource) NextBatch(batchSize int) ( data tensor.Tensor, label []int, )
NextBatch returns the next batch data.
func (*DataSource) Rewind ¶
func (ds *DataSource) Rewind()
Rewind moves the pointer to the beginning of the training set.
Click to show internal directories.
Click to hide internal directories.