towhee.dataset

towhee.dataset(name: str, *args, **kwargs) TorchDataSet[source]

Get a dataset by name, and pass into the custom params.

Parameters:
  • name (str) – Name of a dataset.

  • *args (Any) – Arguments of the dataset construct method.

  • **kwargs (Any) – Keyword arguments of the dataset construct method.

Returns:

(TorchDataSet)

The corresponding TorchDataSet.

Examples

>>> from towhee import dataset
>>> type(dataset('fake', size=10))
<class 'towhee.data.dataset.dataset.TorchDataSet'>