diff --git a/TrOCR/Fine_tune_TrOCR_on_IAM_Handwriting_Database_using_native_PyTorch.ipynb b/TrOCR/Fine_tune_TrOCR_on_IAM_Handwriting_Database_using_native_PyTorch.ipynb index 58779c88..24f13343 100644 --- a/TrOCR/Fine_tune_TrOCR_on_IAM_Handwriting_Database_using_native_PyTorch.ipynb +++ b/TrOCR/Fine_tune_TrOCR_on_IAM_Handwriting_Database_using_native_PyTorch.ipynb @@ -1736,7 +1736,7 @@ }, "source": [ "# set special tokens used for creating the decoder_input_ids from the labels\n", - "model.config.decoder_start_token_id = processor.tokenizer.cls_token_id\n", + "model.config.decoder_start_token_id = processor.tokenizer.eos_token_id\n", "model.config.pad_token_id = processor.tokenizer.pad_token_id\n", "# make sure vocab size is set correctly\n", "model.config.vocab_size = model.config.decoder.vocab_size\n", @@ -1938,4 +1938,4 @@ ] } ] -} \ No newline at end of file +}