package torch

  1. Overview
  2. Docs
PyTorch bindings for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

0.4.tar.gz
md5=9547e9e025dacd52e405ff699539c582
sha512=23fd9bef6f5f11c55171f2383a2f7ca57330511af6521a4579410e002d8667a91e764aecc2deb1cf8d7bf3b0e988cd3020850fa4a5a1ec713dfb110ec7352892

doc/torch.vision/Torch_vision/Image/index.html

Module Torch_vision.ImageSource

load_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.

Sourceval load_images : ?resize:(Base.int * Base.int) -> Base.string -> Torch.Tensor.t

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.

Sourceval 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
Sourceval write_image : Torch.Tensor.t -> filename:Base.string -> Base.unit
Sourcemodule Loader : sig ... end
OCaml

Innovation. Community. Security.