Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Oct 28, 2024
1 parent 401cfa4 commit 5958e8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/development/create-a-model-pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ class SomeAtomicModel(BaseAtomicModel, torch.nn.Module):
When creating a new component, the floating-point precision should obey the [Floating-point precision of the model](../model/precision.md) section.
In implementation, the component should

- store parameters in the component precision, except those for input and output normalization;
- store normalization parameters in {py:data}`deepmd.pt.utils.env.GLOBAL_PT_FLOAT_PRECISION`;
- after input normalization, cast the input tensor to the component precision; before output normalization, cast the output tensor to the {py:data}`deepmd.pt.utils.env.GLOBAL_PT_FLOAT_PRECISION`.
- store parameters in the component precision, except those for output normalization;
- store output normalization parameters in {py:data}`deepmd.pt.utils.env.GLOBAL_PT_FLOAT_PRECISION`;
- before input normalization, cast the input tensor to the component precision; before output normalization, cast the output tensor to the {py:data}`deepmd.pt.utils.env.GLOBAL_PT_FLOAT_PRECISION`.

## Register new arguments

Expand Down

0 comments on commit 5958e8f

Please sign in to comment.