imageloader

package
v0.0.0-...-9afed2f Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const GRAY string = "gray"

GRAY color

View Source
const RGB string = "rgb"

RGB color

Variables

This section is empty.

Functions

func BuildLabelVocabularyFromTgz

func BuildLabelVocabularyFromTgz(fn string) (map[string]int, error)

BuildLabelVocabularyFromTgz build a label vocabulary from the image tgz file

Types

type ImageLoader

type ImageLoader struct {
	// contains filtered or unexported fields
}

ImageLoader struct

func New

func New(fn string, vocab map[string]int, trans *transforms.ComposeTransformer,
	mbSize, bufSize int, seed int64, pinMemory bool, colorSpace string) (*ImageLoader, error)

New returns an ImageLoader

func (*ImageLoader) Err

func (p *ImageLoader) Err() error

Err returns the error during the scan process, if there is any. io.EOF is not considered an error.

func (*ImageLoader) Minibatch

func (p *ImageLoader) Minibatch() (torch.Tensor, torch.Tensor)

Minibatch returns a minibatch with data and label Tensor

func (*ImageLoader) Scan

func (p *ImageLoader) Scan() bool

Scan return false if no more data

Jump to

Keyboard shortcuts

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