CIT
CIT copied to clipboard
Error while testing
@Ha0Tang @Amazingren Hello, Thank you for the amazing repository. I was evaluating the network for JS and other metrics. I ran into an error while running the test.py for GMM
Can you please help me?
Thank you
You can change transforms.Normalize to transforms.Normalize((0.5), (0.5)) in cp_dataset.py. It will fix it. I had the same issue. and it got fixed.
The error happened because the first dimension of the tensor means the color, so what your error means is that you are giving a grayscale picture (1 channel), while the data loader expects a RGB image (3 channels). You defined a pil_loader function that returns an image in RGB, but you are never using it.
After fixing the above error, I got a Runtime error: File "/kaggle/working/CIT/networks.py", line 228, in forward x = x.view(x.size(0), -1) RuntimeError: view size is not compatible with input tensor's size and stride