valentinsingularity commited on
Commit
f8dd350
·
verified ·
1 Parent(s): b02af1d

Upload 4 files

Browse files
configs/kiel_xray_conv_standard_L1_InputQ_n64_size1024.yaml ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: kiel_xray_conv_standard_L1_InputQ_n64_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., 200.]
12
+ roughnesses: [0., 5.]
13
+ slds: [0., 20.]
14
+ q_shift: [-0.002, 0.002]
15
+ r_scale: [0.9, 1.1]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 200.]
18
+ roughnesses: [1.0e-2, 5.]
19
+ slds: [1.0e-2, 5.]
20
+ q_shift: [1.0e-5, 0.004]
21
+ r_scale: [1.0e-3, 0.2]
22
+ shift_param_config:
23
+ q_shift: true
24
+ r_scale: true
25
+ model_name: standard_model
26
+ max_num_layers: 1
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.03]
39
+ q_max_range: [0.1, 0.8]
40
+ n_q_range: [64, 64]
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
+ curves_scaler:
50
+ cls: LogAffineCurvesScaler
51
+ kwargs:
52
+ weight: 0.2
53
+ bias: 1.0
54
+ eps: 1.0e-10
55
+
56
+ model:
57
+ network:
58
+ cls: NetworkWithPriors
59
+ pretrained_name: null
60
+ device: 'cuda'
61
+ kwargs:
62
+ embedding_net_type: 'conv'
63
+ embedding_net_kwargs:
64
+ in_channels: 2
65
+ hidden_channels: [32, 64, 128, 256, 512]
66
+ kernel_size: 3
67
+ dim_embedding: 512
68
+ dim_avpool: 2
69
+ use_batch_norm: true
70
+ activation: 'gelu'
71
+ pretrained_embedding_net: null
72
+ dim_out: 7
73
+ dim_conditioning_params: 0
74
+ layer_width: 1024
75
+ num_blocks: 8
76
+ repeats_per_block: 2
77
+ residual: true
78
+ use_batch_norm: true
79
+ use_layer_norm: false
80
+ mlp_activation: 'gelu'
81
+ dropout_rate: 0.0
82
+ tanh_output: false
83
+ conditioning: 'film'
84
+ concat_condition_first_layer: false
85
+
86
+ training:
87
+ trainer_cls: PointEstimatorTrainer
88
+ num_iterations: 500000
89
+ batch_size: 4096
90
+ lr: 1.0e-3
91
+ grad_accumulation_steps: 1
92
+ clip_grad_norm_max: null
93
+ update_tqdm_freq: 1
94
+ optimizer: AdamW
95
+ trainer_kwargs:
96
+ train_with_q_input: true
97
+ condition_on_q_resolutions: false
98
+ rescale_loss_interval_width: true
99
+ use_l1_loss: true
100
+ optim_kwargs:
101
+ betas: [0.9, 0.999]
102
+ weight_decay: 0.0005
103
+ callbacks:
104
+ save_best_model:
105
+ enable: true
106
+ freq: 500
107
+ lr_scheduler:
108
+ cls: CosineAnnealingWithWarmup
109
+ kwargs:
110
+ min_lr: 1.0e-6
111
+ warmup_iters: 500
112
+ total_iters: 500000
configs/kiel_xray_conv_standard_L2_InputQ_n64_size1024.yaml ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: kiel_xray_conv_standard_L2_InputQ_n64_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., 200.]
12
+ roughnesses: [0., 5.]
13
+ slds: [0., 20.]
14
+ q_shift: [-0.002, 0.002]
15
+ r_scale: [0.9, 1.1]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 200.]
18
+ roughnesses: [1.0e-2, 5.]
19
+ slds: [1.0e-2, 5.]
20
+ q_shift: [1.0e-5, 0.004]
21
+ r_scale: [1.0e-3, 0.2]
22
+ shift_param_config:
23
+ q_shift: true
24
+ r_scale: 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.03]
39
+ q_max_range: [0.1, 0.8]
40
+ n_q_range: [64, 64]
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
+ curves_scaler:
50
+ cls: LogAffineCurvesScaler
51
+ kwargs:
52
+ weight: 0.2
53
+ bias: 1.0
54
+ eps: 1.0e-10
55
+
56
+ model:
57
+ network:
58
+ cls: NetworkWithPriors
59
+ pretrained_name: null
60
+ device: 'cuda'
61
+ kwargs:
62
+ embedding_net_type: 'conv'
63
+ embedding_net_kwargs:
64
+ in_channels: 2
65
+ hidden_channels: [32, 64, 128, 256, 512]
66
+ kernel_size: 3
67
+ dim_embedding: 512
68
+ dim_avpool: 2
69
+ use_batch_norm: true
70
+ activation: 'gelu'
71
+ pretrained_embedding_net: null
72
+ dim_out: 10
73
+ dim_conditioning_params: 0
74
+ layer_width: 1024
75
+ num_blocks: 8
76
+ repeats_per_block: 2
77
+ residual: true
78
+ use_batch_norm: true
79
+ use_layer_norm: false
80
+ mlp_activation: 'gelu'
81
+ dropout_rate: 0.0
82
+ tanh_output: false
83
+ conditioning: 'film'
84
+ concat_condition_first_layer: false
85
+
86
+ training:
87
+ trainer_cls: PointEstimatorTrainer
88
+ num_iterations: 500000
89
+ batch_size: 4096
90
+ lr: 1.0e-3
91
+ grad_accumulation_steps: 1
92
+ clip_grad_norm_max: null
93
+ update_tqdm_freq: 1
94
+ optimizer: AdamW
95
+ trainer_kwargs:
96
+ train_with_q_input: true
97
+ condition_on_q_resolutions: false
98
+ rescale_loss_interval_width: true
99
+ use_l1_loss: true
100
+ optim_kwargs:
101
+ betas: [0.9, 0.999]
102
+ weight_decay: 0.0005
103
+ callbacks:
104
+ save_best_model:
105
+ enable: true
106
+ freq: 500
107
+ lr_scheduler:
108
+ cls: CosineAnnealingWithWarmup
109
+ kwargs:
110
+ min_lr: 1.0e-6
111
+ warmup_iters: 500
112
+ total_iters: 500000
configs/kiel_xray_intconv_standard_L1_InputQ_size1024.yaml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: kiel_xray_intconv_standard_L1_InputQ_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., 200.]
12
+ roughnesses: [0., 5.]
13
+ slds: [0., 20.]
14
+ q_shift: [-0.002, 0.002]
15
+ r_scale: [0.9, 1.1]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 200.]
18
+ roughnesses: [1.0e-2, 5.]
19
+ slds: [1.0e-2, 5.]
20
+ q_shift: [1.0e-5, 0.004]
21
+ r_scale: [1.0e-3, 0.2]
22
+ shift_param_config:
23
+ q_shift: true
24
+ r_scale: true
25
+ model_name: standard_model
26
+ max_num_layers: 1
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: MaskedVariableQ
37
+ kwargs:
38
+ q_min_range: [0.001, 0.03]
39
+ q_max_range: [0.1, 0.8]
40
+ n_q_range: [32, 128]
41
+ mode: 'mixed' # 'equidistant', 'random', 'mixed'
42
+ shuffle_mask: False
43
+ total_thickness_constraint: True
44
+ min_points_per_fringe: 4
45
+ device: 'cuda'
46
+
47
+ intensity_noise:
48
+ cls: GaussianExpIntensityNoise
49
+ kwargs:
50
+ relative_errors: [0.01, 0.3]
51
+ add_to_context: true
52
+
53
+ curves_scaler:
54
+ cls: LogAffineCurvesScaler
55
+ kwargs:
56
+ weight: 0.2
57
+ bias: 1.0
58
+ eps: 1.0e-10
59
+
60
+ model:
61
+ network:
62
+ cls: NetworkWithPriors
63
+ pretrained_name: null
64
+ device: 'cuda'
65
+ kwargs:
66
+ embedding_net_type: 'integral_conv'
67
+ embedding_net_kwargs:
68
+ z_num: [32, 64, 128]
69
+ z_range: [0., 0.81]
70
+ dim_embedding: 256
71
+ in_dim: 1
72
+ num_blocks: 4
73
+ kernel_coef: 16
74
+ use_layer_norm: true
75
+ conv_dims: [32, 64, 128]
76
+ pretrained_embedding_net: null
77
+ dim_out: 7
78
+ dim_conditioning_params: 0
79
+ layer_width: 1024
80
+ num_blocks: 8
81
+ repeats_per_block: 2
82
+ residual: true
83
+ use_batch_norm: true
84
+ use_layer_norm: false
85
+ mlp_activation: 'gelu'
86
+ dropout_rate: 0.0
87
+ tanh_output: false
88
+ conditioning: 'film'
89
+ concat_condition_first_layer: false
90
+
91
+ training:
92
+ trainer_cls: PointEstimatorTrainer
93
+ num_iterations: 500000
94
+ batch_size: 4096
95
+ lr: 1.0e-3
96
+ grad_accumulation_steps: 1
97
+ clip_grad_norm_max: null
98
+ update_tqdm_freq: 1
99
+ optimizer: AdamW
100
+ trainer_kwargs:
101
+ train_with_q_input: false
102
+ condition_on_q_resolutions: false
103
+ rescale_loss_interval_width: true
104
+ use_l1_loss: true
105
+ optim_kwargs:
106
+ betas: [0.9, 0.999]
107
+ weight_decay: 0.0005
108
+ callbacks:
109
+ save_best_model:
110
+ enable: true
111
+ freq: 500
112
+ lr_scheduler:
113
+ cls: CosineAnnealingWithWarmup
114
+ kwargs:
115
+ min_lr: 1.0e-6
116
+ warmup_iters: 500
117
+ total_iters: 500000
configs/kiel_xray_intconv_standard_L2_InputQ_size1024.yaml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: kiel_xray_intconv_standard_L2_InputQ_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., 200.]
12
+ roughnesses: [0., 5.]
13
+ slds: [0., 20.]
14
+ q_shift: [-0.002, 0.002]
15
+ r_scale: [0.9, 1.1]
16
+ bound_width_ranges:
17
+ thicknesses: [1.0e-2, 200.]
18
+ roughnesses: [1.0e-2, 5.]
19
+ slds: [1.0e-2, 5.]
20
+ q_shift: [1.0e-5, 0.004]
21
+ r_scale: [1.0e-3, 0.2]
22
+ shift_param_config:
23
+ q_shift: true
24
+ r_scale: 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: MaskedVariableQ
37
+ kwargs:
38
+ q_min_range: [0.001, 0.03]
39
+ q_max_range: [0.1, 0.8]
40
+ n_q_range: [32, 128]
41
+ mode: 'mixed' # 'equidistant', 'random', 'mixed'
42
+ shuffle_mask: False
43
+ total_thickness_constraint: True
44
+ min_points_per_fringe: 4
45
+ device: 'cuda'
46
+
47
+ intensity_noise:
48
+ cls: GaussianExpIntensityNoise
49
+ kwargs:
50
+ relative_errors: [0.01, 0.3]
51
+ add_to_context: true
52
+
53
+ curves_scaler:
54
+ cls: LogAffineCurvesScaler
55
+ kwargs:
56
+ weight: 0.2
57
+ bias: 1.0
58
+ eps: 1.0e-10
59
+
60
+ model:
61
+ network:
62
+ cls: NetworkWithPriors
63
+ pretrained_name: null
64
+ device: 'cuda'
65
+ kwargs:
66
+ embedding_net_type: 'integral_conv'
67
+ embedding_net_kwargs:
68
+ z_num: [32, 64, 128]
69
+ z_range: [0., 0.81]
70
+ dim_embedding: 256
71
+ in_dim: 1
72
+ num_blocks: 4
73
+ kernel_coef: 16
74
+ use_layer_norm: true
75
+ conv_dims: [32, 64, 128]
76
+ pretrained_embedding_net: null
77
+ dim_out: 10
78
+ dim_conditioning_params: 0
79
+ layer_width: 1024
80
+ num_blocks: 8
81
+ repeats_per_block: 2
82
+ residual: true
83
+ use_batch_norm: true
84
+ use_layer_norm: false
85
+ mlp_activation: 'gelu'
86
+ dropout_rate: 0.0
87
+ tanh_output: false
88
+ conditioning: 'film'
89
+ concat_condition_first_layer: false
90
+
91
+ training:
92
+ trainer_cls: PointEstimatorTrainer
93
+ num_iterations: 500000
94
+ batch_size: 4096
95
+ lr: 1.0e-3
96
+ grad_accumulation_steps: 1
97
+ clip_grad_norm_max: null
98
+ update_tqdm_freq: 1
99
+ optimizer: AdamW
100
+ trainer_kwargs:
101
+ train_with_q_input: false
102
+ condition_on_q_resolutions: false
103
+ rescale_loss_interval_width: true
104
+ use_l1_loss: true
105
+ optim_kwargs:
106
+ betas: [0.9, 0.999]
107
+ weight_decay: 0.0005
108
+ callbacks:
109
+ save_best_model:
110
+ enable: true
111
+ freq: 500
112
+ lr_scheduler:
113
+ cls: CosineAnnealingWithWarmup
114
+ kwargs:
115
+ min_lr: 1.0e-6
116
+ warmup_iters: 500
117
+ total_iters: 500000