loss through each iteration in skip gram

251 views
Skip to first unread message

simon Liu

unread,
Nov 2, 2016, 7:33:44 PM11/2/16
to gensim
How to get loss through each iteration in skip gram in gensim? Is there an attribute in the model that can get the loss? Thanks

Gordon Mohr

unread,
Nov 8, 2016, 2:12:28 PM11/8/16
to gensim
This isn't currently accumulated or reported/logged anywhere. But the request comes up occasionally. So, as long as it could be done without adding too much overhead, it'd be a welcome addition.

- Gordon

Lev Konstantinovskiy

unread,
Nov 9, 2016, 5:24:58 AM11/9/16
to gensim

Devashish Deshpande

unread,
Nov 26, 2016, 3:21:36 PM11/26/16
to gensim
Hi Simon,

I've started work on this issue: https://github.com/RaRe-Technologies/gensim/issues/999. However I'd like to understand your need better as it would be very expensive to calculate and info-log the loss for each pair during training. This would also only affect the pure python path as Gordon has pointed out in the issue. Quoting Gordon again from the issue, would you want:
1.   total/average loss on one text-example (or over some range of examples) – as a sort of indicator of 'fit to model'
2.   or running/cumulative loss over a range of examples, perhaps up to a full training epoch, as a sort of readout on how well training is progressing.

Thanks,
Devashish
Reply all
Reply to author
Forward
0 new messages