Annie_1
(Anindita Bhattacharya)
1
Running the code path = untar_data(URLs.CAMVID_TINY)
dls = SegmentationDataLoaders.from_label_func(
path, bs=8, fnames = get_image_files(path/“images”),
label_func = lambda o: path/‘labels’/f’{o.stem}_P{o.suffix}’,
codes = np.loadtxt(path/‘codes.txt’, dtype=str)
)
learn = unet_learner(dls, resnet34)
learn.fine_tune(8)
from Chapter 1
gives me this error
NameError: name ‘SegmentationDataLoaders’ is not defined
How do I fix it?
Can you please confirm if you have imported all the required packages
2 Likes
Annie_1
(Anindita Bhattacharya)
3
Hi, what are the required packages that need to be imported for this code?
Best Regards
Anindita
msivanes
(Manikandan Sivanesan)
4
Make sure vision module is imported.
from fastai.vision.all import *
Can you try colab?
As pointed out by @msivanes you can do that …