Compare commits
1 Commits
e9582d0883
...
b7049f5b47
Author | SHA1 | Date |
---|---|---|
coolneng | b7049f5b47 |
|
@ -105,8 +105,8 @@ def read_dataset(filepath) -> TFRecordDataset:
|
||||||
Read TFRecords files and generate a dataset
|
Read TFRecords files and generate a dataset
|
||||||
"""
|
"""
|
||||||
data_input = TFRecordDataset(filenames=filepath)
|
data_input = TFRecordDataset(filenames=filepath)
|
||||||
dataset = data_input.map(map_func=process_input, num_parallel_calls=AUTOTUNE)
|
|
||||||
shuffled_dataset = dataset.shuffle(buffer_size=10000, seed=42)
|
shuffled_dataset = dataset.shuffle(buffer_size=10000, seed=42)
|
||||||
|
dataset = data_input.map(map_func=process_input, num_parallel_calls=AUTOTUNE)
|
||||||
batched_dataset = shuffled_dataset.batch(batch_size=BATCH_SIZE).repeat(count=EPOCHS)
|
batched_dataset = shuffled_dataset.batch(batch_size=BATCH_SIZE).repeat(count=EPOCHS)
|
||||||
return batched_dataset
|
return batched_dataset
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue