1
I can run all the cells of the tutorial notebook of Pytorch about dataloading (pytorch tutorial). But when I use OpenCV in place of Skimage to resize the image, the dataloader gets stuck, i.e nothing happens. In the Rescale class: class Rescale(object): ..... def __call__(self, sample): .... #img = transform.resize(image, (new_h, new_w)) img = cv2.resize(image, (new_h, new_w)) ..... The dataloader and the for loop are defined with: dataloader = DataLoader(transformed_dataset, batch_size=4, shuffle=True, num_workers=4) for i_batch, sample_batched in enumerate(dataloader): print(i_batch, sample_batched['image'].size(), sample_batched['landmarks'].size()) I can get the iterator to print something i