jmwang66
2023-06-29 98abc0e5ac1a1da0fe1802d9ffb623802fbf0b2f
funasr/datasets/small_datasets/collate_fn.py
@@ -6,8 +6,6 @@
import numpy as np
import torch
from typeguard import check_argument_types
from typeguard import check_return_type
from funasr.modules.nets_utils import pad_list
@@ -22,7 +20,6 @@
            not_sequence: Collection[str] = (),
            max_sample_size=None
    ):
        assert check_argument_types()
        self.float_pad_value = float_pad_value
        self.int_pad_value = int_pad_value
        self.not_sequence = set(not_sequence)
@@ -53,7 +50,6 @@
) -> Tuple[List[str], Dict[str, torch.Tensor]]:
    """Concatenate ndarray-list to an array and convert to torch.Tensor.
    """
    assert check_argument_types()
    uttids = [u for u, _ in data]
    data = [d for _, d in data]
@@ -79,7 +75,6 @@
            output[key + "_lengths"] = lens
    output = (uttids, output)
    assert check_return_type(output)
    return output
def crop_to_max_size(feature, target_size):