Update training
Browse files
src/run_wav2vec2_pretrain_flax.py
CHANGED
@@ -1,10 +1,3 @@
|
|
1 |
-
import logging
|
2 |
-
import sys
|
3 |
-
import time
|
4 |
-
from dataclasses import field
|
5 |
-
from pathlib import Path
|
6 |
-
from typing import Dict, List, Optional, Union
|
7 |
-
|
8 |
# !/usr/bin/env python
|
9 |
# coding=utf-8
|
10 |
# Copyright 2021 The HuggingFace Team All rights reserved.
|
@@ -24,6 +17,12 @@ from typing import Dict, List, Optional, Union
|
|
24 |
Training the library models for Wav2Vec.
|
25 |
"""
|
26 |
# You can also adapt this script on your own sequence to sequence task. Pointers for this are left as comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
import numpy as np
|
29 |
from datasets import DatasetDict, load_dataset
|
@@ -33,6 +32,7 @@ import flax
|
|
33 |
import jax
|
34 |
import jax.numpy as jnp
|
35 |
import librosa
|
|
|
36 |
import optax
|
37 |
from flax import jax_utils, traverse_util
|
38 |
from flax.training import train_state
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# !/usr/bin/env python
|
2 |
# coding=utf-8
|
3 |
# Copyright 2021 The HuggingFace Team All rights reserved.
|
|
|
17 |
Training the library models for Wav2Vec.
|
18 |
"""
|
19 |
# You can also adapt this script on your own sequence to sequence task. Pointers for this are left as comments.
|
20 |
+
import logging
|
21 |
+
import sys
|
22 |
+
import time
|
23 |
+
from dataclasses import field
|
24 |
+
from pathlib import Path
|
25 |
+
from typing import Dict, List, Optional, Union
|
26 |
|
27 |
import numpy as np
|
28 |
from datasets import DatasetDict, load_dataset
|
|
|
32 |
import jax
|
33 |
import jax.numpy as jnp
|
34 |
import librosa
|
35 |
+
import torchaudio
|
36 |
import optax
|
37 |
from flax import jax_utils, traverse_util
|
38 |
from flax.training import train_state
|