hasktorch-zoo-0.0.1.0: Neural architectures in hasktorch

Safe HaskellNone
LanguageHaskell2010

Torch.Data.Loaders.Internal

Synopsis

Documentation

rgb2torch :: forall h w. (All KnownDim '[h, w], All KnownNat '[h, w]) => Normalize -> FilePath -> ExceptT String IO (Tensor '[3, h, w]) Source #

load an RGB PNG image into a Torch tensor

shuffleCatFolders Source #

Arguments

:: GenIO

generator for shuffle

-> (FilePath -> Maybe c)

how to convert a subfolder into a category

-> FilePath

absolute path of the dataset

-> IO (Vector (c, FilePath))

shuffled list

Given a folder with subfolders of category images, return a uniform-randomly shuffled list of absolute filepaths with the corresponding category.

isImage :: FilePath -> Bool Source #

verifies that an absolute filepath is an image