Skip to main content

save_tensor_as_image

Function save_tensor_as_image 

pub fn save_tensor_as_image<const D: usize, P>(
    tensor: Tensor<D>,
    opts: TensorDisplayOptions,
    path: P,
) -> Result<(), Box<dyn Error>>
where P: AsRef<OsStr>,
Expand description

Save a tensor of a batch of images as an image

  • tensor - Image batch with shape (N, height, width)
  • opts - Options for how to draw the tensor
  • path - The file path to use