HW-SC commited on
Commit
8bda2a7
·
verified ·
1 Parent(s): d4597d1

Upload PANPE XRR reflectometry model weights and configuration

Browse files
LICENSE.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2024 Vladimir Starostin
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
README.md CHANGED
@@ -1,3 +1,29 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PANPE Reflectometry Model Weights
2
+
3
+ Pre-trained model weights for **Fast and Reliable Probabilistic Reflectometry Inversion with Prior-Amortized Neural Posterior Estimation**.
4
+
5
+ **Note**: This repository provides model weights for community access. The original work and model training were performed by Vladimir Starostin and colleagues. This is not an official repository by the original authors, but rather a community contribution to make the pre-trained weights easily accessible via HuggingFace.
6
+
7
+ ## Model Description
8
+
9
+ This repository contains the trained neural network weights for the PANPE (Prior-Amortized Neural Posterior Estimation) model designed for Bayesian reflectometry analysis. The model enables fast and reliable probabilistic inversion of X-ray reflectometry data.
10
+
11
+
12
+ ### Using the Model
13
+
14
+ To use these weights, you need the full PANPE package. Get the complete code and installation instructions from:
15
+
16
+ - **GitHub Repository**: https://github.com/mlcolab/panpe
17
+ - **Zenodo Dataset**: https://zenodo.org/records/14267737
18
+
19
+
20
+ ## Files in this Repository
21
+
22
+ - `saved_models/model_panpe-2layers-xrr.pt`: Pre-trained PyTorch model weights
23
+ - `configs/panpe-2layers-xrr.yaml`: Model configuration file
24
+ - `LICENSE.txt`: MIT License
25
+
26
+
27
+ ## License
28
+
29
+ This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details.
configs/panpe-2layers-xrr.yaml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ name: panpe-2layers-xrr
3
+ root_dir: null
4
+ device: cuda
5
+ simulator:
6
+ num_layers: 2
7
+ hyperprior:
8
+ cls: HyperpriorForUniformPriorsWithConstrainedRoughness
9
+ kwargs:
10
+ thickness_range: [0., 500.]
11
+ roughness_range: [0., 50.]
12
+ sld_range: [0., 60.]
13
+ q_offset_range: [-0.002, 0.002]
14
+ r_scale_range: [0.95, 1.05]
15
+ coef: 0.5
16
+ q_simulator:
17
+ cls: RandomQSimulator
18
+ kwargs:
19
+ q_range: [0.001, 0.15]
20
+ max_q_num: 64
21
+ drop_range: [0.0, 0.7]
22
+ measurement_noise:
23
+ cls: NormalNoiseSimulator
24
+ kwargs:
25
+ rel_sigma_range: [0.1, 0.3]
26
+ physical_model:
27
+ cls: BasicLayerStructureModel
28
+ kwargs:
29
+ enable_q_misalignment: true
30
+ enable_r_misalignment: true
31
+ enable_background: false
32
+ nn:
33
+ embedding_net:
34
+ cls: EmbeddingNN
35
+ pretrained_name: null
36
+ kwargs:
37
+ z_num: [16, 32, 64 ]
38
+ z_range: [ 0., 0.16 ]
39
+ latent_dim: 256
40
+ num_blocks: 4
41
+ kernel_coef: 16
42
+ use_layer_norm: true
43
+ flow:
44
+ num_layers: 40
45
+ use_batch_norm_transform: true
46
+ transform_net:
47
+ context_features: 256
48
+ hidden_features: 256
49
+ num_blocks: 3
50
+ use_layer_norm: true
51
+ training:
52
+ num_iterations: 300000
53
+ batch_size: 8192
54
+ lr: 1.0e-5
55
+ update_tqdm_freq: 1
56
+ grad_accumulation_steps: 1
57
+ optimizer: AdamW
58
+
59
+ callbacks:
60
+ save_best_model:
61
+ enable: true
62
+ freq: 500
63
+ lr_scheduler:
64
+ cls: StepLR
65
+ kwargs:
66
+ step_size: 50000
67
+ gamma: 0.5
68
+ last_epoch: 200000
69
+ lr_warmup:
70
+ cls: WarmupLR
71
+ kwargs:
72
+ start_lr: 1.0e-5
73
+ end_lr: 2.0e-4
74
+ warmup_steps: 2000
75
+ logscale: true
saved_models/model_panpe-2layers-xrr.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96c0c241556d9df9626d4e35ded607e4a5756c7d99fdc75b2f2919ad5545ab6d
3
+ size 129186122