2nd UPDATE & FIX: see Unofficial Setup thread (Local, AWS) for better setup instructions. It seems the instructions I was using were out of date. I’ll keep my post below in case someone else hits the same issue.
Trying out Lesson 1 I am hitting an error in the call data.show_batch(rows=3, figsize=(7,6))
and also when I call learn.fit_one_cycle(4)
, the stack looks like this for the first call:
RuntimeError: Traceback (most recent call last):
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in <listcomp>
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/fastai/data_block.py", line 486, in __getitem__
x = x.apply_tfms(self.tfms, **self.tfmargs)
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/fastai/vision/image.py", line 113, in apply_tfms
else: x = tfm(x)
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/fastai/vision/image.py", line 498, in __call__
return self.tfm(x, *args, **{**self.resolved, **kwargs}) if self.do_run else x
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/fastai/vision/image.py", line 445, in __call__
if args: return self.calc(*args, **kwargs)
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/fastai/vision/image.py", line 450, in calc
if self._wrap: return getattr(x, self._wrap)(self.func, *args, **kwargs)
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/fastai/vision/image.py", line 167, in coord
self.flow = func(self.flow, *args, **kwargs)
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/fastai/vision/transform.py", line 227, in symmetric_warp
return _perspective_warp(c, targ_pts, invert)
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/fastai/vision/transform.py", line 213, in _perspective_warp
return _apply_perspective(c, _find_coeffs(_orig_pts, targ_pts))
File "/home/rallen/anaconda3/envs/fastaiv3/lib/python3.7/site-packages/fastai/vision/transform.py", line 194, in _find_coeffs
return torch.gesv(B,A)[0][:,0]
RuntimeError: B should have at least 2 dimensions, but has 1 dimensions instead
I do see other messages asking about this issue Developer chat and Verify_images error but no resolution as yet, or just a suggestion that nightly pytorch should fix it. My versions for fastai=1.0.34 & pytorch=1.0.0.dev20190127
UPDATE: If you do the default instructions, installing torchvision after pytorch-nightly, you will actually end up with pytorch 0.4.1 installed. Check this with import torch; print(torch.__version__)
The current Lesson 1 doc seems to only work with pytorch 0.4.1. If I follow the default instructions & don’t force-reinstall nightly, things work okay–modulo the fixes some folks above have done. Mainly, the change to add `padding_mode=‘zeros’ to ImageDataBunch.from_name_re() seems to be a way to get fastai to work with pytorch 0.4.1.
I hit this error because I forced pytorch 1.0 to be installed since installing pytorch nightly was the guidance given in the setup. Does fastai really want us to be running with 1.0.xxx or with 0.4.1?