tfx_bsl.public.tfxio.RecordBatchesOptions
Stay organized with collections
Save and categorize content based on your preferences.
Options for TFXIO's RecordBatches.
tfx_bsl.public.tfxio.RecordBatchesOptions(
batch_size: int,
drop_final_batch: bool = False,
num_epochs: Optional[int] = None,
shuffle: bool = True,
shuffle_buffer_size: int = 10000,
shuffle_seed: Optional[int] = None
)
Note: not all of these options may be effective. It depends on the particular
TFXIO's implementation.
Args
batch_size
An int representing the number of records to combine in a
single batch.
drop_final_batch
If True
, and the batch size does not evenly divide the
input dataset size, the final smaller batch will be dropped. Defaults to
False
.
num_epochs
Integer specifying the number of times to read through the
dataset. If None, cycles through the dataset forever. Defaults to
None
.
shuffle
A boolean, indicates whether the input should be shuffled.
Defaults to True
.
shuffle_buffer_size
Buffer size of the items to shuffle. The size is the
number of items (i.e. records for a record based TFXIO) to hold. Only
data read into the buffer will be shuffled (there is no shuffling across
buffers). A large capacity ensures better shuffling but would increase
memory usage and startup time.
shuffle_seed
Randomization seed to use for shuffling.
Attributes
batch_size
A namedtuple
alias for field number 0
drop_final_batch
A namedtuple
alias for field number 1
num_epochs
A namedtuple
alias for field number 2
shuffle
A namedtuple
alias for field number 3
shuffle_buffer_size
A namedtuple
alias for field number 4
shuffle_seed
A namedtuple
alias for field number 5
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-03 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-05-03 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-03 UTC."],[],[]]