Update wav2vec2speechclassification.py
Browse files
wav2vec2speechclassification.py
CHANGED
@@ -2,7 +2,7 @@ from dataclasses import dataclass
|
|
2 |
from typing import Optional, Tuple
|
3 |
import torch
|
4 |
from transformers.file_utils import ModelOutput
|
5 |
-
from transformers import
|
6 |
|
7 |
|
8 |
@dataclass
|
@@ -25,7 +25,7 @@ from transformers.models.wav2vec2.modeling_wav2vec2 import (
|
|
25 |
|
26 |
class Wav2Vec2ClassificationHead(nn.Module):
|
27 |
"""Head for wav2vec classification task."""
|
28 |
-
config_class =
|
29 |
|
30 |
def __init__(self, config):
|
31 |
super().__init__()
|
@@ -44,7 +44,7 @@ class Wav2Vec2ClassificationHead(nn.Module):
|
|
44 |
|
45 |
|
46 |
class Wav2Vec2ForSpeechClassification(Wav2Vec2PreTrainedModel):
|
47 |
-
config_class =
|
48 |
|
49 |
def __init__(self, config):
|
50 |
super().__init__(config)
|
|
|
2 |
from typing import Optional, Tuple
|
3 |
import torch
|
4 |
from transformers.file_utils import ModelOutput
|
5 |
+
from transformers import Wav2Vec2Config
|
6 |
|
7 |
|
8 |
@dataclass
|
|
|
25 |
|
26 |
class Wav2Vec2ClassificationHead(nn.Module):
|
27 |
"""Head for wav2vec classification task."""
|
28 |
+
config_class = Wav2Vec2Config
|
29 |
|
30 |
def __init__(self, config):
|
31 |
super().__init__()
|
|
|
44 |
|
45 |
|
46 |
class Wav2Vec2ForSpeechClassification(Wav2Vec2PreTrainedModel):
|
47 |
+
config_class = Wav2Vec2Config
|
48 |
|
49 |
def __init__(self, config):
|
50 |
super().__init__(config)
|