项目文件夹

文件
2023-06-30 16:33:23 +08:00

23 行
412 B
Python

"""Subgraph samplers"""
from torchdata.datapipes.iter import Mapper
class SubgraphSampler(Mapper):
"""A subgraph sampler.
It is an iterator equivalent to the following:
.. code:: python
for data in datapipe:
yield sampler_func(data)
Parameters
----------
datapipe : DataPipe
The datapipe.
fn : callable
The subgraph sampling function.
"""