p2pfl.learning.frameworks.tensorflow.keras_dataset moduleΒΆ
Keras dataset export strategy.
- class p2pfl.learning.frameworks.tensorflow.keras_dataset.KerasExportStrategy[source]ΒΆ
Bases:
DataExportStrategy
Export strategy for TensorFlow/Keras datasets.
- static export(data, transforms=None, batch_size=1, columns=None, label_cols=None, **kwargs)[source]ΒΆ
Export the data as a TensorFlow Dataset.
- Parameters:
data (
Dataset
) β The Hugging Face Dataset to export.transforms (
Optional
[Callable
]) β Optional transformations to apply (not implemented yet).batch_size (
int
) β The batch size for the TensorFlow Dataset.seed β The seed for the TensorFlow Dataset.
columns (
Optional
[List
[str
]]) β The columns to include in the TensorFlow Dataset.label_cols (
Optional
[List
[str
]]) β The columns to use as labels.**kwargs β Additional keyword arguments.
- Return type:
DatasetV2
- Returns:
A TensorFlow Dataset.