-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
20 lines (17 loc) · 819 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""configs stored for model building"""
import os
# Supress tensorflow warnings and GPU informations
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
# Config Variables
IMAGE_SIZE: tuple[int, int] = (256, 256) # Size of each image
BATCH_SIZE: int = 32 # Batch size for training purpose
DATA_DIR: str = 'data/PlantVillage' # data directory for training
EPOCHS: int = 1 # Number of training epochs
CHANNELS: int = 3 # Number of channels in image(RGB)
TRIAN_SIZE: float = 0.8 # Training data out of complete data
VALIDATION_SIZE: float = 0.1 # Validation data out of complete data
TEST_SIZE: float = 0.1 # Test data out of complete data
MODEL_NAME: str = 'model.h5' # Current model name to be used
MODEL_VERSION: int = 1 + max(
[0] + [int(i) for i in os.listdir("./models")]
) # Model version from trained models