Cuda runtime error (801)

RuntimeError: cuda runtime error (801) : operation not supported at …\torch/csrc/generic/StorageSharing.cpp:247

i am using fastai in conda enviornment while running learn.fine_tune(1) i was getting this error
then i set the num_workers=0. my model trained but now i am running in the same error when

running learn.predict(files[0]).
please tell me how to solve this error

1 Like

learn.predict works for me once I set the num_workers=0. Here is my code:

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), num_workers=0
)

learn = unet_learner(dls, resnet34)
learn.fine_tune(8)

fnames = get_image_files(path/“images”)
learn.predict(fnames[0])

learn.show_results also works

learn.show_results(max_n=6, figsize=(7,8))