Documentation
¶
Overview ¶
Package data provides a data pipeline for feeding arrays to models, analogous to tf.data.Dataset.
Index ¶
- type Dataset
- func (d *Dataset) Batch(batchSize int) *Dataset
- func (d *Dataset) Iterator() *Iterator
- func (d *Dataset) Len() int
- func (d *Dataset) Map(fn func(*numgo.NDArray) (*numgo.NDArray, error)) *Dataset
- func (d *Dataset) Repeat(count int) *Dataset
- func (d *Dataset) Shuffle(seed int64) *Dataset
- func (d *Dataset) Take(count int) *Dataset
- type Iterator
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
}
Dataset represents a pipeline of array batches. Analogous to tf.data.Dataset.
func FromNDArraySlice ¶
FromNDArraySlice creates a Dataset from a slice of NDArrays directly.
func FromSlices ¶
FromSlices creates a Dataset from an NDArray by slicing along axis 0. Each element in the dataset is a single sample. Analogous to tf.data.Dataset.from_tensor_slices.
func (*Dataset) Batch ¶
Batch sets the batch size for the dataset. Analogous to tf.data.Dataset.batch.
func (*Dataset) Map ¶
Map applies a transformation function to each element. Analogous to tf.data.Dataset.map.
func (*Dataset) Repeat ¶
Repeat sets the dataset to repeat the given number of times. count=-1 means repeat indefinitely (use Take to limit). Analogous to tf.data.Dataset.repeat.