Only use drop_remainder in dataset for train phase
This commit is contained in:
parent
80a3d70686
commit
28c7f4c35d
@ -61,7 +61,6 @@ def evaluate(test_csvs, create_model):
|
||||
# One rate per layer
|
||||
no_dropout = [None] * 6
|
||||
logits, _ = create_model(batch_x=batch_x,
|
||||
batch_size=FLAGS.test_batch_size,
|
||||
seq_length=batch_x_len,
|
||||
dropout=no_dropout)
|
||||
|
||||
|
@ -151,7 +151,7 @@ def create_dataset(sources,
|
||||
.map(process_fn, num_parallel_calls=tf.data.experimental.AUTOTUNE))
|
||||
if enable_cache:
|
||||
dataset = dataset.cache(cache_path)
|
||||
dataset = (dataset.window(batch_size, drop_remainder=True).flat_map(batch_fn)
|
||||
dataset = (dataset.window(batch_size, drop_remainder=train_phase).flat_map(batch_fn)
|
||||
.prefetch(len(Config.available_devices)))
|
||||
return dataset
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user