wgpubs
(WG)
February 21, 2018, 8:31pm
1
Are the DataLoaders LanguageModelData
accepts in it’s constructor instances of LanguageModelLoader
?
class LanguageModelData():
def __init__(self, path, pad_idx, nt, trn_dl, val_dl, test_dl=None, bptt=70, backwards=False, **kwargs):
Re: LanguageModelLoader
, what the heck is nums
and what should the shape look like?
class LanguageModelLoader():
def __init__(self, nums, bs, bptt, backwards=False):
1 Like
hiromi
(Hiromi Suenaga)
March 8, 2018, 1:44am
2
wgpubs:
what the heck is nums
I was wondering the exact same thing, and I’m always a few weeks behind you.
I think it’s similar to this (in fastai.nlp) - num ericalized text
nums = fld.numericalize([text],device=None if torch.cuda.is_available() else -1)
1 Like
wgpubs
(WG)
March 8, 2018, 1:53am
3
You are exactly right. I’ll have something to post next week that’s shows a new full and working implementation of fast.text for language modeling.
Will be great to get your feedback.
2 Likes
jeremy
(Jeremy Howard)
March 8, 2018, 6:48am
5
Sounds like you’ve answered your own questions?
wgpubs
(WG)
March 8, 2018, 8:32pm
6
@jeremy and @hiromi … here it is:
So I’m probably doing a lot of things wrong, but here it is … a working example of using the fastai.text package to do language modeling.
Would love and appreciate any and all feedback! What am I doing wrong and what can be improved???
If you have questions, let me know. I’m planning to make this a blog post after getting feedback here.
Thanks - wg
As I say in the post, would really appreciate any and all feedback. Much of this is just me hacking around the code and figuring out how to use it and what is going on. There is still a lot I don’t understand and probably a few things I’m just doing wrong and making for more work on my part than is perhaps necessary.
Thanks