fastai’s tabular dataloaders will always return two tensors (continuous and categorical). So in your case I would adjust your forward function like so:
def forward(self, cat, cont):
x = self.model(cont)
return x
My learner does not seem to have all the special fastai methods. When I try, for example, learner.lr_find() I get
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-68-f01cf5c6afa7> in <module>
----> 1 learner.lr_find()
AttributeError: 'TabularLearner' object has no attribute 'lr_find'
The learner is just an instance of fastai TabularLearner. Shouldn’t it have all these methods? It does not have fit_one_cycle(...) either. I do have some other methods like fit and unfreeze.
I did spend an hour or so poking through the fastai GitHub code with no success.
Ah, ok. Fascinating. I can’t bring my self to do an import * just yet … so I will work through your course on this and new (to me) conventions that I suppose come with fastcore.
Not quite. This was present even with the old version of fastai. The idea is to ease imports and fastai will bring anything you need from all libraries (import pandas as pd, import torch, etc) so it’s all available in the namespace.