We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4635bb6 + 95d5274 commit 15706a8Copy full SHA for 15706a8
paddlespeech/s2t/io/batchfy.py
@@ -419,7 +419,7 @@ def make_batchset(
419
# sort it by input lengths (long to short)
420
sorted_data = sorted(
421
d.items(),
422
- key=lambda data: int(data[1][batch_sort_key][batch_sort_axis]["shape"][0]),
+ key=lambda data: float(data[1][batch_sort_key][batch_sort_axis]["shape"][0]),
423
reverse=not shortest_first, )
424
logger.info("# utts: " + str(len(sorted_data)))
425
paddlespeech/s2t/io/dataloader.py
@@ -61,7 +61,7 @@ class BatchDataLoader():
61
def __init__(self,
62
json_file: str,
63
train_mode: bool,
64
- sortagrad: bool=False,
+ sortagrad: int=0,
65
batch_size: int=0,
66
maxlen_in: float=float('inf'),
67
maxlen_out: float=float('inf'),
0 commit comments