ComPhy-TaylorGreenVortex
Model and experiment
This package reproduces the Taylor-Green vortex, physics-constrained learning experiment from the paper. ComPhyTaylorGreenVortex uses two separate two-layer tanh networks with width 64. It maps (t, x, y) to (u, v, p) and trains with PDE, initial, and boundary constraints.
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
Training points are generated online. The analytic reference is included at data/tgv_reference.npz. No external dataset download is needed.
The analytic reference is generated by the included code. 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/ComPhy-TaylorGreenVortex --local-dir ./ComPhy-TaylorGreenVortex
cd ComPhy-TaylorGreenVortex
pip install torch numpy scipy h5py pyyaml matplotlib
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 completed run used 100,000 steps, resampling 1,000 interior points each step. The analytic solution was used for validation and checkpoint selection, not as interior supervision. The best checkpoint came from step 97,000.
Measured squared L2 error was 9.13473e-7 and maximum absolute error was 0.011698. Paper Table 2 reports 3.619e-5 and 0.006378, respectively. Grid, random seed, and some implementation details are not proven identical, so this is not a strict same-protocol accuracy comparison. 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://proceedings.iclr.cc/paper_files/paper/2026/file/10f34ee79b62627b7ebf6279d35ea480-Paper-Conference.pdf.
- Dataset source: No external dataset; reference generated analytically.
- 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.
中文说明
ComPhy-TaylorGreenVortex
模型与实验
本模型包复现了论文中的 Taylor-Green 涡物理约束学习实验。ComPhyTaylorGreenVortex 使用两个彼此独立、宽度为 64 的两层 tanh 网络,将 (t, x, y) 映射到 (u, v, p),并在 PDE 约束、初始条件和边界条件下训练。
本模型包包含模型代码、config/config.yaml、训练、推理(inference)和可视化脚本、记录的 results/,以及选定的 weight/best_model.pth 模型权重(检查点)(checkpoint)。
数据
训练点在线生成。解析参考数据位于 data/tgv_reference.npz。无需下载外部数据集。
解析参考数据由随附代码生成。需要外部数据集时,请先下载数据集,再运行推理。发布配置使用相对路径,不使用 SCNet 个人目录路径。
安装和使用
hf download OneScience-Group/ComPhy-TaylorGreenVortex --local-dir ./ComPhy-TaylorGreenVortex
cd ComPhy-TaylorGreenVortex
pip install torch numpy scipy h5py pyyaml matplotlib
python scripts/inference.py
python scripts/result.py
如需重新训练,请使用已分配并安装兼容 PyTorch 构建版本的 GPU/DCU 计算节点,另行保留一份随附模型权重(检查点),然后从模型包根目录运行 python scripts/train.py。完整预算在 config/config.yaml 中指定。如有针对特定集群的 Slurm 脚本,在原集群外使用时需要调整。
训练与报告结果
已完成的训练运行了 100,000 步,每步重新采样 1,000 个内部点。解析解用于验证和选择模型权重(检查点),未用于内部点监督。最佳模型权重(检查点)来自第 97,000 步。
测得的 L2 平方误差为 9.13473e-7,最大绝对误差为 0.011698。论文表 2 报告的对应数值分别为 3.619e-5 和 0.006378。网格、随机种子和部分实现细节尚未证实一致,因此这并非严格按同一协议进行的精度比较。记录的指标和可视化结果见 results/。随附模型权重(检查点)来自一次已完成的训练,其他运行的结果可能不同。
来源与许可证
- 论文 https://proceedings.iclr.cc/paper_files/paper/2026/file/10f34ee79b62627b7ebf6279d35ea480-Paper-Conference.pdf.
- 数据集来源为解析生成的参考数据,无外部数据集。
- 本模型包使用模型卡元数据中标注的许可证。数据集再分发条款未单独说明时,不得根据代码许可证推断。
- Downloads last month
- 124