项目文件夹

文件
2023-07-03 14:23:24 +08:00

23 行
430 B
Python

"""Feature fetchers"""
from torchdata.datapipes.iter import Mapper
class FeatureFetcher(Mapper):
"""Base feature fetcher.
This is equivalent to the following iterator:
.. code:: python
for data in datapipe:
yield feature_fetch_func(data)
Parameters
----------
datapipe : DataPipe
The datapipe.
fn : callable
The function that performs feature fetching.
"""