hdf5

package
v1.7.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package hdf5 is load hdf5 file

Package hdf5 is load hdf5 file

Package hdf5 is load hdf5 file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadDatasetF32

func ReadDatasetF32(file *hdf5.File, key Hdf5Key) ([][]float32, error)

func ReadDatasetI32

func ReadDatasetI32(file *hdf5.File, key Hdf5Key) ([][]int32, error)

Types

type Data

type Data interface {
	Download(url string) error
	Read(key Hdf5Key) error
	GetName() DatasetName
	GetPath() string
	GetByGroupName(name string) [][]float32
	GetTrain() [][]float32
	GetTest() [][]float32
	GetNeighbors() [][]int
}

func New

func New(opts ...Option) (Data, error)

type DatasetName

type DatasetName int
const (
	Original DatasetName = iota
	FashionMNIST784Euclidean
)

func (DatasetName) String

func (d DatasetName) String() string

type DatasetUrl

type DatasetUrl int
const (
	FashionMNIST784EuclideanUrl DatasetUrl = iota
)

func (DatasetUrl) String

func (d DatasetUrl) String() string

type Hdf5Key

type Hdf5Key int
const (
	Train Hdf5Key = iota + 1
	Test
	Neighors
)

func (Hdf5Key) String

func (key Hdf5Key) String() string

type Option

type Option func(d *data) error

func WithFilePath

func WithFilePath(f string) Option

func WithName

func WithName(dn DatasetName) Option

func WithNameByString

func WithNameByString(n string) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL