class
FromFloat
extends
_NoParamsPhotometricTransform[Empty]FromFloat(max_value: float = 255.0, dtype: str = 'uint8', p: float = 1.0)Scale a [0, 1] image back up by max_value (Albumentations FromFloat).
Parameters
max_valuefloat= 255.0No description.
pfloat= 1.0No description.
Notes
Stays in floating point (Lucid keeps a float tensor); the Albu
dtype argument is accepted for signature parity but the result
is not re-quantized.
Examples
>>> import lucid, lucid.utils.transforms as T
>>> tf = T.FromFloat(p=1.0)
>>> tuple(tf(T.Image(lucid.rand(3, 32, 32))).data.shape)
(3, 32, 32)
The inverse of ToFloat, and the pair is what moves an
image between the 0-1 range a network wants and the 0-255 one a
file holds.