Update I/O and configs
This commit is contained in:
1 parent
7c7dc28ce0
commit
3686b3e8c4
5 files changed
+16
-16
No files matched your search
@@ -1,10 +1,10 @@
|
|||||||
# configs/train_1photon.yaml
|
# configs/train_1photon.yaml
|
||||||
experiment:
|
experiment:
|
||||||
name: "1photon_12keV"
|
name: "1photon_15keV"
|
||||||
|
|
||||||
data:
|
data:
|
||||||
sample_folder: "/mnt/sls_det_storage/moench_data/MLXID/Samples/Simulation/Moench040"
|
sample_folder: "/mnt/sls_det_storage/moench_data/MLXID/Samples/Simulation/Moench040"
|
||||||
energy: 12 ### in keV
|
energy: 15 ### in keV
|
||||||
noise_keV: 0.13
|
noise_keV: 0.13
|
||||||
noise_threshold: 0.0 ### set values below (noise * noise_threshold) to zero
|
noise_threshold: 0.0 ### set values below (noise * noise_threshold) to zero
|
||||||
num_aug_ops: 1
|
num_aug_ops: 1
|
||||||
@@ -22,7 +22,7 @@ model:
|
|||||||
version: "260511" # 251022
|
version: "260511" # 251022
|
||||||
|
|
||||||
training:
|
training:
|
||||||
epochs: 150
|
epochs: 500
|
||||||
learning_rate: 1.0e-3
|
learning_rate: 1.0e-3
|
||||||
scheduler_factor: 0.7
|
scheduler_factor: 0.7
|
||||||
scheduler_patience: 3
|
scheduler_patience: 3
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# configs/train_2photon.yaml
|
# configs/train_2photon.yaml
|
||||||
experiment:
|
experiment:
|
||||||
name: "2photon_12keV"
|
name: "2photon_15keV"
|
||||||
|
|
||||||
data:
|
data:
|
||||||
sample_folder: "/home/xie_x1/MLXID/DataProcess/Samples/SimuPileupSample/"
|
sample_folder: "/home/xie_x1/MLXID/DataProcess/Samples/15keV_SimuPileupSample/"
|
||||||
energy: 12 ### in keV
|
energy: 15 ### in keV
|
||||||
sample_ratio: 1.0
|
sample_ratio: 1.0
|
||||||
noise_keV: 0.13
|
noise_keV: 0.13
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ data:
|
|||||||
n_size: 6 ### size of sub-images containing 2 photons
|
n_size: 6 ### size of sub-images containing 2 photons
|
||||||
|
|
||||||
model:
|
model:
|
||||||
version: "260608" ## 260608
|
version: "260610" ### 260610 is the best one as of 260622
|
||||||
|
|
||||||
training:
|
training:
|
||||||
epochs: 1000
|
epochs: 1000
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# configs/train_3photon.yaml
|
# configs/train_3photon.yaml
|
||||||
experiment:
|
experiment:
|
||||||
name: "3photon_12keV"
|
name: "3photon_15keV"
|
||||||
|
|
||||||
data:
|
data:
|
||||||
sample_folder: "/home/xie_x1/MLXID/DeepLearning/PileupSample"
|
sample_folder: "/home/xie_x1/MLXID/DeepLearning/PileupSample"
|
||||||
energy: 12 ### in keV
|
energy: 15 ### in keV
|
||||||
|
|
||||||
batch_size_train: 4096
|
batch_size_train: 512
|
||||||
batch_size_val: 8192
|
batch_size_val: 8192
|
||||||
batch_size_test: 8192
|
batch_size_test: 8192
|
||||||
num_workers: 16
|
num_workers: 16
|
||||||
|
|||||||
+5
-5
@@ -31,13 +31,13 @@ def prepare_output_folder(conf):
|
|||||||
# find the next index for experiment name
|
# find the next index for experiment name
|
||||||
exp_index = 0
|
exp_index = 0
|
||||||
while True:
|
while True:
|
||||||
exp_name = f'{date}_1ph_{conf.data.energy}keV_v{conf.model.version}_{exp_index:02d}'
|
exp_name = f'{date}_{conf.data.energy}keV_v{conf.model.version}_{exp_index:02d}'
|
||||||
if not Path(f'Results/{exp_name}').exists():
|
if not Path(f'Results/1ph/{exp_name}').exists():
|
||||||
break
|
break
|
||||||
exp_index += 1
|
exp_index += 1
|
||||||
Path(f'Results/{exp_name}').mkdir(parents=True, exist_ok=True)
|
Path(f'Results/1ph/{exp_name}').mkdir(parents=True, exist_ok=True)
|
||||||
Path(f'Results/{exp_name}/Models').mkdir(parents=True, exist_ok=True)
|
Path(f'Results/1ph/{exp_name}/Models').mkdir(parents=True, exist_ok=True)
|
||||||
Path(f'Results/{exp_name}/Plots').mkdir(parents=True, exist_ok=True)
|
Path(f'Results/1ph/{exp_name}/Plots').mkdir(parents=True, exist_ok=True)
|
||||||
OmegaConf.save(conf, f'Results/{exp_name}/config.yaml')
|
OmegaConf.save(conf, f'Results/{exp_name}/config.yaml')
|
||||||
return exp_name
|
return exp_name
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -181,7 +181,7 @@ def get_dataloaders(conf):
|
|||||||
file_range_keys = ['train_file_range', 'val_file_range', 'test_file_range']
|
file_range_keys = ['train_file_range', 'val_file_range', 'test_file_range']
|
||||||
|
|
||||||
for split, key, batch_key, file_range_key in zip(splits, keys, batch_keys, file_range_keys):
|
for split, key, batch_key, file_range_key in zip(splits, keys, batch_keys, file_range_keys):
|
||||||
files = [f"{conf.data.sample_folder}/pileupOf2phs_sample_{i}.npz" for i in range(conf.data[file_range_key][0], conf.data[file_range_key][1] + 1)]
|
files = [f"{conf.data.sample_folder}/{conf.data.energy}keV_Noise{conf.data.noise_keV}keV_pileupOf2phs_sample_{i}.npz" for i in range(conf.data[file_range_key][0], conf.data[file_range_key][1] + 1)]
|
||||||
|
|
||||||
datasets[split] = doublePhotonDataset(
|
datasets[split] = doublePhotonDataset(
|
||||||
files,
|
files,
|
||||||
|
|||||||
Reference in new issue
Block a user