-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: document PyTorch backend (#3193)
Fix #3121. There are TODOs: (1) PyTorch-backend specific features and arguments; (2) Python interface installation. Currently, the TensorFlow backend is always installed, and I am considering rewriting the logic; (3) Unsupported features - write docs when implemented. --------- Signed-off-by: Jinzhe Zeng <[email protected]>
- Loading branch information
Showing
18 changed files
with
189 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Backend | ||
|
||
## Supported backends | ||
|
||
DeePMD-kit supports multiple backends: TensorFlow and PyTorch. | ||
To use DeePMD-kit, you must install at least one backend. | ||
Each backend does not support all features. | ||
In the documentation, TensorFlow {{ tensorflow_icon }} and PyTorch {{ pytorch_icon }} icons are used to mark whether a backend supports a feature. | ||
|
||
### TensorFlow {{ tensorflow_icon }} | ||
|
||
TensorFlow 2.2 or above is required. | ||
DeePMD-kit does not use the TensorFlow v2 API but uses the TensorFlow v1 API (`tf.compat.v1`) in the graph mode. | ||
|
||
### PyTorch {{ pytorch_icon }} | ||
|
||
PyTorch 2.0 or above is required. | ||
|
||
## Switch the backend | ||
|
||
### Training | ||
|
||
When training and freezing a model, you can use `dp --tf` or `dp --pt` in the command line to switch the backend. | ||
|
||
### Inference | ||
|
||
When doing inference, DeePMD-kit detects the backend from the model filename. | ||
For example, when the model filename ends with `.pb` (the ProtoBuf file), DeePMD-kit will consider it using the TensorFlow backend. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Descriptor DPA-2 {{ pytorch_icon }} | ||
|
||
:::{note} | ||
**Supported backends**: PyTorch {{ pytorch_icon }} | ||
::: |
Oops, something went wrong.