File size: 581 Bytes
88ed85e 0373e8d 88ed85e 0373e8d 88ed85e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from transformers import HubertConfig, PretrainedConfig
class EmotionClassifierConfig(HubertConfig):
def __init__(self, hidden_size=128, num_classes=6, **kwargs):
super().__init__(
encoder_layers=12, # Default value from HubertConfig
encoder_attention_heads=12, # Default value from HubertConfig
encoder_ffn_dim=3072, # Default value from HubertConfig
# Add other required parameters from HubertConfig here
**kwargs
)
self.hidden_size = hidden_size
self.num_classes = num_classes
|