Documentation ¶
Overview ¶
Package mnist provides an interface to read the MNIST interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSet ¶
type DataSet struct {
// contains filtered or unexported fields
}
The DataSet can provide MNIST data.
func (*DataSet) Next ¶
Next returns the next image and label. It panics if there is no more images in the dataset.
func (*DataSet) OpenTestFile ¶
func (d *DataSet) OpenTestFile()
OpenTestFile opens the files for training.
func (*DataSet) OpenTrainingFile ¶
func (d *DataSet) OpenTrainingFile()
OpenTrainingFile opens the files for training.
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
A DataSource provides convenient solution to feed data to neural networks.
func NewTestDataSource ¶
func NewTestDataSource(to tensor.Operator) *DataSource
NewTestDataSource creates a DataSource object that fetches data from the test set.
func NewTrainingDataSource ¶
func NewTrainingDataSource(to tensor.Operator) *DataSource
NewTrainingDataSource returns a DataSource object that fetches data from the training set.
func (*DataSource) NextBatch ¶
func (ds *DataSource) NextBatch(batchSize int) ( data tensor.Tensor, label []int, )
NextBatch returns another batch of data.
func (*DataSource) Rewind ¶
func (ds *DataSource) Rewind()
Rewind resets the pointer to the beginning of the dataset.