I want to create custom pytorch dataset class , but getting the below error :–>
Here’s the link to my notebook and image data
please help me in resolving the problem .
I want to create custom pytorch dataset class , but getting the below error :–>
Here’s the link to my notebook and image data
please help me in resolving the problem .
img = cv2.resize(img, dsize=(128, 128), interpolation=cv2.INTER_CUBIC)
img = self.aug(img)
img = np.transpose(img, (2,0,1)).astype(np.float32)
pytorch transforms only works on tensors, but you apply them on numpy arrays: img = self.aug(img)
How to resolve this part so that I can run my dry run testing syntaxes?
img = train_data[0]
plt.imshow(np.transpose(img, (1,2,0)) , cmap='gray')