markus-goetz commited on
Commit
6d7d8d8
Β·
verified Β·
1 Parent(s): 91f10cb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -7
README.md CHANGED
@@ -36,10 +36,10 @@ The original dataset can be found in the [OptoGPT publication πŸ“](https://arxi
36
  β”‚ β”œβ”€β”€ ...
37
  β”‚ └── ZnSe.csv
38
  β”œβ”€β”€ train/
39
- β”‚ β”œβ”€β”€ train-00.safetensors
40
- β”‚ β”œβ”€β”€ train-01.safetensors
41
  β”‚ β”œβ”€β”€ ...
42
- β”‚ └── train-09.safetensors
43
  β”œβ”€β”€ test/
44
  β”‚ └── test.safetensors
45
  └── tokens.json
@@ -47,10 +47,26 @@ The original dataset can be found in the [OptoGPT publication πŸ“](https://arxi
47
 
48
  Each `*.safetensors` file contains 1 million thin film structures (indexed by `tokens.json`) as well as their simulated absorption, reflection and transmission (RAT) spectrum.
49
 
50
- The spectrum tensors have the shape *(n_samples, 3 [RAT], 171 [bins],)* and are stored in `float16`. The thin film layers have the shape *(n_samples, 20 [max_depth],)* and are stored as `long`.
51
 
52
  The thin film layer sequence is ordered from top to bottom, i.e., the lowest index is the top of the thin film layers (touches the air), and the highest index is the bottom layer (touching the back substrate).
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  ## Details
56
 
@@ -60,9 +76,9 @@ The thin film layer sequence is ordered from top to bottom, i.e., the lowest ind
60
  - A full list of the vocabular, i.e., all possible tokens, can be found in the `tokens.json`, with the the format of `<material>_<thickness_in_nm>`
61
  - There are additional tokens for end of sequences (EOS), padding (PAD) and masking (MASK)
62
 
63
- | Train samples | Test samples |
64
- | :-------------- | -----------: |
65
- | 10,000,000 | 1,000,000 |
66
 
67
  ## Acknowledgements
68
 
 
36
  β”‚ β”œβ”€β”€ ...
37
  β”‚ └── ZnSe.csv
38
  β”œβ”€β”€ train/
39
+ β”‚ β”œβ”€β”€ train-0.safetensors
40
+ β”‚ β”œβ”€β”€ train-1.safetensors
41
  β”‚ β”œβ”€β”€ ...
42
+ β”‚ └── train-9.safetensors
43
  β”œβ”€β”€ test/
44
  β”‚ └── test.safetensors
45
  └── tokens.json
 
47
 
48
  Each `*.safetensors` file contains 1 million thin film structures (indexed by `tokens.json`) as well as their simulated absorption, reflection and transmission (RAT) spectrum.
49
 
50
+ The spectrum tensors have the shape *(n_samples, 3 [RAT], 171 [bins],)* and are stored in `float16`. The thin film layers have the shape *(n_samples, 21 [max_depth incl. EOS and PAD],)* and are stored as `long`.
51
 
52
  The thin film layer sequence is ordered from top to bottom, i.e., the lowest index is the top of the thin film layers (touches the air), and the highest index is the bottom layer (touching the back substrate).
53
 
54
+ ## Loading Data
55
+
56
+ This shows an example on how to load (a subset) of the entire data
57
+
58
+ ```python
59
+ from safetensors.torch import load_file
60
+
61
+ data = load_file("train/train-0.safetensors")
62
+
63
+ spectra = data['spectra']
64
+ thin_films = data['thin_films']
65
+ print(spectra.shape, thin_films.shape)
66
+
67
+ >>> torch.Size([1000000, 3, 171]) torch.Size([1000000, 21])
68
+ ```
69
+
70
 
71
  ## Details
72
 
 
76
  - A full list of the vocabular, i.e., all possible tokens, can be found in the `tokens.json`, with the the format of `<material>_<thickness_in_nm>`
77
  - There are additional tokens for end of sequences (EOS), padding (PAD) and masking (MASK)
78
 
79
+ | Train samples | Test samples | Test samples (cropped) |
80
+ | --------------: | -----------: | ---------------------: |
81
+ | 10,000,000 | 1,000,000 | 128,000 |
82
 
83
  ## Acknowledgements
84