Mapper
- class torchdata.datapipes.map.Mapper(datapipe: MapDataPipe, fn: Callable = <function default_fn>)
Apply the input function over each item from the source DataPipe (functional name:
map
). The function can be any regular Python function or partial object. Lambda function is not recommended as it is not supported by pickle.- Parameters
datapipe – Source MapDataPipe
fn – Function being applied to each item