Update modeling_wavcoch.py
Browse files- modeling_wavcoch.py +2 -1
modeling_wavcoch.py
CHANGED
|
@@ -11,6 +11,7 @@ import tqdm
|
|
| 11 |
from vector_quantize_pytorch import LFQ
|
| 12 |
from huggingface_hub import PyTorchModelHubMixin
|
| 13 |
from transformers.tokenization_utils import BatchEncoding
|
|
|
|
| 14 |
import chcochleagram
|
| 15 |
|
| 16 |
|
|
@@ -135,7 +136,7 @@ class CochleagramTransform:
|
|
| 135 |
################$$$$$$##################
|
| 136 |
|
| 137 |
|
| 138 |
-
class WavCoch(nn.Module, PyTorchModelHubMixin):
|
| 139 |
def __init__(self, config):
|
| 140 |
super().__init__()
|
| 141 |
self.N = config.window_size
|
|
|
|
| 11 |
from vector_quantize_pytorch import LFQ
|
| 12 |
from huggingface_hub import PyTorchModelHubMixin
|
| 13 |
from transformers.tokenization_utils import BatchEncoding
|
| 14 |
+
from transformers import PreTrainedTokenizer
|
| 15 |
import chcochleagram
|
| 16 |
|
| 17 |
|
|
|
|
| 136 |
################$$$$$$##################
|
| 137 |
|
| 138 |
|
| 139 |
+
class WavCoch(nn.Module, PyTorchModelHubMixin, PreTrainedTokenizer):
|
| 140 |
def __init__(self, config):
|
| 141 |
super().__init__()
|
| 142 |
self.N = config.window_size
|