Spaces:
Sleeping
Sleeping
Download src/plot2eq/config.py from YauheniShe/Plot2Eq: direct link, hf CLI and curl.
- Browser
- Download file 613 Bytes
-
https://huggingface.co/spaces/YauheniShe/Plot2Eq/resolve/main/src/plot2eq/config.py
- Command line
-
hf download hf://spaces/YauheniShe/Plot2Eq/src/plot2eq/config.py
-
curl -L -o config.py https://huggingface.co/spaces/YauheniShe/Plot2Eq/resolve/main/src/plot2eq/config.py
613 Bytes
| from dataclasses import dataclass | |
| import torch | |
| class TrainConfig: | |
| data_dir: str = "../data" | |
| resume_from_checkpoint: str | None = None | |
| project_name: str = "Plot2Eq" | |
| batch_size: int = 256 | |
| epochs: int = 1000 | |
| lr: float = 3e-4 | |
| weight_decay: float = 0.05 | |
| warmup_ratio: float = 0.05 | |
| max_grad_norm: float = 1.0 | |
| d_model: int = 512 | |
| nhead: int = 8 | |
| num_enc_layers: int = 4 | |
| num_dec_layers: int = 4 | |
| dropout: float = 0.1 | |
| max_seq_len: int = 128 | |
| label_smoothing: float = 0.1 | |
| device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | |