TorchLean API

NN.API.Data.Image

Image Artifacts #

Write normalized channel-first RGB tensors as dependency-free PPM files. Finite channel values are clamped to [0,1] before conversion to bytes; nonfinite channels are rejected.

def TorchLean.Data.Image.writeFirstRgbPpm {batch c h w : } (path : System.FilePath) (x : Tensor Float [batch, c, h, w]) :

Write the first RGB image as an ASCII PPM artifact, rejecting empty spatial dimensions.

Instances For