cycool29 commited on
Commit
eb01e5b
·
1 Parent(s): 0b11e30
Files changed (3) hide show
  1. configs.py +4 -3
  2. data_loader.py +1 -0
  3. tuning.py +2 -2
configs.py CHANGED
@@ -15,10 +15,10 @@ from torchvision.models import squeezenet1_0
15
  # Constants
16
  RANDOM_SEED = 123
17
  BATCH_SIZE = 16
18
- NUM_EPOCHS = 40
19
- LEARNING_RATE = 5.488903014780378e-05
20
  STEP_SIZE = 10
21
- GAMMA = 0.3
22
  DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
23
  NUM_PRINT = 100
24
  TASK = 1
@@ -125,6 +125,7 @@ preprocess = transforms.Compose(
125
  [
126
  transforms.Resize((64, 64)), # Resize images to 64x64
127
  transforms.ToTensor(), # Convert to tensor
 
128
  # Normalize 3 channels
129
  transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
130
  ]
 
15
  # Constants
16
  RANDOM_SEED = 123
17
  BATCH_SIZE = 16
18
+ NUM_EPOCHS = 100
19
+ LEARNING_RATE = 2.0950584442749585e-05
20
  STEP_SIZE = 10
21
+ GAMMA = 0.5
22
  DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
23
  NUM_PRINT = 100
24
  TASK = 1
 
125
  [
126
  transforms.Resize((64, 64)), # Resize images to 64x64
127
  transforms.ToTensor(), # Convert to tensor
128
+ transforms.Grayscale(num_output_channels=3), # Convert to 3 channels
129
  # Normalize 3 channels
130
  transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
131
  ]
data_loader.py CHANGED
@@ -33,3 +33,4 @@ def load_data(raw_dir, augmented_dir, external_dir, preprocess, batch_size=BATCH
33
  )
34
 
35
  return train_loader, valid_loader
 
 
33
  )
34
 
35
  return train_loader, valid_loader
36
+
tuning.py CHANGED
@@ -11,8 +11,8 @@ from torch.utils.tensorboard import SummaryWriter
11
 
12
  DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
13
  EPOCHS = 10
14
- N_TRIALS = 50
15
- TIMEOUT = 900
16
 
17
  # Create a TensorBoard writer
18
  writer = SummaryWriter(log_dir="output/tensorboard/tuning")
 
11
 
12
  DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
13
  EPOCHS = 10
14
+ N_TRIALS = 1000
15
+ TIMEOUT = 7200
16
 
17
  # Create a TensorBoard writer
18
  writer = SummaryWriter(log_dir="output/tensorboard/tuning")