Two questions about text.py

  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):
  1. 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

:rofl: 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) - numericalized text

nums = fld.numericalize([text],device=None if torch.cuda.is_available() else -1)
1 Like

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

I’d be honored to! :slight_smile:

Sounds like you’ve answered your own questions?

@jeremy and @hiromi … here it is:

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