style-based-gan-pytorch icon indicating copy to clipboard operation
style-based-gan-pytorch copied to clipboard

Grayscale input

Open dassima opened this issue 6 years ago • 2 comments

Hi,

I try to use your environment to train the generator and discriminator with grayscale inputs, but I don't figure it which are the values that need to be change from 3 to 1, because everywhere I tried, I got a later error of mismatch in shape.

dassima avatar Apr 09 '19 14:04 dassima

You will need to change these lines: https://github.com/rosinality/style-based-gan-pytorch/blob/master/model.py#L250 https://github.com/rosinality/style-based-gan-pytorch/blob/master/model.py#L386 https://github.com/rosinality/style-based-gan-pytorch/blob/master/train.py#L39 (Change normalization mean/std to [0.5], [0.5]) I think it is almost enough, but if you find an error, please post it with error messages.

rosinality avatar Apr 09 '19 14:04 rosinality

Thank you.

dassima avatar Apr 09 '19 14:04 dassima