Garfield-kh / TM2D

[ICCV 2023] TM2D: Bimodality Driven 3D Dance Generation via Music-Text Integration
78 stars 3 forks source link

Training train_2d_transferoemer-v5. py error #16

Closed mengW6 closed 2 months ago

mengW6 commented 2 months ago

When running train_2d_transformar_v5. py, the error shown in the figure below appears. After searching, it seems that the index label is out of range. Have you encountered this problem before? Can you help me figure out how to modify it? image

mengW6 commented 2 months ago

image When calculating cross entropy loss or classification tasks, the target label t exceeds the range of predicted categories (i.e., outside the number of categories n_classes), resulting in calculation failure. Do you know how to modify it? Thank you very much for your guidance.

mengW6 commented 2 months ago

There was an error while running train_2d_transformar_v5. py. I checked and found that there was an error in calculating cross entropy due to pred shape: torch Size ([3136, 1027]), n_classes: 1027, but there are more than 1027 numbers in the target tag gold, but I couldn't find a solution. Can you give me some guidance? image image

Garfield-kh commented 2 months ago

Hi, I meet such error when preprocessing the data, the data is save in text format, if it is not deleted at all when re-do the preprocessing, it will continue writing in the text file, which case 188 569 together as 188569. So maybe you can

  1. check where the text data file, contain such large number. see if it is caused by re-writing bug.
  2. delete all preprocessing file and re-do it.

hope this one fix~

mengW6 commented 2 months ago

Thank you very much.