Skip to content

Error while testing #6

Open
Open

Description

@SumanthJain2998

@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

Activity

  1. SheldonGeek commented on Oct 7, 2021

    @SheldonGeek

    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.

  2. rkuo2000 commented on Jan 6, 2022

    @rkuo2000

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions