deepmd.dpmodel.utils.batch#
Normalize raw batches from DeepmdDataSystem into canonical format.
Attributes#
Functions#
| Normalize a raw batch from |
| Split a normalized batch into input and label dicts. |
Module Contents#
- deepmd.dpmodel.utils.batch.normalize_batch(batch: dict[str, Any]) dict[str, Any][source]#
Normalize a raw batch from
DeepmdDataSystemto canonical format.The following conversions are applied:
"type"is renamed to"atype"(int64)."natoms_vec"(1-D) is tiled to 2-D[nframes, 2+ntypes]and stored as"natoms".find_*flags are converted tonp.bool_.Metadata keys (
default_mesh,sid,fid) are dropped.