Add # Copied from statements to audio feature extractors that use the floats_list function (#26581)

Add # Copied from statements to audio feature extractors that use the floats_list function.
This commit is contained in:
dg845
2023-10-04 08:09:48 -07:00
committed by GitHub
parent 0a49f909bc
commit 9deb18ca1a
8 changed files with 8 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ from ...test_sequence_feature_extraction_common import SequenceFeatureExtraction
global_rng = random.Random()
# Copied from tests.models.whisper.test_feature_extraction_whisper.floats_list
def floats_list(shape, scale=1.0, rng=None, name=None):
"""Creates a random float32 tensor"""
if rng is None:

View File

@@ -39,6 +39,7 @@ from ...test_tokenization_common import TokenizerTesterMixin
global_rng = random.Random()
# Copied from tests.models.whisper.test_feature_extraction_whisper.floats_list
def floats_list(shape, scale=1.0, rng=None, name=None):
"""Creates a random float32 tensor"""
if rng is None: