daft.functions.image_to_tensor#
image_to_tensor #
image_to_tensor(image: Expression) -> Expression
Convert an image expression to a tensor, inferring dtype and shape.
This is safer than casting to a tensor dtype manually, since Daft can infer the correct pixel dtype (e.g. UInt8) and determine whether a fixed-shape tensor is appropriate.
Source code in daft/functions/image.py
103 104 105 106 107 108 109 | |