Tensorflow Shape Error #1399
-
I'm currently running into a tensor shape error (full error attached): ValueError: Cannot feed value of shape (3,) for Tensor 'd_sea_t_natoms:0', which has shape '(4,)' My basic workflow is using data from the SLUSCHI database ( https://materialsdata.nist.gov/handle/11256/693 ) and using your dpdata.LabeledSystem conversion: dsys = dpdata.LabeledSystem('/global/homes/y/yzamora/sluschi/OUTCAR') From here, I use your raw_to_set.sh to split the .raw files into 4 different training sets (train and validation). Then I changed the example water json file (attached). After that, I use dp train with this json file and get the ValueError from above and attached. I've tried tracing back where this error is coming from, but could not find where the shape is coming from. Any suggestions on how to fix this error? I've attached an example of one of the datasets from the splits, full error log, and input json file. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi Yuliana, I added a python script which uses dpdata to split the OUTCAR data into 4 datasets. It is poscartodata.py in the Yuliana/vasp directory in the tarball. The OUTCAR file was downloaded from the SLUSCHI database. It contains 80 frames, so I am splitting it into 4 sets, with 20 frames in each frame. You can change the values of Nsets and Neach to make it appropriate for other data. I also copied it into Yuliana/train and modified the input script a little bit to specify the data directory. You can run the training directly by You can find the necessary files in the attached file. I guess it should work for the training purpose. You can replace the training data with those you need. Don't hesitate to let me know if you have any other questions. Best, |
Beta Was this translation helpful? Give feedback.
-
@Yi-FanLi @njzjz I have a question about the shape error happening when I want to train the DeepMD. I use dpdata to convert the OUTCAR data to the .npy files. After that I just simply split them to four datasets and when I try to train the model, I get the error |
Beta Was this translation helpful? Give feedback.
-
The above answer is incorrect. The reason of this error is that |
Beta Was this translation helpful? Give feedback.
The above answer is incorrect. The reason of this error is that
type_map
has one type butsel
has two elements.