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

doesn't work with grayscale images #158

Open
aziabari opened this issue Feb 7, 2023 · 2 comments
Open

doesn't work with grayscale images #158

aziabari opened this issue Feb 7, 2023 · 2 comments

Comments

@aziabari
Copy link

aziabari commented Feb 7, 2023

the code produces error with grayscale images.
My input crop size is 400, and the number of input and output channel is set to 1, then I get this error:

RuntimeError: Given groups=1, weight of size [64, 1, 7, 7], expected input[0, 3, 406, 406] to have 1 channels, but got 3 channels instead

When I change the number of input/output channels to 3, then the error disappears.

It its worth noting, with the same training data using cyclegan code/repo, I use number of input/output channels equal to 1 and I don't get any error!

@ErikValle
Copy link

ErikValle commented Apr 1, 2023

Trick: modify the value of a pixel to force the RGB settings. For example, replace the value of the first pixel with [0,255,0].

@7W7W7W
Copy link

7W7W7W commented Jan 29, 2024

Trick: modify the value of a pixel to force the RGB settings. For example, replace the value of the first pixel with [0,255,0].

您好,请问具体哪里修改呢?谢谢

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