Download src/constants.py from kordelfrance/Olfaction-Vision-Language-Embeddings: direct link, hf CLI and curl.
- Browser
- Download file 906 Bytes
-
https://huggingface.co/kordelfrance/Olfaction-Vision-Language-Embeddings/resolve/main/src/constants.py
- Command line
-
hf download hf://kordelfrance/Olfaction-Vision-Language-Embeddings/src/constants.py
-
curl -L -o constants.py https://huggingface.co/kordelfrance/Olfaction-Vision-Language-Embeddings/resolve/main/src/constants.py
906 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 = "./model/colip-small/base/gnn.pth" | |
| ENCODER_SMALL_BASE_PATH: str = "./model/colip-small/base/olf_encoder.pth" | |
| OVLE_LARGE_BASE_PATH: str = "./model/colip-large/base/gnn.pth" | |
| ENCODER_LARGE_BASE_PATH: str = "./model/colip-large/base/olf_encoder.pth" | |
| OVLE_SMALL_GRAPH_PATH: str = "./model/colip-small/graph/gat_gnn.pth" | |
| ENCODER_SMALL_GRAPH_PATH: str = "./model/colip-small/graph/gat_olf_encoder.pth" | |
| OVLE_LARGE_GRAPH_PATH: str = "./model/colip-large/graph/gat_gnn.pth" | |
| ENCODER_LARGE_GRAPH_PATH: str = "./model/colip-large/graph/gat_olf_encoder.pth" | |