You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trained a dipole model with pytorch backend. But when I tried to convert it into TensorFlow backed (for further training of the DPLR model), I got an error shown below, which probably comes from the out_bias in the dipole model.
Traceback (most recent call last):
File "/home/jxzhu/apps/micromamba/2.0.2-2/envs/deepmd-v3.0.0/bin/dp", line 10, in <module>
sys.exit(main())
^^^^^^
File "/home/jxzhu/apps/micromamba/2.0.2-2/envs/deepmd-v3.0.0/lib/python3.12/site-packages/deepmd/main.py", line 927, in main
deepmd_main(args)
File "/home/jxzhu/apps/micromamba/2.0.2-2/envs/deepmd-v3.0.0/lib/python3.12/site-packages/deepmd/entrypoints/main.py", line 86, in main
convert_backend(**dict_args)
File "/home/jxzhu/apps/micromamba/2.0.2-2/envs/deepmd-v3.0.0/lib/python3.12/site-packages/deepmd/entrypoints/convert_backend.py", line 27, in convert_backend
out_hook(OUTPUT, data)
File "/home/jxzhu/apps/micromamba/2.0.2-2/envs/deepmd-v3.0.0/lib/python3.12/site-packages/deepmd/tf/utils/serialization.py", line 77, in deserialize_to_file
model = Model.deserialize(data["model"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jxzhu/apps/micromamba/2.0.2-2/envs/deepmd-v3.0.0/lib/python3.12/site-packages/deepmd/tf/model/model.py", line 566, in deserialize
return Model.get_class_by_type(data.get("type", "standard")).deserialize(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jxzhu/apps/micromamba/2.0.2-2/envs/deepmd-v3.0.0/lib/python3.12/site-packages/deepmd/tf/model/model.py", line 834, in deserialize
]["bias_atom_e"] + data["@variables"]["out_bias"].reshape(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: cannot reshape array of size 6 into shape (2,100)
Bug summary
I trained a dipole model with pytorch backend. But when I tried to convert it into TensorFlow backed (for further training of the DPLR model), I got an error shown below, which probably comes from the
out_bias
in the dipole model.DeePMD-kit Version
DeePMD-kit v3.0.0
Backend and its version
v2.4.1.post302-gUnknown
How did you download the software?
conda
Input Files, Running Commands, Error Log, etc.
Input files:
deepmd-kit/examples/water_tensor/dipole/dipole_input_torch.json
Running commands:
Error Log:
Steps to Reproduce
git clone https://github.com/deepmodeling/deepmd-kit.git deepmd-kit cd deepmd-kit/examples/water_tensor/dipole dp --pt train dipole_input_torch.json dp --pt freeze -o dw_model.pth dp convert-backend dw_model.pth dw_model.pb
Further Information, Files, and Links
No response
The text was updated successfully, but these errors were encountered: