class
Lambda
extends
_NoParamsTransform[Empty]Lambda(image: Callable[[Tensor], Tensor] | None = None, mask: Callable[[Tensor], Tensor] | None = None, bboxes: Callable[[BoundingBoxes], BoundingBoxes] | None = None, keypoints: Callable[[object], object] | None = None, name: str | None = None, p: float = 1.0)Apply user callables per target type (Albumentations Lambda).
Parameters
imagecallable= NoneTensor -> Tensor applied to image / mask tensors.maskcallable= NoneTensor -> Tensor applied to image / mask tensors.bboxescallable= NoneApplied to the
BoundingBoxes / Keypoints object.keypointscallable= NoneApplied to the
BoundingBoxes / Keypoints object.namestr= NoneNo description.
pfloat= 1.0No description.
Examples
>>> import lucid, lucid.utils.transforms as T
>>> tf = T.Lambda(p=1.0)
>>> tuple(tf(T.Image(lucid.rand(3, 32, 32))).data.shape)
(3, 32, 32)Used by 1
Constructors
1dunder
__init__
→None__init__(image: Callable[[Tensor], Tensor] | None = None, mask: Callable[[Tensor], Tensor] | None = None, bboxes: Callable[[BoundingBoxes], BoundingBoxes] | None = None, keypoints: Callable[[object], object] | None = None, name: str | None = None, p: float = 1.0)Initialise the layer.
Parameters
channelsintChannels being normalised.