Torch_vision.ImageSourceval load_image :
?resize:(Base.int * Base.int) ->
Base.string ->
Torch.Tensor.t Base.Or_error.tload_image ?resize filename returns a tensor containing the pixels for the image in filename. Supported image formats are JPEG and PNG. The resulting tensor has dimensions NCHW (with N = 1). When resize is set, the image is first resized preserving its original ratio then a center crop is taken.
load_images ?resize dir_name is similar to applying load_image to all the images in dir_name. The resulting tensor has dimensions NCHW where N is the number of images.
val load_dataset :
dir:Base.string ->
classes:Base.string Base.list ->
with_cache:Base.string Base.option ->
resize:(Base.int * Base.int) ->
Torch.Dataset_helper.t