deepmodeling / deepmd-kit

A deep learning package for many-body potential energy representation and molecular dynamics
https://docs.deepmodeling.com/projects/deepmd/
GNU Lesser General Public License v3.0
1.41k stars 487 forks source link

An error occurred while using the init-model tool to add a new dataset for model training #3795

Open 676954172 opened 1 month ago

676954172 commented 1 month ago

Summary

When I use the init-model tool to add a new dataset for model training, I encountered the following error: "There was a problem executing the operation 'save/Assign 3'. The root cause of the error is an attempt to assign a tensor of shape [4, 928] to a tensor of shape [4, 464], but the shapes of these two tensors do not match.

In TensorFlow, when you try to use tf.assign or when saving and restoring a model, the tensor being assigned (lhs, left-hand side) and the tensor being assigned from (rhs, right-hand side) must have the same shape."

In my new input file, apart from the dataset, I haven't modified any other parameters. Why am I unable to train the model?

DeePMD-kit Version

DeePMD-kit v2.2.7

Backend and its version

tensorflow v2.9.0

Python Version, CUDA Version, GCC Version, LAMMPS Version, etc

cuda

Details

When I use the init-model tool to add a new dataset for model training, I encountered the following error: "There was a problem executing the operation 'save/Assign 3'. The root cause of the error is an attempt to assign a tensor of shape [4, 928] to a tensor of shape [4, 464], but the shapes of these two tensors do not match.

In TensorFlow, when you try to use tf.assign or when saving and restoring a model, the tensor being assigned (lhs, left-hand side) and the tensor being assigned from (rhs, right-hand side) must have the same shape."

In my new input file, apart from the dataset, I haven't modified any other parameters. Why am I unable to train the model?

njzjz commented 1 month ago

Did you meet the same situation as #2735?