Nightmares

OK, the elmo code was so horrifying that I really wasn’t going to be able to sleep tonight unless I fixed it. I added another step to the data preparation that saves the final scikit model to a file, and then I updated the ElmoClassifier to load the model instead of training it every time.

Also to my horror I realized I was generating the ELMo vectors for the input sentence thirteen times, instead of just doing it once. That is mildly embarrassing. But the important thing is, I fixed it! ELMo now clocks in at a zippy 5 seconds or so.

Leave a Reply

Your email address will not be published. Required fields are marked *