dmlc--dgl
fe83348c75
Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com>
23 行
430 B
Python
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.
|
|
"""
|