I am getting this error while converting an image to torch image
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
Untyped global name 'self': Cannot determine Numba type of <class 'ffcv.transforms.ops.ToTorchImage'>
File "../../../../../miniconda3/envs/ffcv5/lib/python3.8/site-packages/ffcv/transforms/ops.py", line 88:
def to_torch_image(inp: ch.Tensor, dst):
# If channels last, it's already contiguous so we're good
if self.channels_last:
^
loaders = {}
for name in ['train', 'val']:
label_pipeline: List[Operation] = [NDArrayDecoder()]
image_pipeline: List[Operation] = [SimpleRGBImageDecoder()]
if name == 'train':
image_pipeline.extend([
ToTorchImage()
])
# Create loaders
loaders[name] = Loader(
paths[f'{name}_beton_path'],
batch_size=14,
num_workers=6,
order=OrderOption.RANDOM,
drop_last=(name=='train'),
pipelines={
'image': image_pipeline,
'label': label_pipeline
}
)
I am getting this error while converting an image to torch image
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) Failed in nopython mode pipeline (step: nopython frontend) Untyped global name 'self': Cannot determine Numba type of <class 'ffcv.transforms.ops.ToTorchImage'>
File "../../../../../miniconda3/envs/ffcv5/lib/python3.8/site-packages/ffcv/transforms/ops.py", line 88: def to_torch_image(inp: ch.Tensor, dst):