Versions in this module Expand all Collapse all v0 v0.9.2 Apr 21, 2024 v0.9.1 Apr 21, 2024 Changes in this version + type BatchSampler struct + func NewBatchSampler(n, batchSize int, dropLast bool, shuffleOpt ...bool) (*BatchSampler, error) + func (s *BatchSampler) BatchSize() int + func (s *BatchSampler) Sample() []int + type DataLoader struct + func NewDataLoader(data Dataset, s Sampler) (*DataLoader, error) + func (dl *DataLoader) HasNext() bool + func (dl *DataLoader) Len() int + func (dl *DataLoader) Next() (interface{}, error) + func (dl *DataLoader) Reset(shuffleOpt ...bool) + type Dataset interface + DType func() reflect.Type + Item func(idx int) (interface{}, error) + Len func() int + type DatasetKind int + const InvalidDKind + const MapDKind + const SliceDKind + type Fold struct + Test []int + Train []int + type KFold struct + func NewKFold(n int, opt ...KFoldOption) (*KFold, error) + func (kf *KFold) Split() []Fold + type KFoldOption func(*KFoldOptions) + func WithKFoldShuffle(shuffle bool) KFoldOption + func WithNFolds(nfolds int) KFoldOption + type KFoldOptions struct + NFolds int + Shuffle bool + func NewKFoldOptions(options ...KFoldOption) KFoldOptions + type MapDataset struct + func NewMapDataset(data interface{}) (*MapDataset, error) + func (ds *MapDataset) DType() reflect.Type + func (ds *MapDataset) Item(idx int) (interface{}, error) + func (ds *MapDataset) Len() int + type RandOption func(*RandOptions) + func WithReplacement(replacement bool) RandOption + func WithSize(size int) RandOption + type RandOptions struct + Replacement bool + Size int + func NewRandOptions(options ...RandOption) RandOptions + type RandomSampler struct + func NewRandomSampler(n int, opt ...RandOption) (*RandomSampler, error) + func (s *RandomSampler) BatchSize() int + func (s *RandomSampler) Sample() []int + type Sampler interface + BatchSize func() int + Sample func() []int + type SequentialSampler struct + func NewSequentialSampler(n int) *SequentialSampler + func (s *SequentialSampler) BatchSize() int + func (s *SequentialSampler) Sample() []int + type SliceDataset struct + func NewSliceDataset(data interface{}) (*SliceDataset, error) + func (ds *SliceDataset) DType() reflect.Type + func (ds *SliceDataset) Item(idx int) (interface{}, error) + func (ds *SliceDataset) Len() int