File size: 1,233 Bytes
dbd79bd |
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 |
# - x - x - x - x - x - x - x - x - x - x - x - x - x - x - #
# #
# This file was created by: Alberto Palomo Alonso #
# Universidad de Alcalá - Escuela Politécnica Superior #
# #
# - x - x - x - x - x - x - x - x - x - x - x - x - x - x - #
# Import statements:
from typing import List
from dataclasses import dataclass, field
@dataclass
class CoSeNetConfig:
trainable: bool = True
init_scale: float = 5.0
@dataclass
class TransformerConfig:
attention_heads: int = 8
feed_forward_multiplier: float = 4
dropout: float = 0.0
pre_normalize: bool = True
@dataclass
class ModelConfig:
vocab_size: int = 2 ** 15
model_dim: int = 256
max_tokens: int = 382
max_sentences: int = 384
valid_padding: bool = True
cosenet: CoSeNetConfig = field(default_factory=CoSeNetConfig)
transformers: List[TransformerConfig] = field(default_factory=lambda: [TransformerConfig()])
# - x - x - x - x - x - x - x - x - x - x - x - x - x - x - #
# END OF FILE #
# - x - x - x - x - x - x - x - x - x - x - x - x - x - x - #
|