Documentation ¶
Index ¶
- func CreateBucketStoreUDSF(ctx *core.Context, decl udf.UDSFDeclarer, stream, bucketName string) (udf.UDSF, error)
- func CreateEpochUDSF(ctx *core.Context, decl udf.UDSFDeclarer, stream, arrayKey string, ...) (udf.UDSF, error)
- func NewBucketState(ctx *core.Context, params data.Map) (core.SharedState, error)
- type DataSourceCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBucketStoreUDSF ¶
func CreateBucketStoreUDSF(ctx *core.Context, decl udf.UDSFDeclarer, stream, bucketName string) (udf.UDSF, error)
CreateBucketStoreUDSF returns UDSF to store tuple data to the target bucket.
stream: target stream name bucketName: target bucket (shared state) name
func CreateEpochUDSF ¶
func CreateEpochUDSF(ctx *core.Context, decl udf.UDSFDeclarer, stream, arrayKey string, batchSize, epoch int, random bool) (udf.UDSF, error)
CreateEpochUDSF returns bucket to batch stream function.
stream: target stream name arrayKey: key name of splitting array batchSize: splitting size epoch: loop count number random randomize before streaming
func NewBucketState ¶
NewBucketState creates a shared state, which manages a bucket to train & predict.
bucket_size: a bucket size, required
Types ¶
type DataSourceCreator ¶
type DataSourceCreator struct{}
DataSourceCreator is a creator for MNIST data source.
func (*DataSourceCreator) CreateSource ¶
func (s *DataSourceCreator) CreateSource(ctx *core.Context, ioParams *bql.IOParams, params data.Map) (core.Source, error)
CreateSource returns a source which generate MNIST data stream. The MNIST data spec is depended on "THE MNIST DATABASE of handwritten digits", see http://yann.lecun.com/exdb/mnist/
MNIST data is ubyte data, and parse when the source is created. Returns an error when cannot load MNIST file or parsing error.
WITH parameters ¶
images_file_name: MNIST images nbytes file path [required]
labels_file_name: MNIST labels nbytes file path [required]
data_size: MNIST data size [required]
image_element_size: MNIST image element size (default: 784=28*28)