|
Download fuxicfd-model/inference_example/normalization/README.md from daisy1212/FuXi-CFD-model: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/daisy1212/FuXi-CFD-model/resolve/main/fuxicfd-model/inference_example/normalization/README.md
- Command line
-
hf download hf://daisy1212/FuXi-CFD-model/fuxicfd-model/inference_example/normalization/README.md
-
curl -L -o README.md https://huggingface.co/daisy1212/FuXi-CFD-model/resolve/main/fuxicfd-model/inference_example/normalization/README.md
1.37 kB
| # Normalization files | |
| This folder provides the normalization (standardization) parameters used for FuXi-CFD inference. | |
| ## Overview | |
| - Inputs are standardized before being fed to the ONNX model. | |
| - Model outputs are de-standardized back to physical scale after inference. | |
| ## Files | |
| - `scaler_input.npy` : dict of input normalization stats (mean/std) for static/dynamic input variables | |
| - `scaler_output.npy` : dict of output normalization stats (mean/std) for model outputs | |
| Both are stored as Python dicts inside `.npy` (load with `allow_pickle=True`). | |
| ## Input normalization (`scaler_input.npy`) | |
| Keys: | |
| - `low_mean`, `low_std` for low-res dynamic inputs: `["u_100m", "v_100m"]` | |
| - `high_mean`, `high_std` for high-res static inputs: `["dem", "roughness"]` | |
| Final ONNX input channel order **must** be: | |
| `[u_100m, v_100m, dem, roughness]` (C=4) | |
| ## Output de-normalization (`scaler_output.npy`) | |
| Keys: | |
| - `mean`, `std`: arrays of shape `(27, 4)` (levels=27, vars=4) | |
| Output variable order: | |
| `[u, v, w, k]` | |
| The ONNX model output tensor is expected as: | |
| `(1, 27, 4, 300, 300)` and de-normalization applies: | |
| `pred = pred * std + mean` (broadcast on `(300,300)`) | |
| ## Example loading | |
| ```python | |
| import numpy as np | |
| in_stats = np.load("normalization/scaler_input.npy", allow_pickle=True).item() | |
| out_stats = np.load("normalization/scaler_output.npy", allow_pickle=True).item() | |
| ``` | |