toTensor

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