JustAGek commited on
Commit
e2eba88
·
1 Parent(s): d152cc9

Speed up dataloader and set batch size 64

Browse files
params_storage/params_fig10b_single_gpu.py CHANGED
@@ -32,7 +32,7 @@ opt_exp.gpu_ids = ['0'] # Single GPU
32
  opt_exp.data = "rw_to_rw" # Jacobs Hall complex env
33
  opt_exp.n_decoders = 2 # Encoder + location decoder + consistency decoder
34
 
35
- opt_exp.batch_size = 8 # Reduced from 32 for 6 GB VRAM
36
  opt_exp.ds_step_trn = 1
37
  opt_exp.ds_step_tst = 1
38
  opt_exp.weight_decay = 1e-5
 
32
  opt_exp.data = "rw_to_rw" # Jacobs Hall complex env
33
  opt_exp.n_decoders = 2 # Encoder + location decoder + consistency decoder
34
 
35
+ opt_exp.batch_size = 64 # Larger batch for H100-class GPUs
36
  opt_exp.ds_step_trn = 1
37
  opt_exp.ds_step_tst = 1
38
  opt_exp.weight_decay = 1e-5
params_storage/params_mamba_single_gpu.py CHANGED
@@ -30,7 +30,7 @@ opt_exp.data = "rw_to_rw" # Same Jacobs Hall dataset as Fig 10b
30
  opt_exp.n_decoders = 1 # Single decoder (location only)
31
  opt_exp.model_type = "mamba" # Selects Mamba pipeline in train_and_test.py
32
 
33
- opt_exp.batch_size = 8
34
  opt_exp.ds_step_trn = 1
35
  opt_exp.ds_step_tst = 1
36
  opt_exp.weight_decay = 1e-5
 
30
  opt_exp.n_decoders = 1 # Single decoder (location only)
31
  opt_exp.model_type = "mamba" # Selects Mamba pipeline in train_and_test.py
32
 
33
+ opt_exp.batch_size = 64
34
  opt_exp.ds_step_trn = 1
35
  opt_exp.ds_step_tst = 1
36
  opt_exp.weight_decay = 1e-5
train_and_test.py CHANGED
@@ -121,14 +121,26 @@ Samples are read on demand from HDF5 files - uses ~0 RAM.
121
  print('Indexing training files (lazy, no data loaded into RAM)...')
122
  train_data = LazyMultiHDF5Dataset(trainpath)
123
  train_loader = torch.utils.data.DataLoader(
124
- train_data, batch_size=opt_exp.batch_size, shuffle=True, num_workers=0)
 
 
 
 
 
 
125
  print(f'# training samples = {len(train_data)}')
126
  print(f'# training mini batch = {len(train_loader)}')
127
 
128
  print('Indexing testing files...')
129
  test_data = LazyMultiHDF5Dataset(testpath)
130
  test_loader = torch.utils.data.DataLoader(
131
- test_data, batch_size=opt_exp.batch_size, shuffle=False, num_workers=0)
 
 
 
 
 
 
132
  print(f'# testing samples = {len(test_data)}')
133
  print(f'# testing mini batch = {len(test_loader)}')
134
  print('Data Loaded (lazy)')
 
121
  print('Indexing training files (lazy, no data loaded into RAM)...')
122
  train_data = LazyMultiHDF5Dataset(trainpath)
123
  train_loader = torch.utils.data.DataLoader(
124
+ train_data,
125
+ batch_size=opt_exp.batch_size,
126
+ shuffle=True,
127
+ num_workers=4,
128
+ pin_memory=True,
129
+ persistent_workers=True,
130
+ )
131
  print(f'# training samples = {len(train_data)}')
132
  print(f'# training mini batch = {len(train_loader)}')
133
 
134
  print('Indexing testing files...')
135
  test_data = LazyMultiHDF5Dataset(testpath)
136
  test_loader = torch.utils.data.DataLoader(
137
+ test_data,
138
+ batch_size=opt_exp.batch_size,
139
+ shuffle=False,
140
+ num_workers=4,
141
+ pin_memory=True,
142
+ persistent_workers=True,
143
+ )
144
  print(f'# testing samples = {len(test_data)}')
145
  print(f'# testing mini batch = {len(test_loader)}')
146
  print('Data Loaded (lazy)')