'TypeError: object of type 'ClassificationDataLoader' has no len()
I keep getting this error TypeError: object of type 'ClassificationDataLoader' has no len(). Has anybody got any idea what to do with that?
class ClassificationDataLoader:
def __init__(
self,
image_paths,
targets,
resize,
augmentations=None,
backend="pil",
channel_first=True,
):
"""
:param image_paths: list of paths to images
:param targets: numpy array
:param resize: tuple or None
:param augmentations: albumentations augmentations
"""
self.image_paths = image_paths
self.targets = targets
self.resize = resize
self.augmentations = augmentations
self.backend = backend
self.channel_first = channel_first
self.dataset = ClassificationDataset(
image_paths=self.image_paths,
targets=self.targets,
resize=self.resize,
augmentations=self.augmentations,
backend=self.backend,
channel_first=self.channel_first,
)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
