HNO
Model and experiment
This package reproduces the Darcy flow operator learning at 85 x 85 resolution experiment from the paper. The hyperbolic neural operator uses a width-96, depth-4, four-head model. Darcy coefficients are downsampled from 421 x 421 to 85 x 85 before prediction.
The package includes model code, config/config.yaml, training, inference and visualization scripts, the recorded results/, and the selected weight/best_model.pth checkpoint.
Data
Download OneScience/HNO-Darcy with modelscope download --dataset OneScience/HNO-Darcy --local_dir ./data. Two Darcy MAT files; each has coeff and sol [1024,421,421], both MATLAB double (float64). First file provides 1,000 training cases; second supplies 200 evaluation cases.
Original dataset: https://drive.google.com/drive/folders/1UnbQh2WWc6knEHbLn-ZaXrKUZhp7pjt- Download the dataset before running inference where an external dataset is required. The release configuration uses relative paths, not SCNet personal-directory paths.
Installation and usage
hf download OneScience-Group/HNO --local-dir ./HNO
cd HNO
pip install -r requirements.txt
python scripts/inference.py
python scripts/result.py
For a fresh training run, use an allocated GPU/DCU compute node with a compatible PyTorch build, keep a separate copy of the supplied checkpoint, then run python scripts/train.py from the package root. The full budget is specified in config/config.yaml. Cluster-specific Slurm scripts, if present, need adaptation outside the original cluster.
Training and reported result
The run completed 500 epochs with AdamW and OneCycle scheduling. The best checkpoint came from epoch 488, selected on the same 200 samples later used for evaluation; these are not an additional independent test set.
Mean evaluation relative L2 was 0.00450221 versus 0.0045 in paper Table 2, about 0.049% higher. This is one run, whereas the paper reports three-run means. See results/ for the recorded metrics and visualizations. The supplied checkpoint comes from a completed run; another run may differ.
Source and license
- Paper: https://guobapei.github.io/Hyperbolic-Neural-Operator/assets/paper.pdf.
- Dataset source: https://drive.google.com/drive/folders/1UnbQh2WWc6knEHbLn-ZaXrKUZhp7pjt-.
- This model package uses the license indicated in the card metadata. Dataset redistribution terms, where not separately stated, must not be inferred from the code license.
中文说明
HNO
模型与实验
此软件包复现论文中的 85 x 85 分辨率达西流(Darcy flow)算子学习实验。双曲神经算子(hyperbolic neural operator)使用宽度为 96、深度为 4 的四头模型。预测前,达西系数从 421 x 421 降采样到 85 x 85。
此软件包包含模型代码、config/config.yaml、训练、推理(inference)和可视化脚本、已记录的 results/,以及选定的模型权重(检查点)(checkpoint)weight/best_model.pth。
数据
使用 modelscope download --dataset OneScience/HNO-Darcy --local_dir ./data 下载 OneScience/HNO-Darcy。包含两个达西 MAT 文件,每个文件的 coeff 和 sol 均为 [1024,421,421],且均为 MATLAB double(float64)。第一个文件提供 1,000 个训练样本,第二个文件提供 200 个评估样本。
原始数据集 https://drive.google.com/drive/folders/1UnbQh2WWc6knEHbLn-ZaXrKUZhp7pjt- 若推理需要外部数据集,请在运行前下载该数据集。发布配置使用相对路径,无需 SCNet 个人目录路径。
安装和使用
hf download OneScience-Group/HNO --local-dir ./HNO
cd HNO
pip install -r requirements.txt
python scripts/inference.py
python scripts/result.py
如需重新训练,请使用已分配且具有兼容 PyTorch 构建版本的 GPU/DCU 计算节点,另存一份随附的模型权重(检查点),然后从软件包根目录运行 python scripts/train.py。完整训练预算在 config/config.yaml 中指定。如果存在集群专用 Slurm 脚本,在原集群以外使用时需要适配。
训练和报告结果
训练使用 AdamW 和 OneCycle 调度,完成 500 轮训练。最佳模型权重(检查点)来自第 488 轮,根据之后用于评估的同一批 200 个样本选定。这些样本并非额外的独立测试集。
评估平均相对 L2 为 0.00450221,论文表 2 报告的数值为 0.0045,本次结果高约 0.049%。这是单次运行的结果,论文报告三次运行的平均值。有关已记录的指标和可视化结果,请参阅 results/。随附的模型权重(检查点)来自一次已完成的运行,再次运行的结果可能不同。
来源和许可证
- 论文 https://guobapei.github.io/Hyperbolic-Neural-Operator/assets/paper.pdf.
- 数据集来源 https://drive.google.com/drive/folders/1UnbQh2WWc6knEHbLn-ZaXrKUZhp7pjt-.
- 此模型包采用模型卡元数据中指定的许可证。若数据集再分发条款未单独说明,不得依据代码许可证推定。