The output of the convnet was a 37x1 vector, which was the result of a dot product between a 512x1 vector and a matrix 512x37. How did we get a 37x1 vector if the dimensions doesnt match?
Quick question.
In https://github.com/fastai/course-v3/blob/master/nbs/dl1/lesson6-rossmann.ipynb how come the Store
values change after running Categorify
? Some become floats and others become NaNs
For anyone searching for where to find Jeremy’s detailed explanation of how the data for Rossmann competition is engineered in the rossman_data_clean.ipynb, here is a link for that:
This is from the 11th lesson of Fast.ai’s Machine Learning course from 2018.
You can also have a look at lesson 12 for further insights on the Rossmann competition.
You can always decompose the one-big-command and see where the error occurs.
Example below
data = TabularList.from_df(train, path=path, cat_names=cat_names, cont_names=cont_names, procs=procs);
data = data.split_by_idx(idx_of_valid_set);
#data=data.split_none()
data = data.label_from_df(cols=dep_var, label_cls=FloatList, log=take_log);
data = data.add_test(testTL);
data = data.databunch();
It adds an extra dimension to the object.
Why? Because they way tensors are used in Pytorch, as always a batch (list) of something.
You can see it this way maybe
a=Tensor([1,2,3] )
a
> tensor([1., 2., 3.])
a.shape
> torch.Size([3])
b=a[None]
b
> tensor([[1., 2., 3.]])
b.shape
> torch.Size([1, 3])
Note the extra “[ ]” in tensor([[1., 2., 3.]])
. It’s like a list inside a list, therefore has a +1 dimension.
Hi were you able to figure this out? I am trying to use a test set with tabular_learner.predict( ) and have no luck