toTensor
fun <I> Transform<I, PlatformBitmapImage>.toTensor(ctx: ExecutionContext): Transform<I, Tensor<FP16, Float>>(source)
Chains an ImageToTensor transform that converts the image to a tensor.
The output tensor has shape (1, 3, H, W) with float values in 0, 255.
Parameters
ctx
The execution context for tensor creation