Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
:: 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.