File size: 995 Bytes
06a7cdc 37887aa 06a7cdc |
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
import torch.nn.functional as F
# Seed
SEED = 1
# Dataset
CLASSES = (
"Airplane",
"Automobile",
"Bird",
"Cat",
"Deer",
"Dog",
"Frog",
"Horse",
"Ship",
"Truck",
)
SHUFFLE = True
DATA_DIR = "../data"
NUM_WORKERS = 4
PIN_MEMORY = True
# Training Hyperparameters
CRITERION = F.cross_entropy
INPUT_SIZE = (3, 32, 32)
NUM_CLASSES = 10
LEARNING_RATE = 0.001
WEIGHT_DECAY = 1e-4
BATCH_SIZE = 512
NUM_EPOCHS = 24
DROPOUT_PERCENTAGE = 0.05
LAYER_NORM = "bn" # Batch Normalization
# OPTIMIZER & SCHEDULER
LRFINDER_END_LR = 0.1
LRFINDER_NUM_ITERATIONS = 50
LRFINDER_STEP_MODE = "exp"
OCLR_DIV_FACTOR = 100
OCLR_FINAL_DIV_FACTOR = 100
OCLR_THREE_PHASE = False
OCLR_ANNEAL_STRATEGY = "linear"
# Compute Related
ACCELERATOR = "cpu"
PRECISION = 32
# Store
TRAINING_STAT_STORE = "Store/training_stats.csv"
MODEL_SAVE_PATH = "Store/model.pth"
PRED_STORE_PATH = "Store/pred_store.pth"
EXAMPLE_IMG_PATH = "Store/examples/"
# Visualization
NORM_CONF_MAT = True
|