I run ‘intro lesson’ code in windows env.
I run underline code very well ( dls input num_workers=0):
from fastai.vision.all import *
path = untar_data(URLs.PETS)/‘images’
def is_cat(x): return x[0].isupper()
dls = ImageDataLoaders.from_name_func(
path, get_image_files(path), valid_pct=0.2, seed=42,
label_func=is_cat, item_tfms=Resize(224),num_workers=0)
learn = cnn_learner(dls, resnet34, metrics=error_rate)
learn.fine_tune(1)
but i run under code wrong( RuntimeError: cuda runtime error (801) : operation not supported at …\torch/csrc/generic/StorageSharing.cpp:247):
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)
Somebody can help me !