dcgan_code icon indicating copy to clipboard operation
dcgan_code copied to clipboard

binary data?

Open genekogan opened this issue 9 years ago • 3 comments

what is the best way to make this work effectively on binary data? i'm assuming the network won't learn to output binary on its own, even if all the inputs are binary. trivially you can just threshold each output value at 0.5, but is there a better way to do this? i'm hoping to take advantage of having only two states to get away with using a larger input vector.

genekogan avatar Dec 18 '15 02:12 genekogan

I think thresholding input at 0.5 to either 0.0 or 1.0 is sufficient and generally done. I'd expect output to quickly favor binary as anything else would tip of the discriminator. Main speed up would be making sure the architecture has 1 channel and not 3.

dribnet avatar Dec 18 '15 02:12 dribnet

Have you tried using sigmoid generator output instead? When you train a DCGAN on MNIST with sigmoid outputs it's pretty much always railed binary like you expect.

Newmu avatar Dec 18 '15 02:12 Newmu

thanks for the tips! relatedly -- is my intuition about using larger inputs incorrect? i.e. in the image examples, each element is an 8-bit int (0-255). if i use binary instead, is it fair to expect comparable performance for input vectors 8x the same size?

genekogan avatar Dec 18 '15 16:12 genekogan