Image shape WITH DataLoader: torch.Size([376, 1241, 3])
Image ARRAY shape -manual- BEFORE/AFTER DataLoader execution: (375, 1242, 3)
The image size is
height: 375
width: 1242
But the ouput of DL is:
height: 376
width: 1241
If I catch the output of my __getitem__
manually an image array is returned with the right shape.
If I next(iter(train_dataloader))
I get the wrong shape … which really confuses me.
I haven’t enabled any transforms or similar.
The confusing thing is … at the beginning everything worked fine – even with the DataLoader.
I restarted my docker-container (with torch, …) several time; tried an other container, opened a new Notebook, ran it straight as a python-script, backuped my CustomData-Set with some “older” version, I backuped …: Nothing.
I don’t get it, where and why my image is changed in shapes.
collate_fn
should be deactivated.
train_data = KittiDist(root = "datasets", develop = True)
train_dataloader = DataLoader(dataset=train_data,
collate_fn=None,
batch_size=None, # how many samples per batch?
num_workers=1, # how many subprocesses to use for data loading? (higher = more)
pin_memory=False,
shuffle=False) # shuffle the data?
image_dl, target = next(iter(train_dataloader))
Any idea?