Skip to content

Tensorflow-backed Dataloader

Tensorflow-backed Dataloader¤


source

to_tf_dataset¤

 to_tf_dataset (dataset:jax_dataloader.datasets.Dataset)

source

to_tf_dataset¤

 to_tf_dataset (dataset:jax_dataloader.datasets.Dataset)

source

to_tf_dataset¤

 to_tf_dataset (dataset:jax_dataloader.datasets.Dataset)

source

DataLoaderTensorflow¤

 DataLoaderTensorflow (dataset:Union[jax_dataloader.datasets.Dataset,tenso
                       rflow.python.data.ops.dataset_ops.DatasetV2,Annotat
                       ed[Union[datasets.arrow_dataset.Dataset,datasets.da
                       taset_dict.DatasetDict,datasets.dataset_dict.Iterab
                       leDatasetDict,datasets.iterable_dataset.IterableDat
                       aset],beartype.vale.Is[lambda_:hf_datasetsisnotNone
                       ]]], batch_size:int=1, shuffle:bool=False,
                       drop_last:bool=False, **kwargs)

Tensorflow Dataloader

Type Default Details
dataset typing.Union[jax_dataloader.datasets.Dataset, tensorflow.python.data.ops.dataset_ops.DatasetV2, typing.Annotated[typing.Union[datasets.arrow_dataset.Dataset, datasets.dataset_dict.DatasetDict, datasets.dataset_dict.IterableDatasetDict, datasets.iterable_dataset.IterableDataset], beartype.vale.Is[lambda _: hf_datasets is not None]]]
batch_size int 1 Batch size
shuffle bool False If true, dataloader shuffles before sampling each batch
drop_last bool False Drop last batch or not
kwargs
test_dataloader(DataLoaderTensorflow, samples=20, batch_size=12)
test_dataloader(DataLoaderTensorflow, samples=20, batch_size=10)
test_dataloader(DataLoaderTensorflow, samples=11, batch_size=10)
An NVIDIA GPU may be present on this machine, but a CUDA-enabled jaxlib is not installed. Falling back to cpu.
test_dataloader(DataLoaderTensorflow, ds_type='tf', samples=40, batch_size=11)
test_dataloader(DataLoaderTensorflow, ds_type='hf', samples=40, batch_size=11)