Closed mengW6 closed 2 months ago
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.
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?
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
hope this one fix~
Thank you very much.
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?