I’m pretty much a beginner to all things ML/DL, and I’m particularly interested in its applications to NLP and content moderation. As such, I’m dipping my toes into the Kaggle waters with the new Jigsaw competition underway right now.
I’m using basically the same code from lesson 3 - imdb, but I’m having trouble figuring out if there’s a way to fine-tune the AWD_LSTM model and train a text classifier outside of kaggle, and then upload those models to a Kaggle kernel to do inference. The competition’s rules say that this is allowed, but for the life of me I cannot figure out how to make those fine-tuned models usable.
I was attempting to use a combination of
learn.export() to get the .pth and .pkl files, and then use this code to load it in:
learn = text_classifier_learner(data_clas, AWD_LSTM, config = awd_lstm_clas_config, pretrained=False)
fnames = ['../input/first_pass/first_pass.pth','../input/first_pass/first_pass.pkl'] learn.load_pretrained(*fnames, strict=False)
But the kernel isn’t recognizing those files.
Anyone have any ideas?