Download src/constants.py from kordelfrance/olfaction-vision-language-classifiers: direct link, hf CLI and curl.
- Browser
- Download file 648 Bytes
-
https://huggingface.co/kordelfrance/olfaction-vision-language-classifiers/resolve/main/src/constants.py
- Command line
-
hf download hf://kordelfrance/olfaction-vision-language-classifiers/src/constants.py
-
curl -L -o constants.py https://huggingface.co/kordelfrance/olfaction-vision-language-classifiers/resolve/main/src/constants.py
648 Bytes
| import torch | |
| # Number of features in each aroma vector | |
| AROMA_VEC_LENGTH: int = 138 | |
| # All images are normalized to this | |
| IMG_DIM: int = 224 | |
| # Each model was trained with these hyperparams | |
| BATCH_SIZE: int = 16 | |
| EMBED_DIM: int = 512 | |
| # CPU or GPU? | |
| DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") | |
| # Paths to models | |
| OVLE_SMALL_BASE_PATH: str = f"./model/ovlc/base/gnn_{EMBED_DIM}_c.pt" | |
| ENCODER_SMALL_BASE_PATH: str = f"./model/ovlc/base/olf_encoder_{EMBED_DIM}_c.pt" | |
| OVLE_LARGE_GRAPH_PATH: str = f"./model/ovlc/graph/gat_gnn_{EMBED_DIM}_c.pt" | |
| ENCODER_LARGE_GRAPH_PATH: str = f"./model/ovlc/graph/gat_olf_encoder_{EMBED_DIM}_c.pt" | |