mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-22 01:12:59 +00:00
ds_eo: lower memory usage
This commit is contained in:
parent
b5e68fc1a3
commit
65a2e16a4c
1 changed files with 1 additions and 3 deletions
|
@ -116,9 +116,7 @@ def make_dataset(filepaths, compression_type="GZIP", parallel_reads_multiplier=3
|
||||||
compression_type=compression_type,
|
compression_type=compression_type,
|
||||||
num_parallel_reads=math.ceil(os.cpu_count() * parallel_reads_multiplier) if parallel_reads_multiplier > 0 else None
|
num_parallel_reads=math.ceil(os.cpu_count() * parallel_reads_multiplier) if parallel_reads_multiplier > 0 else None
|
||||||
)
|
)
|
||||||
if shuffle:
|
# If we want another shuffle buffer here, we'd need to split the map function which we don't really want to do
|
||||||
dataset = dataset.shuffle(128) # additional shuffle buffer to mix things up
|
|
||||||
|
|
||||||
dataset = dataset.map(parse_item(heightmap=heightmap, **kwargs), num_parallel_calls=tf.data.AUTOTUNE) \
|
dataset = dataset.map(parse_item(heightmap=heightmap, **kwargs), num_parallel_calls=tf.data.AUTOTUNE) \
|
||||||
.unbatch()
|
.unbatch()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue