界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

training-workflows

training-workflows

【数据与研究】Guide DeepXDE model lifecycle, optimizers, callbacks, prediction, checkpoints, plotting, function fitting, tabular data, and multifidelity training workflows.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: training-workflows description: "Guide DeepXDE model lifecycle, optimizers, callbacks, prediction, checkpoints, plotting, function fitting, tabular data, and multifidelity training workflows." disable-model-invocation: true metadata: disco-role: operating license: LGPL 2.1

DeepXDE Training Workflows

Use this sub-skill after the user already has compatible DeepXDE data and net objects and needs to train, checkpoint, resume, predict, or diagnose a dde.Model workflow. This construction verified PyTorch CPU behavior; TensorFlow, JAX, Paddle, GPU, and Horovod behavior should be treated as optional or backend-specific unless separately verified.

Route first

Read these bundled references

Safe smoke check

Run the bundled function-approximation smoke when you need to confirm the training loop and PyTorch CPU backend before adapting a larger problem:

python scripts/smoke_function_approximation.py --iterations 3 --num-train 8 --num-test 16

The script sets DDE_BACKEND=pytorch before importing DeepXDE unless the environment already sets a backend, uses a tiny dde.data.Function + dde.nn.FNN, performs no plotting, writes only to a caller-selected output directory when requested, and prints a JSON summary.

Minimal lifecycle pattern

import deepxde as dde

model = dde.Model(data, net)
model.compile("adam", lr=1e-3, metrics=["l2 relative error"])
losshistory, train_state = model.train(iterations=1000, display_every=100)
y_pred = model.predict(x_eval)

Keep the data and net compatible with the selected backend. For PDE and TimePDE training, do not use batch_size; resample PDE or boundary points with dde.callbacks.PDEPointResampler instead. For ordinary function, tabular, multifidelity, and operator datasets, follow the data-specific batching rules in the references.

我的收藏