jiaor17 / DiffCSP

[NeurIPS 2023] The implementation for the paper "Crystal Structure Prediction by Joint Equivariant Diffusion"
MIT License
66 stars 21 forks source link

Confusion about Property Optimization #22

Open Zhoushun2021 opened 1 day ago

Zhoushun2021 commented 1 day ago

Hello, I have a question in train a time-dependent energy prediction model. In the file energy_model.py, the loss_energy is about a property in the dataset, i.e. batch.y, for example it represents the formation energy. But why is the input to self.decoder batch.batch?

image

jiaor17 commented 21 hours ago

Hi, In Pytorch Geometric, batch.batch is a tensor that stores the batch indices for each node and helps keep track of which nodes belong to which original graph, you can see the source codes here for more details. Usually, we use this tensor for scatter-based operations in GNNs, like a final pooling to aggregate graph features from node features.

Zhoushun2021 commented 9 hours ago

Thank you, does this loss_energy represent the loss of a property, such as formation energy. And does pred_e stand for the formation energy obtained from the prediction? Also, I have encountered the following problem during the training process, what should I do to solve @jiaor17 image