File size: 815 Bytes
0b32ad6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
"""
Common linear models
Authors:
* Leo 2022
"""
from .common import FrameLevel, UtteranceLevel
__all__ = [
"FrameLevelLinear",
"MeanPoolingLinear",
]
class FrameLevelLinear(FrameLevel):
"""
The frame-level linear probing model used in SUPERB Benchmark
"""
def __init__(
self,
input_size: int,
output_size: int,
hidden_size: int = 256,
):
super().__init__(input_size, output_size, hidden_sizes=[hidden_size])
class MeanPoolingLinear(UtteranceLevel):
"""
The utterance-level linear probing model used in SUPERB Benchmark
"""
def __init__(
self,
input_size: int,
output_size: int,
hidden_size: int = 256,
):
super().__init__(input_size, output_size, hidden_sizes=[hidden_size])
|