microsoft / TAP

TAP: Text-Aware Pre-training for Text-VQA and Text-Caption, CVPR 2021 (Oral)
MIT License
70 stars 11 forks source link

Error during finetuning base model #18

Closed soonchangAI closed 2 years ago

soonchangAI commented 2 years ago

Hi I encountered an error when I try to further finetune the base model. During validation check, there is a warning Token indices sequence length is longer than the specified maximum sequence length for this model (599 > 512). Running this sequence through the model will result in indexing errors How do I fix this ? Log:

2022-04-15T21:01:58 INFO: m4c_textvqa:, 41100/41100, train/total_loss: 0.6898 (0.6971), train/m4c_textvqa/m4c_decoding_bce_with_mask: 0.6898 (0.6971), train/m4c_textvqa/textvqa_accuracy: 0.8406 (0.8330), val/total_loss: 6.9965, val/m4c_textvqa/m4c_decoding_bce_with_mask: 6.9965, val/m4c_textvqa/textvqa_accuracy: 0.4969, max mem: 6524.0, lr: 0., time: 01m 07s 802ms, eta: 
2022-04-15T21:01:58 INFO: Stepping into final validation check
2022-04-15T21:01:58 INFO: Evaluation time. Running on full validation set...
Token indices sequence length is longer than the specified maximum sequence length for this model (599 > 512). Running this sequence through the model will result in indexing errors
intemediate model saving skipped. utiles/checkpoint, 41101
2022-04-15T21:05:21 INFO: m4c_textvqa: full val:, 41101/41100, val/total_loss: 6.5700, val/m4c_textvqa/m4c_decoding_bce_with_mask: 6.5700, val/m4c_textvqa/textvqa_accuracy: 0.4969, validation time: 04m 31s 394ms, best iteration: 41000, best val/m4c_textvqa/textvqa_accuracy: 0.499082
2022-04-15T21:05:21 INFO: Restoring checkpoint
2022-04-15T21:05:23 INFO: Starting inference on test set
  0%|                                                                                                                 | 0/180 [00:00<?, ?it/s]2022-04-15T21:05:25 WARNING: /home/cybertron/TAP/pythia/modules/losses.py:93: UserWarning: Sample list has not field 'targets', are you sure that your ImDB has labels? you may have wanted to run with --evalai_inference 1
  "Sample list has not field 'targets', are you "

2022-04-15T21:05:25 WARNING: /home/cybertron/TAP/pythia/modules/losses.py:93: UserWarning: Sample list has not field 'targets', are you sure that your ImDB has labels? you may have wanted to run with --evalai_inference 1
  "Sample list has not field 'targets', are you "
zyang-ur commented 2 years ago

Hi @soonchangAI ,

"Token indices sequence length..." is a warning related to the tokenizer. You could safely ignore that.

The validation process looks good to me. "Sample list has not field 'targets'" is also expected as there is no GT on the test set.

soonchangAI commented 2 years ago

Thanks