I am trying the Tabular learner and during predict phase, even if I input the same training data, the following learn.predict function throws up an error.
test = df.sample(n=100).reset_index(drop=True)
test_dl = learn.dls.test_dl(test.drop(['salary'], axis=1))
learn.predict(test_dl)
Oh, never mind. Really appreciate the quick response
It looks like predict has to be used for one row but get_preds has to be used if inferring on the entire test data.
Hey @muellerzr, I was using the incorrect dataloaders. Instead of using TabularDataLoaders, I was using DataLoaders to pack both my train and valid dataloaders. Sylvain helped me identify this issue.
As I dig deeper, I think I found another issue when I try running this on the GPU. The github issue has the details. Do you think I’m missing anything?
P.S: Thank you for your amazing work to this community. I learnt the Tabular API using your notebooks here.
Best way to test this is to not explicitly say CUDA at all first and see how long it takes to validate on your data and compare the two. It should be pushed to the GPU if available during training etc IIRC