valentinsingularity commited on
Commit
19768b9
·
verified ·
1 Parent(s): 91b3178

Upload 13 files

Browse files
configs/a_base_point_neutron_conv_standard.yaml ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: a_base_point_neutron_conv_standard
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ bound_width_ranges:
15
+ thicknesses: [1.0e-2, 500.]
16
+ roughnesses: [1.0e-2, 60.]
17
+ slds: [1.0e-2, 5.]
18
+ model_name: standard_model
19
+ max_num_layers: 2
20
+ constrained_roughness: true
21
+ max_thickness_share: 0.5
22
+ logdist: false
23
+ scale_params_by_ranges: false
24
+ scaled_range: [-1., 1.]
25
+ device: 'cuda'
26
+
27
+ q_generator:
28
+ cls: ConstantQ
29
+ kwargs:
30
+ q: [0.02, 0.15, 128]
31
+ device: 'cuda'
32
+
33
+ # q_generator:
34
+ # cls: VariableQ
35
+ # kwargs:
36
+ # q_min_range: [0.005, 0.03]
37
+ # q_max_range: [0.15, 0.3]
38
+ # n_q_range: [128, 128]
39
+ # device: 'cuda'
40
+
41
+ intensity_noise:
42
+ cls: GaussianExpIntensityNoise
43
+ kwargs:
44
+ relative_errors: [0.01, 0.3]
45
+ consistent_rel_err: false
46
+ apply_shift: false #true
47
+ shift_range: [-0.3, 0.3]
48
+ apply_background: false
49
+ background_range: [1.0e-10, 1.0e-4]
50
+ add_to_context: true
51
+
52
+ # q_noise:
53
+ # cls: BasicQNoiseGenerator
54
+ # kwargs:
55
+ # apply_systematic_shifts: true
56
+ # shift_std: 1.0e-3
57
+ # apply_gaussian_noise: false
58
+ # noise_std: [0., 1.0e-3]
59
+ # add_to_context: true
60
+
61
+ smearing:
62
+ cls: Smearing
63
+ kwargs:
64
+ sigma_range: [0.01, 0.08]
65
+ constant_dq: False
66
+ gauss_num: 17
67
+ share_smeared: 0.8
68
+
69
+ curves_scaler:
70
+ cls: LogAffineCurvesScaler
71
+ kwargs:
72
+ weight: 0.2
73
+ bias: 1.0
74
+ eps: 1.0e-10
75
+
76
+ model:
77
+ network:
78
+ cls: NetworkWithPriors
79
+ pretrained_name: null
80
+ device: 'cuda'
81
+ kwargs:
82
+ embedding_net_type: 'conv'
83
+ embedding_net_kwargs:
84
+ in_channels: 1
85
+ hidden_channels: [32, 64, 128, 256, 512]
86
+ kernel_size: 3
87
+ dim_embedding: 128
88
+ dim_avpool: 1
89
+ use_batch_norm: true
90
+ use_se: false
91
+ activation: 'gelu'
92
+ pretrained_embedding_net: null
93
+ dim_out: 8
94
+ dim_conditioning_params: 0
95
+ layer_width: 512
96
+ num_blocks: 6
97
+ repeats_per_block: 2
98
+ residual: true
99
+ use_batch_norm: true
100
+ use_layer_norm: false
101
+ mlp_activation: 'gelu'
102
+ dropout_rate: 0.0
103
+ tanh_output: false
104
+ conditioning: 'concat' # 'concat', 'glu', 'film'
105
+ concat_condition_first_layer: false
106
+
107
+ training:
108
+ trainer_cls: PointEstimatorTrainer
109
+ num_iterations: 10000
110
+ batch_size: 4096
111
+ lr: 1.0e-3
112
+ grad_accumulation_steps: 1
113
+ clip_grad_norm_max: null
114
+ update_tqdm_freq: 1
115
+ optimizer: AdamW
116
+ trainer_kwargs:
117
+ train_with_q_input: false
118
+ train_with_sigmas: false
119
+ condition_on_q_resolutions: false
120
+ use_curve_reconstruction_loss: false
121
+ rescale_loss_interval_width: true #false
122
+ use_l1_loss: true #false
123
+ optim_kwargs:
124
+ betas: [0.9, 0.999]
125
+ weight_decay: 0.0005
126
+ callbacks:
127
+ save_best_model:
128
+ enable: true
129
+ freq: 500
130
+ lr_scheduler:
131
+ cls: CosineAnnealingWithWarmup
132
+ kwargs:
133
+ min_lr: 1.0e-6
134
+ warmup_iters: 100
135
+ total_iters: 10000
136
+ # cls: StepLR
137
+ # kwargs:
138
+ # step_size: 10000
139
+ # gamma: 0.5
140
+
141
+ # logger:
142
+ # cls: TensorBoardLogger
143
+ # kwargs:
144
+ # log_dir: "tensorboard_runs/test_1"
configs/b_mc_point_neutron_conv_standard_L1_InputQDq.yaml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: b_mc_point_neutron_conv_standard_L1_InputQDq
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 1000.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ bound_width_ranges:
15
+ thicknesses: [1.0e-2, 1000.]
16
+ roughnesses: [1.0e-2, 60.]
17
+ slds: [1.0e-2, 5.]
18
+ model_name: standard_model
19
+ max_num_layers: 1
20
+ constrained_roughness: true
21
+ max_thickness_share: 0.5
22
+ logdist: false
23
+ scale_params_by_ranges: false
24
+ scaled_range: [-1., 1.]
25
+ device: 'cuda'
26
+
27
+ q_generator:
28
+ cls: VariableQ
29
+ kwargs:
30
+ q_min_range: [0.001, 0.03]
31
+ q_max_range: [0.1, 0.4]
32
+ n_q_range: [128, 128]
33
+ device: 'cuda'
34
+
35
+ intensity_noise:
36
+ cls: GaussianExpIntensityNoise
37
+ kwargs:
38
+ relative_errors: [0.01, 0.3]
39
+ consistent_rel_err: false
40
+ apply_shift: true
41
+ shift_range: [-0.3, 0.3]
42
+ apply_background: true
43
+ background_range: [1.0e-10, 1.0e-4]
44
+ add_to_context: true
45
+
46
+ smearing:
47
+ cls: Smearing
48
+ kwargs:
49
+ sigma_range: [0.01, 0.10]
50
+ constant_dq: False
51
+ gauss_num: 17
52
+ share_smeared: 0.8
53
+
54
+ curves_scaler:
55
+ cls: LogAffineCurvesScaler
56
+ kwargs:
57
+ weight: 0.2
58
+ bias: 1.0
59
+ eps: 1.0e-10
60
+
61
+ model:
62
+ network:
63
+ cls: NetworkWithPriors
64
+ pretrained_name: null
65
+ device: 'cuda'
66
+ kwargs:
67
+ embedding_net_type: 'conv'
68
+ embedding_net_kwargs:
69
+ in_channels: 2
70
+ hidden_channels: [32, 64, 128, 256, 512]
71
+ kernel_size: 3
72
+ dim_embedding: 128
73
+ dim_avpool: 1
74
+ use_batch_norm: true
75
+ use_se: false
76
+ activation: 'gelu'
77
+ pretrained_embedding_net: null
78
+ dim_out: 5
79
+ dim_conditioning_params: 1
80
+ layer_width: 512
81
+ num_blocks: 8
82
+ repeats_per_block: 2
83
+ residual: true
84
+ use_batch_norm: true
85
+ use_layer_norm: false
86
+ mlp_activation: 'gelu'
87
+ dropout_rate: 0.0
88
+ tanh_output: false
89
+ conditioning: 'film'
90
+ concat_condition_first_layer: true ### back. comp.
91
+
92
+ training:
93
+ trainer_cls: PointEstimatorTrainer
94
+ num_iterations: 100000
95
+ batch_size: 4096
96
+ lr: 1.0e-3
97
+ grad_accumulation_steps: 1
98
+ clip_grad_norm_max: null
99
+ update_tqdm_freq: 1
100
+ optimizer: AdamW
101
+ trainer_kwargs:
102
+ train_with_q_input: true
103
+ train_with_sigmas: false
104
+ condition_on_q_resolutions: true
105
+ use_curve_reconstruction_loss: false
106
+ rescale_loss_interval_width: true
107
+ use_l1_loss: true
108
+ optim_kwargs:
109
+ betas: [0.9, 0.999]
110
+ weight_decay: 0.0005
111
+ callbacks:
112
+ save_best_model:
113
+ enable: true
114
+ freq: 500
115
+ lr_scheduler:
116
+ cls: CosineAnnealingWithWarmup
117
+ kwargs:
118
+ min_lr: 1.0e-6
119
+ warmup_iters: 500
120
+ total_iters: 100000
configs/b_mc_point_neutron_conv_standard_L2_InputQDq.yaml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: b_mc_point_neutron_conv_standard_L2_InputQDq
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ bound_width_ranges:
15
+ thicknesses: [1.0e-2, 500.]
16
+ roughnesses: [1.0e-2, 60.]
17
+ slds: [1.0e-2, 5.]
18
+ model_name: standard_model
19
+ max_num_layers: 2
20
+ constrained_roughness: true
21
+ max_thickness_share: 0.5
22
+ logdist: false
23
+ scale_params_by_ranges: false
24
+ scaled_range: [-1., 1.]
25
+ device: 'cuda'
26
+
27
+ q_generator:
28
+ cls: VariableQ
29
+ kwargs:
30
+ q_min_range: [0.001, 0.03]
31
+ q_max_range: [0.1, 0.4]
32
+ n_q_range: [128, 128]
33
+ device: 'cuda'
34
+
35
+ intensity_noise:
36
+ cls: GaussianExpIntensityNoise
37
+ kwargs:
38
+ relative_errors: [0.01, 0.3]
39
+ consistent_rel_err: false
40
+ apply_shift: true
41
+ shift_range: [-0.3, 0.3]
42
+ apply_background: true
43
+ background_range: [1.0e-10, 1.0e-4]
44
+ add_to_context: true
45
+
46
+ smearing:
47
+ cls: Smearing
48
+ kwargs:
49
+ sigma_range: [0.01, 0.10]
50
+ constant_dq: False
51
+ gauss_num: 17
52
+ share_smeared: 0.8
53
+
54
+ curves_scaler:
55
+ cls: LogAffineCurvesScaler
56
+ kwargs:
57
+ weight: 0.2
58
+ bias: 1.0
59
+ eps: 1.0e-10
60
+
61
+ model:
62
+ network:
63
+ cls: NetworkWithPriors
64
+ pretrained_name: null
65
+ device: 'cuda'
66
+ kwargs:
67
+ embedding_net_type: 'conv'
68
+ embedding_net_kwargs:
69
+ in_channels: 2
70
+ hidden_channels: [32, 64, 128, 256, 512]
71
+ kernel_size: 3
72
+ dim_embedding: 128
73
+ dim_avpool: 1
74
+ use_batch_norm: true
75
+ use_se: false
76
+ activation: 'gelu'
77
+ pretrained_embedding_net: null
78
+ dim_out: 8
79
+ dim_conditioning_params: 1
80
+ layer_width: 512
81
+ num_blocks: 8
82
+ repeats_per_block: 2
83
+ residual: true
84
+ use_batch_norm: true
85
+ use_layer_norm: false
86
+ mlp_activation: 'gelu'
87
+ dropout_rate: 0.0
88
+ tanh_output: false
89
+ conditioning: 'film'
90
+ concat_condition_first_layer: true ### back. comp.
91
+
92
+ training:
93
+ trainer_cls: PointEstimatorTrainer
94
+ num_iterations: 100000
95
+ batch_size: 4096
96
+ lr: 1.0e-3
97
+ grad_accumulation_steps: 1
98
+ clip_grad_norm_max: null
99
+ update_tqdm_freq: 1
100
+ optimizer: AdamW
101
+ trainer_kwargs:
102
+ train_with_q_input: true
103
+ train_with_sigmas: false
104
+ condition_on_q_resolutions: true
105
+ use_curve_reconstruction_loss: false
106
+ rescale_loss_interval_width: true
107
+ use_l1_loss: true
108
+ optim_kwargs:
109
+ betas: [0.9, 0.999]
110
+ weight_decay: 0.0005
111
+ callbacks:
112
+ save_best_model:
113
+ enable: true
114
+ freq: 500
115
+ lr_scheduler:
116
+ cls: CosineAnnealingWithWarmup
117
+ kwargs:
118
+ min_lr: 1.0e-6
119
+ warmup_iters: 500
120
+ total_iters: 100000
configs/b_mc_point_neutron_conv_standard_L3_InputQDq.yaml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: b_mc_point_neutron_conv_standard_L3_InputQDq
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ bound_width_ranges:
15
+ thicknesses: [1.0e-2, 500.]
16
+ roughnesses: [1.0e-2, 60.]
17
+ slds: [1.0e-2, 5.]
18
+ model_name: standard_model
19
+ max_num_layers: 3
20
+ constrained_roughness: true
21
+ max_thickness_share: 0.5
22
+ logdist: false
23
+ scale_params_by_ranges: false
24
+ scaled_range: [-1., 1.]
25
+ device: 'cuda'
26
+
27
+ q_generator:
28
+ cls: VariableQ
29
+ kwargs:
30
+ q_min_range: [0.001, 0.03]
31
+ q_max_range: [0.1, 0.4]
32
+ n_q_range: [128, 128]
33
+ device: 'cuda'
34
+
35
+ intensity_noise:
36
+ cls: GaussianExpIntensityNoise
37
+ kwargs:
38
+ relative_errors: [0.01, 0.3]
39
+ consistent_rel_err: false
40
+ apply_shift: true
41
+ shift_range: [-0.3, 0.3]
42
+ apply_background: true
43
+ background_range: [1.0e-10, 1.0e-4]
44
+ add_to_context: true
45
+
46
+ smearing:
47
+ cls: Smearing
48
+ kwargs:
49
+ sigma_range: [0.01, 0.10]
50
+ constant_dq: False
51
+ gauss_num: 17
52
+ share_smeared: 0.8
53
+
54
+ curves_scaler:
55
+ cls: LogAffineCurvesScaler
56
+ kwargs:
57
+ weight: 0.2
58
+ bias: 1.0
59
+ eps: 1.0e-10
60
+
61
+ model:
62
+ network:
63
+ cls: NetworkWithPriors
64
+ pretrained_name: null
65
+ device: 'cuda'
66
+ kwargs:
67
+ embedding_net_type: 'conv'
68
+ embedding_net_kwargs:
69
+ in_channels: 2
70
+ hidden_channels: [32, 64, 128, 256, 512]
71
+ kernel_size: 3
72
+ dim_embedding: 128
73
+ dim_avpool: 1
74
+ use_batch_norm: true
75
+ use_se: false
76
+ activation: 'gelu'
77
+ pretrained_embedding_net: null
78
+ dim_out: 11
79
+ dim_conditioning_params: 1
80
+ layer_width: 512
81
+ num_blocks: 8
82
+ repeats_per_block: 2
83
+ residual: true
84
+ use_batch_norm: true
85
+ use_layer_norm: false
86
+ mlp_activation: 'gelu'
87
+ dropout_rate: 0.0
88
+ tanh_output: false
89
+ conditioning: 'film'
90
+ concat_condition_first_layer: true ### back. comp.
91
+
92
+ training:
93
+ trainer_cls: PointEstimatorTrainer
94
+ num_iterations: 100000
95
+ batch_size: 2048 #reduced batch
96
+ lr: 1.0e-3
97
+ grad_accumulation_steps: 1
98
+ clip_grad_norm_max: null
99
+ update_tqdm_freq: 1
100
+ optimizer: AdamW
101
+ trainer_kwargs:
102
+ train_with_q_input: true
103
+ train_with_sigmas: false
104
+ condition_on_q_resolutions: true
105
+ use_curve_reconstruction_loss: false
106
+ rescale_loss_interval_width: true
107
+ use_l1_loss: true
108
+ optim_kwargs:
109
+ betas: [0.9, 0.999]
110
+ weight_decay: 0.0005
111
+ callbacks:
112
+ save_best_model:
113
+ enable: true
114
+ freq: 500
115
+ lr_scheduler:
116
+ cls: CosineAnnealingWithWarmup
117
+ kwargs:
118
+ min_lr: 1.0e-6
119
+ warmup_iters: 500
120
+ total_iters: 100000
configs/b_mc_point_xray_conv_standard_L1.yaml ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: b_mc_point_xray_conv_standard_L1
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 1000.]
12
+ roughnesses: [0., 60.]
13
+ slds: [0., 50.]
14
+ bound_width_ranges:
15
+ thicknesses: [1.0e-2, 1000.]
16
+ roughnesses: [1.0e-2, 60.]
17
+ slds: [1.0e-2, 5.]
18
+ model_name: standard_model
19
+ max_num_layers: 1
20
+ constrained_roughness: true
21
+ max_thickness_share: 0.5
22
+ logdist: false
23
+ scale_params_by_ranges: false
24
+ scaled_range: [-1., 1.]
25
+ device: 'cuda'
26
+
27
+ q_generator:
28
+ cls: ConstantQ
29
+ kwargs:
30
+ q: [0.005, 0.2, 128]
31
+ device: 'cuda'
32
+
33
+ intensity_noise:
34
+ cls: GaussianExpIntensityNoise
35
+ kwargs:
36
+ relative_errors: [0.01, 0.3]
37
+ consistent_rel_err: false
38
+ apply_shift: true
39
+ shift_range: [-0.3, 0.3]
40
+ add_to_context: true
41
+
42
+ curves_scaler:
43
+ cls: LogAffineCurvesScaler
44
+ kwargs:
45
+ weight: 0.2
46
+ bias: 1.0
47
+ eps: 1.0e-10
48
+
49
+ model:
50
+ network:
51
+ cls: NetworkWithPriors
52
+ pretrained_name: null
53
+ device: 'cuda'
54
+ kwargs:
55
+ embedding_net_type: 'conv'
56
+ embedding_net_kwargs:
57
+ in_channels: 1
58
+ hidden_channels: [32, 64, 128, 256, 512]
59
+ kernel_size: 3
60
+ dim_embedding: 128
61
+ dim_avpool: 1
62
+ use_batch_norm: true
63
+ use_se: false
64
+ activation: 'gelu'
65
+ pretrained_embedding_net: null
66
+ dim_out: 5
67
+ dim_conditioning_params: 0
68
+ layer_width: 512
69
+ num_blocks: 8
70
+ repeats_per_block: 2
71
+ residual: true
72
+ use_batch_norm: true
73
+ use_layer_norm: false
74
+ mlp_activation: 'gelu'
75
+ dropout_rate: 0.0
76
+ tanh_output: false
77
+ conditioning: 'film'
78
+ concat_condition_first_layer: false
79
+
80
+ training:
81
+ trainer_cls: PointEstimatorTrainer
82
+ num_iterations: 100000
83
+ batch_size: 4096
84
+ lr: 1.0e-3
85
+ grad_accumulation_steps: 1
86
+ clip_grad_norm_max: null
87
+ update_tqdm_freq: 1
88
+ optimizer: AdamW
89
+ trainer_kwargs:
90
+ train_with_q_input: false
91
+ train_with_sigmas: false
92
+ condition_on_q_resolutions: false
93
+ use_curve_reconstruction_loss: false
94
+ rescale_loss_interval_width: true
95
+ use_l1_loss: true
96
+ optim_kwargs:
97
+ betas: [0.9, 0.999]
98
+ weight_decay: 0.0005
99
+ callbacks:
100
+ save_best_model:
101
+ enable: true
102
+ freq: 500
103
+ lr_scheduler:
104
+ cls: CosineAnnealingWithWarmup
105
+ kwargs:
106
+ min_lr: 1.0e-6
107
+ warmup_iters: 500
108
+ total_iters: 100000
configs/b_mc_point_xray_conv_standard_L2.yaml ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: b_mc_point_xray_conv_standard_L2
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [0., 50.]
14
+ bound_width_ranges:
15
+ thicknesses: [1.0e-2, 500.]
16
+ roughnesses: [1.0e-2, 60.]
17
+ slds: [1.0e-2, 5.]
18
+ model_name: standard_model
19
+ max_num_layers: 2
20
+ constrained_roughness: true
21
+ max_thickness_share: 0.5
22
+ logdist: false
23
+ scale_params_by_ranges: false
24
+ scaled_range: [-1., 1.]
25
+ device: 'cuda'
26
+
27
+ q_generator:
28
+ cls: ConstantQ
29
+ kwargs:
30
+ q: [0.005, 0.2, 128]
31
+ device: 'cuda'
32
+
33
+ intensity_noise:
34
+ cls: GaussianExpIntensityNoise
35
+ kwargs:
36
+ relative_errors: [0.01, 0.3]
37
+ consistent_rel_err: false
38
+ apply_shift: true
39
+ shift_range: [-0.3, 0.3]
40
+ add_to_context: true
41
+
42
+ curves_scaler:
43
+ cls: LogAffineCurvesScaler
44
+ kwargs:
45
+ weight: 0.2
46
+ bias: 1.0
47
+ eps: 1.0e-10
48
+
49
+ model:
50
+ network:
51
+ cls: NetworkWithPriors
52
+ pretrained_name: null
53
+ device: 'cuda'
54
+ kwargs:
55
+ embedding_net_type: 'conv'
56
+ embedding_net_kwargs:
57
+ in_channels: 1
58
+ hidden_channels: [32, 64, 128, 256, 512]
59
+ kernel_size: 3
60
+ dim_embedding: 128
61
+ dim_avpool: 1
62
+ use_batch_norm: true
63
+ use_se: false
64
+ activation: 'gelu'
65
+ pretrained_embedding_net: null
66
+ dim_out: 8
67
+ dim_conditioning_params: 0
68
+ layer_width: 512
69
+ num_blocks: 8
70
+ repeats_per_block: 2
71
+ residual: true
72
+ use_batch_norm: true
73
+ use_layer_norm: false
74
+ mlp_activation: 'gelu'
75
+ dropout_rate: 0.0
76
+ tanh_output: false
77
+ conditioning: 'film'
78
+ concat_condition_first_layer: false
79
+
80
+ training:
81
+ trainer_cls: PointEstimatorTrainer
82
+ num_iterations: 100000
83
+ batch_size: 4096
84
+ lr: 1.0e-3
85
+ grad_accumulation_steps: 1
86
+ clip_grad_norm_max: null
87
+ update_tqdm_freq: 1
88
+ optimizer: AdamW
89
+ trainer_kwargs:
90
+ train_with_q_input: false
91
+ train_with_sigmas: false
92
+ condition_on_q_resolutions: false
93
+ use_curve_reconstruction_loss: false
94
+ rescale_loss_interval_width: true
95
+ use_l1_loss: true
96
+ optim_kwargs:
97
+ betas: [0.9, 0.999]
98
+ weight_decay: 0.0005
99
+ callbacks:
100
+ save_best_model:
101
+ enable: true
102
+ freq: 500
103
+ lr_scheduler:
104
+ cls: CosineAnnealingWithWarmup
105
+ kwargs:
106
+ min_lr: 1.0e-6
107
+ warmup_iters: 500
108
+ total_iters: 100000
configs/b_mc_point_xray_conv_standard_L3.yaml ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: b_mc_point_xray_conv_standard_L3
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [0., 50.]
14
+ bound_width_ranges:
15
+ thicknesses: [1.0e-2, 500.]
16
+ roughnesses: [1.0e-2, 60.]
17
+ slds: [1.0e-2, 5.]
18
+ model_name: standard_model
19
+ max_num_layers: 3
20
+ constrained_roughness: true
21
+ max_thickness_share: 0.5
22
+ logdist: false
23
+ scale_params_by_ranges: false
24
+ scaled_range: [-1., 1.]
25
+ device: 'cuda'
26
+
27
+ q_generator:
28
+ cls: ConstantQ
29
+ kwargs:
30
+ q: [0.005, 0.2, 128]
31
+ device: 'cuda'
32
+
33
+ intensity_noise:
34
+ cls: GaussianExpIntensityNoise
35
+ kwargs:
36
+ relative_errors: [0.01, 0.3]
37
+ consistent_rel_err: false
38
+ apply_shift: true
39
+ shift_range: [-0.3, 0.3]
40
+ add_to_context: true
41
+
42
+ curves_scaler:
43
+ cls: LogAffineCurvesScaler
44
+ kwargs:
45
+ weight: 0.2
46
+ bias: 1.0
47
+ eps: 1.0e-10
48
+
49
+ model:
50
+ network:
51
+ cls: NetworkWithPriors
52
+ pretrained_name: null
53
+ device: 'cuda'
54
+ kwargs:
55
+ embedding_net_type: 'conv'
56
+ embedding_net_kwargs:
57
+ in_channels: 1
58
+ hidden_channels: [32, 64, 128, 256, 512]
59
+ kernel_size: 3
60
+ dim_embedding: 128
61
+ dim_avpool: 1
62
+ use_batch_norm: true
63
+ use_se: false
64
+ activation: 'gelu'
65
+ pretrained_embedding_net: null
66
+ dim_out: 11
67
+ dim_conditioning_params: 0
68
+ layer_width: 512
69
+ num_blocks: 8
70
+ repeats_per_block: 2
71
+ residual: true
72
+ use_batch_norm: true
73
+ use_layer_norm: false
74
+ mlp_activation: 'gelu'
75
+ dropout_rate: 0.0
76
+ tanh_output: false
77
+ conditioning: 'film'
78
+ concat_condition_first_layer: false
79
+
80
+ training:
81
+ trainer_cls: PointEstimatorTrainer
82
+ num_iterations: 100000
83
+ batch_size: 4096
84
+ lr: 1.0e-3
85
+ grad_accumulation_steps: 1
86
+ clip_grad_norm_max: null
87
+ update_tqdm_freq: 1
88
+ optimizer: AdamW
89
+ trainer_kwargs:
90
+ train_with_q_input: false
91
+ train_with_sigmas: false
92
+ condition_on_q_resolutions: false
93
+ use_curve_reconstruction_loss: false
94
+ rescale_loss_interval_width: true
95
+ use_l1_loss: true
96
+ optim_kwargs:
97
+ betas: [0.9, 0.999]
98
+ weight_decay: 0.0005
99
+ callbacks:
100
+ save_best_model:
101
+ enable: true
102
+ freq: 500
103
+ lr_scheduler:
104
+ cls: CosineAnnealingWithWarmup
105
+ kwargs:
106
+ min_lr: 1.0e-6
107
+ warmup_iters: 500
108
+ total_iters: 100000
configs/e_mc_point_neutron_conv_standard_L1_InputQDq_n128_size1024.yaml ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: e_mc_point_neutron_conv_standard_L1_InputQDq_n128_size1024
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 1500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ r_scale: [0.9, 1.1]
15
+ log10_background: [-10.0, -4.0]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 1500.]
18
+ roughnesses: [1.0e-2, 60.]
19
+ slds: [1.0e-2, 5.]
20
+ r_scale: [1.0e-2, 0.2]
21
+ log10_background: [1.0e-2, 6.0]
22
+ shift_param_config:
23
+ r_scale: true
24
+ log10_background: true
25
+ model_name: standard_model
26
+ max_num_layers: 1
27
+ constrained_roughness: true
28
+ max_thickness_share: 0.5
29
+ logdist: false
30
+ scale_params_by_ranges: false
31
+ scaled_range: [-1., 1.]
32
+ device: 'cuda'
33
+
34
+ q_generator:
35
+ cls: VariableQ
36
+ kwargs:
37
+ q_min_range: [0.001, 0.02]
38
+ q_max_range: [0.05, 0.4]
39
+ n_q_range: [128, 128]
40
+ device: 'cuda'
41
+
42
+ intensity_noise:
43
+ cls: GaussianExpIntensityNoise
44
+ kwargs:
45
+ relative_errors: [0.01, 0.3]
46
+ add_to_context: true
47
+
48
+ smearing:
49
+ cls: Smearing
50
+ kwargs:
51
+ sigma_range: [0.01, 0.12]
52
+ gauss_num: 17
53
+ share_smeared: 1.0
54
+
55
+ curves_scaler:
56
+ cls: LogAffineCurvesScaler
57
+ kwargs:
58
+ weight: 0.2
59
+ bias: 1.0
60
+ eps: 1.0e-10
61
+
62
+ model:
63
+ network:
64
+ cls: NetworkWithPriors
65
+ pretrained_name: null
66
+ device: 'cuda'
67
+ kwargs:
68
+ embedding_net_type: 'conv'
69
+ embedding_net_kwargs:
70
+ in_channels: 2
71
+ hidden_channels: [32, 64, 128, 256, 512]
72
+ kernel_size: 3
73
+ dim_embedding: 512
74
+ dim_avpool: 4
75
+ use_batch_norm: true
76
+ use_se: false
77
+ activation: 'gelu'
78
+ pretrained_embedding_net: null
79
+ dim_out: 7
80
+ dim_conditioning_params: 1
81
+ layer_width: 1024
82
+ num_blocks: 8
83
+ repeats_per_block: 2
84
+ residual: true
85
+ use_batch_norm: true
86
+ use_layer_norm: false
87
+ mlp_activation: 'gelu'
88
+ dropout_rate: 0.0
89
+ tanh_output: false
90
+ conditioning: 'film'
91
+ concat_condition_first_layer: false
92
+
93
+ training:
94
+ trainer_cls: PointEstimatorTrainer
95
+ num_iterations: 300000
96
+ batch_size: 4096
97
+ lr: 1.0e-3
98
+ grad_accumulation_steps: 1
99
+ clip_grad_norm_max: null
100
+ update_tqdm_freq: 1
101
+ optimizer: AdamW
102
+ trainer_kwargs:
103
+ train_with_q_input: true
104
+ condition_on_q_resolutions: true
105
+ rescale_loss_interval_width: true
106
+ use_l1_loss: true
107
+ optim_kwargs:
108
+ betas: [0.9, 0.999]
109
+ weight_decay: 0.0005
110
+ callbacks:
111
+ save_best_model:
112
+ enable: true
113
+ freq: 500
114
+ lr_scheduler:
115
+ cls: CosineAnnealingWithWarmup
116
+ kwargs:
117
+ min_lr: 1.0e-6
118
+ warmup_iters: 500
119
+ total_iters: 300000
configs/e_mc_point_neutron_conv_standard_L1_InputQDq_n256_size1024.yaml ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: e_mc_point_neutron_conv_standard_L1_InputQDq_n256_size1024
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 1500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ r_scale: [0.9, 1.1]
15
+ log10_background: [-10.0, -4.0]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 1500.]
18
+ roughnesses: [1.0e-2, 60.]
19
+ slds: [1.0e-2, 5.]
20
+ r_scale: [1.0e-2, 0.2]
21
+ log10_background: [1.0e-2, 6.0]
22
+ shift_param_config:
23
+ r_scale: true
24
+ log10_background: true
25
+ model_name: standard_model
26
+ max_num_layers: 1
27
+ constrained_roughness: true
28
+ max_thickness_share: 0.5
29
+ logdist: false
30
+ scale_params_by_ranges: false
31
+ scaled_range: [-1., 1.]
32
+ device: 'cuda'
33
+
34
+ q_generator:
35
+ cls: VariableQ
36
+ kwargs:
37
+ q_min_range: [0.001, 0.02]
38
+ q_max_range: [0.05, 0.4]
39
+ n_q_range: [256, 256]
40
+ device: 'cuda'
41
+
42
+ intensity_noise:
43
+ cls: GaussianExpIntensityNoise
44
+ kwargs:
45
+ relative_errors: [0.01, 0.3]
46
+ add_to_context: true
47
+
48
+ smearing:
49
+ cls: Smearing
50
+ kwargs:
51
+ sigma_range: [0.01, 0.12]
52
+ gauss_num: 17
53
+ share_smeared: 1.0
54
+
55
+ curves_scaler:
56
+ cls: LogAffineCurvesScaler
57
+ kwargs:
58
+ weight: 0.2
59
+ bias: 1.0
60
+ eps: 1.0e-10
61
+
62
+ model:
63
+ network:
64
+ cls: NetworkWithPriors
65
+ pretrained_name: null
66
+ device: 'cuda'
67
+ kwargs:
68
+ embedding_net_type: 'conv'
69
+ embedding_net_kwargs:
70
+ in_channels: 2
71
+ hidden_channels: [32, 64, 128, 256, 512]
72
+ kernel_size: 3
73
+ dim_embedding: 512
74
+ dim_avpool: 8
75
+ use_batch_norm: true
76
+ use_se: false
77
+ activation: 'gelu'
78
+ pretrained_embedding_net: null
79
+ dim_out: 7
80
+ dim_conditioning_params: 1
81
+ layer_width: 1024
82
+ num_blocks: 8
83
+ repeats_per_block: 2
84
+ residual: true
85
+ use_batch_norm: true
86
+ use_layer_norm: false
87
+ mlp_activation: 'gelu'
88
+ dropout_rate: 0.0
89
+ tanh_output: false
90
+ conditioning: 'film'
91
+ concat_condition_first_layer: false
92
+
93
+ training:
94
+ trainer_cls: PointEstimatorTrainer
95
+ num_iterations: 300000
96
+ batch_size: 4096
97
+ lr: 1.0e-3
98
+ grad_accumulation_steps: 1
99
+ clip_grad_norm_max: null
100
+ update_tqdm_freq: 1
101
+ optimizer: AdamW
102
+ trainer_kwargs:
103
+ train_with_q_input: true
104
+ condition_on_q_resolutions: true
105
+ rescale_loss_interval_width: true
106
+ use_l1_loss: true
107
+ optim_kwargs:
108
+ betas: [0.9, 0.999]
109
+ weight_decay: 0.0005
110
+ callbacks:
111
+ save_best_model:
112
+ enable: true
113
+ freq: 500
114
+ lr_scheduler:
115
+ cls: CosineAnnealingWithWarmup
116
+ kwargs:
117
+ min_lr: 1.0e-6
118
+ warmup_iters: 500
119
+ total_iters: 300000
configs/e_mc_point_neutron_conv_standard_L2_InputQDq_n128_size1024.yaml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: e_mc_point_neutron_conv_standard_L2_InputQDq_n128_size1024
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 1500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ r_scale: [0.9, 1.1]
15
+ log10_background: [-10.0, -4.0]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 1500.]
18
+ roughnesses: [1.0e-2, 60.]
19
+ slds: [1.0e-2, 5.]
20
+ r_scale: [1.0e-2, 0.2]
21
+ log10_background: [1.0e-2, 6.0]
22
+ shift_param_config:
23
+ r_scale: true
24
+ log10_background: true
25
+ model_name: standard_model
26
+ max_num_layers: 2
27
+ max_total_thickness: 1500
28
+ constrained_roughness: true
29
+ max_thickness_share: 0.5
30
+ logdist: false
31
+ scale_params_by_ranges: false
32
+ scaled_range: [-1., 1.]
33
+ device: 'cuda'
34
+
35
+ q_generator:
36
+ cls: VariableQ
37
+ kwargs:
38
+ q_min_range: [0.001, 0.02]
39
+ q_max_range: [0.05, 0.4]
40
+ n_q_range: [128, 128]
41
+ device: 'cuda'
42
+
43
+ intensity_noise:
44
+ cls: GaussianExpIntensityNoise
45
+ kwargs:
46
+ relative_errors: [0.01, 0.3]
47
+ add_to_context: true
48
+
49
+ smearing:
50
+ cls: Smearing
51
+ kwargs:
52
+ sigma_range: [0.01, 0.12]
53
+ gauss_num: 17
54
+ share_smeared: 1.0
55
+
56
+ curves_scaler:
57
+ cls: LogAffineCurvesScaler
58
+ kwargs:
59
+ weight: 0.2
60
+ bias: 1.0
61
+ eps: 1.0e-10
62
+
63
+ model:
64
+ network:
65
+ cls: NetworkWithPriors
66
+ pretrained_name: null
67
+ device: 'cuda'
68
+ kwargs:
69
+ embedding_net_type: 'conv'
70
+ embedding_net_kwargs:
71
+ in_channels: 2
72
+ hidden_channels: [32, 64, 128, 256, 512]
73
+ kernel_size: 3
74
+ dim_embedding: 512
75
+ dim_avpool: 4
76
+ use_batch_norm: true
77
+ use_se: false
78
+ activation: 'gelu'
79
+ pretrained_embedding_net: null
80
+ dim_out: 10
81
+ dim_conditioning_params: 1
82
+ layer_width: 1024
83
+ num_blocks: 8
84
+ repeats_per_block: 2
85
+ residual: true
86
+ use_batch_norm: true
87
+ use_layer_norm: false
88
+ mlp_activation: 'gelu'
89
+ dropout_rate: 0.0
90
+ tanh_output: false
91
+ conditioning: 'film'
92
+ concat_condition_first_layer: false
93
+
94
+ training:
95
+ trainer_cls: PointEstimatorTrainer
96
+ num_iterations: 300000
97
+ batch_size: 4096
98
+ lr: 1.0e-3
99
+ grad_accumulation_steps: 1
100
+ clip_grad_norm_max: null
101
+ update_tqdm_freq: 1
102
+ optimizer: AdamW
103
+ trainer_kwargs:
104
+ train_with_q_input: true
105
+ condition_on_q_resolutions: true
106
+ rescale_loss_interval_width: true
107
+ use_l1_loss: true
108
+ optim_kwargs:
109
+ betas: [0.9, 0.999]
110
+ weight_decay: 0.0005
111
+ callbacks:
112
+ save_best_model:
113
+ enable: true
114
+ freq: 500
115
+ lr_scheduler:
116
+ cls: CosineAnnealingWithWarmup
117
+ kwargs:
118
+ min_lr: 1.0e-6
119
+ warmup_iters: 500
120
+ total_iters: 300000
configs/e_mc_point_neutron_conv_standard_L2_InputQDq_n256_size1024.yaml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: e_mc_point_neutron_conv_standard_L2_InputQDq_n256_size1024
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 1500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ r_scale: [0.9, 1.1]
15
+ log10_background: [-10.0, -4.0]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 1500.]
18
+ roughnesses: [1.0e-2, 60.]
19
+ slds: [1.0e-2, 5.]
20
+ r_scale: [1.0e-2, 0.2]
21
+ log10_background: [1.0e-2, 6.0]
22
+ shift_param_config:
23
+ r_scale: true
24
+ log10_background: true
25
+ model_name: standard_model
26
+ max_num_layers: 2
27
+ max_total_thickness: 1500
28
+ constrained_roughness: true
29
+ max_thickness_share: 0.5
30
+ logdist: false
31
+ scale_params_by_ranges: false
32
+ scaled_range: [-1., 1.]
33
+ device: 'cuda'
34
+
35
+ q_generator:
36
+ cls: VariableQ
37
+ kwargs:
38
+ q_min_range: [0.001, 0.02]
39
+ q_max_range: [0.05, 0.4]
40
+ n_q_range: [256, 256]
41
+ device: 'cuda'
42
+
43
+ intensity_noise:
44
+ cls: GaussianExpIntensityNoise
45
+ kwargs:
46
+ relative_errors: [0.01, 0.3]
47
+ add_to_context: true
48
+
49
+ smearing:
50
+ cls: Smearing
51
+ kwargs:
52
+ sigma_range: [0.01, 0.12]
53
+ gauss_num: 17
54
+ share_smeared: 1.0
55
+
56
+ curves_scaler:
57
+ cls: LogAffineCurvesScaler
58
+ kwargs:
59
+ weight: 0.2
60
+ bias: 1.0
61
+ eps: 1.0e-10
62
+
63
+ model:
64
+ network:
65
+ cls: NetworkWithPriors
66
+ pretrained_name: null
67
+ device: 'cuda'
68
+ kwargs:
69
+ embedding_net_type: 'conv'
70
+ embedding_net_kwargs:
71
+ in_channels: 2
72
+ hidden_channels: [32, 64, 128, 256, 512]
73
+ kernel_size: 3
74
+ dim_embedding: 512
75
+ dim_avpool: 8
76
+ use_batch_norm: true
77
+ use_se: false
78
+ activation: 'gelu'
79
+ pretrained_embedding_net: null
80
+ dim_out: 10
81
+ dim_conditioning_params: 1
82
+ layer_width: 1024
83
+ num_blocks: 8
84
+ repeats_per_block: 2
85
+ residual: true
86
+ use_batch_norm: true
87
+ use_layer_norm: false
88
+ mlp_activation: 'gelu'
89
+ dropout_rate: 0.0
90
+ tanh_output: false
91
+ conditioning: 'film'
92
+ concat_condition_first_layer: false
93
+
94
+ training:
95
+ trainer_cls: PointEstimatorTrainer
96
+ num_iterations: 300000
97
+ batch_size: 4096
98
+ lr: 1.0e-3
99
+ grad_accumulation_steps: 1
100
+ clip_grad_norm_max: null
101
+ update_tqdm_freq: 1
102
+ optimizer: AdamW
103
+ trainer_kwargs:
104
+ train_with_q_input: true
105
+ condition_on_q_resolutions: true
106
+ rescale_loss_interval_width: true
107
+ use_l1_loss: true
108
+ optim_kwargs:
109
+ betas: [0.9, 0.999]
110
+ weight_decay: 0.0005
111
+ callbacks:
112
+ save_best_model:
113
+ enable: true
114
+ freq: 500
115
+ lr_scheduler:
116
+ cls: CosineAnnealingWithWarmup
117
+ kwargs:
118
+ min_lr: 1.0e-6
119
+ warmup_iters: 500
120
+ total_iters: 300000
configs/e_mc_point_neutron_conv_standard_L3_InputQDq_n128_size1024.yaml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: e_mc_point_neutron_conv_standard_L3_InputQDq_n128_size1024
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 1500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ r_scale: [0.9, 1.1]
15
+ log10_background: [-10.0, -4.0]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 1500.]
18
+ roughnesses: [1.0e-2, 60.]
19
+ slds: [1.0e-2, 5.]
20
+ r_scale: [1.0e-2, 0.2]
21
+ log10_background: [1.0e-2, 6.0]
22
+ shift_param_config:
23
+ r_scale: true
24
+ log10_background: true
25
+ model_name: standard_model
26
+ max_num_layers: 3
27
+ max_total_thickness: 1500
28
+ constrained_roughness: true
29
+ max_thickness_share: 0.5
30
+ logdist: false
31
+ scale_params_by_ranges: false
32
+ scaled_range: [-1., 1.]
33
+ device: 'cuda'
34
+
35
+ q_generator:
36
+ cls: VariableQ
37
+ kwargs:
38
+ q_min_range: [0.001, 0.02]
39
+ q_max_range: [0.05, 0.4]
40
+ n_q_range: [128, 128]
41
+ device: 'cuda'
42
+
43
+ intensity_noise:
44
+ cls: GaussianExpIntensityNoise
45
+ kwargs:
46
+ relative_errors: [0.01, 0.3]
47
+ add_to_context: true
48
+
49
+ smearing:
50
+ cls: Smearing
51
+ kwargs:
52
+ sigma_range: [0.01, 0.12]
53
+ gauss_num: 17
54
+ share_smeared: 1.0
55
+
56
+ curves_scaler:
57
+ cls: LogAffineCurvesScaler
58
+ kwargs:
59
+ weight: 0.2
60
+ bias: 1.0
61
+ eps: 1.0e-10
62
+
63
+ model:
64
+ network:
65
+ cls: NetworkWithPriors
66
+ pretrained_name: null
67
+ device: 'cuda'
68
+ kwargs:
69
+ embedding_net_type: 'conv'
70
+ embedding_net_kwargs:
71
+ in_channels: 2
72
+ hidden_channels: [32, 64, 128, 256, 512]
73
+ kernel_size: 3
74
+ dim_embedding: 512
75
+ dim_avpool: 4
76
+ use_batch_norm: true
77
+ use_se: false
78
+ activation: 'gelu'
79
+ pretrained_embedding_net: null
80
+ dim_out: 13
81
+ dim_conditioning_params: 1
82
+ layer_width: 1024
83
+ num_blocks: 8
84
+ repeats_per_block: 2
85
+ residual: true
86
+ use_batch_norm: true
87
+ use_layer_norm: false
88
+ mlp_activation: 'gelu'
89
+ dropout_rate: 0.0
90
+ tanh_output: false
91
+ conditioning: 'film'
92
+ concat_condition_first_layer: false
93
+
94
+ training:
95
+ trainer_cls: PointEstimatorTrainer
96
+ num_iterations: 300000
97
+ batch_size: 4096
98
+ lr: 1.0e-3
99
+ grad_accumulation_steps: 1
100
+ clip_grad_norm_max: null
101
+ update_tqdm_freq: 1
102
+ optimizer: AdamW
103
+ trainer_kwargs:
104
+ train_with_q_input: true
105
+ condition_on_q_resolutions: true
106
+ rescale_loss_interval_width: true
107
+ use_l1_loss: true
108
+ optim_kwargs:
109
+ betas: [0.9, 0.999]
110
+ weight_decay: 0.0005
111
+ callbacks:
112
+ save_best_model:
113
+ enable: true
114
+ freq: 500
115
+ lr_scheduler:
116
+ cls: CosineAnnealingWithWarmup
117
+ kwargs:
118
+ min_lr: 1.0e-6
119
+ warmup_iters: 500
120
+ total_iters: 300000
configs/e_mc_point_neutron_conv_standard_L3_InputQDq_n256_size1024.yaml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: e_mc_point_neutron_conv_standard_L3_InputQDq_n256_size1024
3
+ root_dir: null
4
+
5
+ dset:
6
+ cls: ReflectivityDataLoader
7
+ prior_sampler:
8
+ cls: SubpriorParametricSampler
9
+ kwargs:
10
+ param_ranges:
11
+ thicknesses: [1., 1500.]
12
+ roughnesses: [0., 60.]
13
+ slds: [-8., 16.]
14
+ r_scale: [0.9, 1.1]
15
+ log10_background: [-10.0, -4.0]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 1500.]
18
+ roughnesses: [1.0e-2, 60.]
19
+ slds: [1.0e-2, 5.]
20
+ r_scale: [1.0e-2, 0.2]
21
+ log10_background: [1.0e-2, 6.0]
22
+ shift_param_config:
23
+ r_scale: true
24
+ log10_background: true
25
+ model_name: standard_model
26
+ max_num_layers: 3
27
+ max_total_thickness: 1500
28
+ constrained_roughness: true
29
+ max_thickness_share: 0.5
30
+ logdist: false
31
+ scale_params_by_ranges: false
32
+ scaled_range: [-1., 1.]
33
+ device: 'cuda'
34
+
35
+ q_generator:
36
+ cls: VariableQ
37
+ kwargs:
38
+ q_min_range: [0.001, 0.02]
39
+ q_max_range: [0.05, 0.4]
40
+ n_q_range: [256, 256]
41
+ device: 'cuda'
42
+
43
+ intensity_noise:
44
+ cls: GaussianExpIntensityNoise
45
+ kwargs:
46
+ relative_errors: [0.01, 0.3]
47
+ add_to_context: true
48
+
49
+ smearing:
50
+ cls: Smearing
51
+ kwargs:
52
+ sigma_range: [0.01, 0.12]
53
+ gauss_num: 17
54
+ share_smeared: 1.0
55
+
56
+ curves_scaler:
57
+ cls: LogAffineCurvesScaler
58
+ kwargs:
59
+ weight: 0.2
60
+ bias: 1.0
61
+ eps: 1.0e-10
62
+
63
+ model:
64
+ network:
65
+ cls: NetworkWithPriors
66
+ pretrained_name: null
67
+ device: 'cuda'
68
+ kwargs:
69
+ embedding_net_type: 'conv'
70
+ embedding_net_kwargs:
71
+ in_channels: 2
72
+ hidden_channels: [32, 64, 128, 256, 512]
73
+ kernel_size: 3
74
+ dim_embedding: 512
75
+ dim_avpool: 8
76
+ use_batch_norm: true
77
+ use_se: false
78
+ activation: 'gelu'
79
+ pretrained_embedding_net: null
80
+ dim_out: 13
81
+ dim_conditioning_params: 1
82
+ layer_width: 1024
83
+ num_blocks: 8
84
+ repeats_per_block: 2
85
+ residual: true
86
+ use_batch_norm: true
87
+ use_layer_norm: false
88
+ mlp_activation: 'gelu'
89
+ dropout_rate: 0.0
90
+ tanh_output: false
91
+ conditioning: 'film'
92
+ concat_condition_first_layer: false
93
+
94
+ training:
95
+ trainer_cls: PointEstimatorTrainer
96
+ num_iterations: 300000
97
+ batch_size: 2048
98
+ lr: 1.0e-3
99
+ grad_accumulation_steps: 1
100
+ clip_grad_norm_max: null
101
+ update_tqdm_freq: 1
102
+ optimizer: AdamW
103
+ trainer_kwargs:
104
+ train_with_q_input: true
105
+ condition_on_q_resolutions: true
106
+ rescale_loss_interval_width: true
107
+ use_l1_loss: true
108
+ optim_kwargs:
109
+ betas: [0.9, 0.999]
110
+ weight_decay: 0.0005
111
+ callbacks:
112
+ save_best_model:
113
+ enable: true
114
+ freq: 500
115
+ lr_scheduler:
116
+ cls: CosineAnnealingWithWarmup
117
+ kwargs:
118
+ min_lr: 1.0e-6
119
+ warmup_iters: 500
120
+ total_iters: 300000