Wav2Vec2 (#9659)
* add raw scaffold * implement feat extract layers * make style * remove + * correctly convert weights * make feat extractor work * make feature extraction proj work * run forward pass * finish forward pass * Succesful decoding example * remove unused files * more changes * add wav2vec tokenizer * add new structure * fix run forward * add other layer norm architecture * finish 2nd structure * add model tests * finish tests for tok and model * clean-up * make style * finish docstring for model and config * make style * correct docstring * correct tests * change checkpoints to fairseq * fix examples * finish wav2vec2 * make style * apply sylvains suggestions * apply lysandres suggestions * change print to log.info * re-add assert statement * add input_values as required input name * finish wav2vec2 tokenizer * Update tests/test_tokenization_wav2vec2.py Co-authored-by: Lysandre Debut <lysandre@huggingface.co> * apply sylvains suggestions Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
This commit is contained in:
committed by
GitHub
parent
d996024af7
commit
d6217fb30c
@@ -31,6 +31,7 @@ from .file_utils import (
|
||||
is_pandas_available,
|
||||
is_scatter_available,
|
||||
is_sentencepiece_available,
|
||||
is_soundfile_availble,
|
||||
is_tf_available,
|
||||
is_tokenizers_available,
|
||||
is_torch_available,
|
||||
@@ -367,6 +368,19 @@ def require_ray(test_case):
|
||||
return test_case
|
||||
|
||||
|
||||
def require_soundfile(test_case):
|
||||
"""
|
||||
Decorator marking a test that requires soundfile
|
||||
|
||||
These tests are skipped when soundfile isn't installed.
|
||||
|
||||
"""
|
||||
if not is_soundfile_availble():
|
||||
return unittest.skip("test requires soundfile")(test_case)
|
||||
else:
|
||||
return test_case
|
||||
|
||||
|
||||
def get_gpu_count():
|
||||
"""
|
||||
Return the number of available gpus (regardless of whether torch or tf is used)
|
||||
|
||||
Reference in New Issue
Block a user