Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while testing #6

Open
SumanthJain2998 opened this issue Sep 30, 2021 · 2 comments
Open

Error while testing #6

SumanthJain2998 opened this issue Sep 30, 2021 · 2 comments

Comments

@SumanthJain2998
Copy link

@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

Screenshot 2021-09-30 at 4 01 12 PM

Can you please help me?

Thank you

@SheldonGeek
Copy link

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.

@rkuo2000
Copy link

rkuo2000 commented Jan 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants