I followed the course and I am trying to run some of the examples in the notebooks for my own projects.
More specifically, I am working on the 06_multicat regression example, where Jeremy gives images and coordinates as inputs for a regression problem.
My project is about doing exactly the same, but only I do it in a google colab notebook (as I can mount a google drive and acces my data very easily).
I can thoroughly go through each line of the code and replicate it without any issues, I can create the DataBlock, I can see a batch, I can observe the shapes of the mini-batches, and I can even train the model.
All good until I want to see the results. There I run the last cell:
learn.show_results(ds_idx=1, nrows=3, figsize=(6,8))
and I get the following error:
AttributeError: ‘TensorPoint’ object has no attribute 'img_size’
I am quite shocked as there’s barely no information about such an error when I google it.
As a matter of fact, there’s only one difference I observed between my results and the ones in the course’s notebook:
when Jeremy runs the cell to see the first row of the dependent variable yb (being xb, yb =dls.one_batch()), he obtains:
when I run the same command for my data, I get:
Why TensorPoint instead of tensor? Specially when the command xb.shape, yb.shape outputs:
(torch.Size([64, 3, 256, 256]), torch.Size([64, 1, 2])) -exactly as in the notebook of the course-
Any help would be much appreciated