I’ve been working through the DCGAN tutorial and want to work with new datasets. I’ve brought in a grayscale set of Lego images, and while I could do the sensible thing and figure out how to convert the network to operate with a single color channel, I realized it would be much funnier to make the Detector colorblind so that the Generator could get away with making psychedelic colorful Lego instead of this boring gray.
I’m having a heck of a time doing it though. I tried doing a manual averaging of the color channels, like such:
with torch.no_grad(): for f in fake: f = (f + f + f) / 3 f = f f = f
between when the fakes are generated and when they’re passed along to D. But I get an error complaining that it’s noticed an anomaly despite the no_grad.
Is there an easier way to do this? Or a fix I can use to make it not break?