yunjey / pytorch-tutorial

PyTorch Tutorial for Deep Learning Researchers
MIT License
29.83k stars 8.09k forks source link

Teacher forcing #100

Closed karanchahal closed 5 years ago

karanchahal commented 6 years ago

I tried to train the image captioning model, turns out it overfits terribly, beacuse of constant teacher forcing. How did you manage to train it ? It's giving overfit results to every new image it sees for which there is no caption.

yunjey commented 6 years ago

@karanchahal Do you mean that the model "you implemented" is heavily overfitting ? I remember that the model's BLEU4 score is about 23 on coco validation dataset. This means that the model did not overfit so badly.

karanchahal commented 6 years ago

Okay , but it's very strange , I trained it from scratch and sampling gives terrible results . The same caption for all images . How many epochs did you train it for ?

yunjey commented 6 years ago

@karanchahal Please see here (5 epochs). The most possible reason for generating same captions is incorrect input normalization. Check input normalization between training and sampling phases.