google-deepmind / graphcast

Apache License 2.0
4.36k stars 537 forks source link

Issues with GraphCast Training – Request for Assistance #78

Open zlminmin opened 1 month ago

zlminmin commented 1 month ago

Dear Professor,

I hope this message finds you well.

I am a postgraduate student and a beginner in deep learning. I have read your article on GraphCast and would like to retrain a GraphCast model based on your source code. I have provided a portion of my code below:

  1. Setting model_config and task_config, along with train_steps and eval_steps.

    e94dc3a562e4e6e5518b7a55b1b4911
  2. Here is the main training loop, modified based on the source code provided in the article (I am unsure if it's correct), training for 10 epochs.

    4a51d259e2fa0cbb24996ee8eac8e58 d0ca1fc082aea4b9652a5c835a23755
  3. The loss and gradients for the 10 training iterations are as follows:

    1e8482ea9f1d1bc8a31bb8aadccf038

I have encountered several issues during training and would like to seek your guidance:

  1. How are the steps of the dataset divided during training? If training is done in single steps, the first round inputs three time steps, with data from two time steps used for training and one time step for evaluation. For the second round of training, is the training data re-input each time? In other words, should the entire dataset be divided and read in before training, or should it be read in batches?
  2. Regarding the training process implemented in my code, I feel that the training process is not truly effective. Despite using random initialization, the loss and gradients computed in the first round are already very low. Additionally, after 10 rounds of training, the values of loss and gradients have not significantly changed. Could you please provide some guidance on this point?
  3. Concerning the use of the autoregressive.py file during training, I understand that it is used for single-step prediction, but I am unclear on how to use it in training. If you could provide a simple example for training, it would be greatly appreciated.

I look forward to your response. Thank you.

Best regards!