teobaluta/NPAQ

A Question about Input Data

zhangyedi opened this issue · 3 comments

Hi, I'm wondering that when you train your own BNN models, the training data is like {1,0,...} or {1,-1,...}?

I saw the encoding of each block is based on the fact that the input is \in {1,-1} (since you have "/2" in "c = floor((c + sum_aij) / 2) + w_minus;"), so why the "minist-100-...-id_0.txt" in your concrete input folder is {0,1,...}?

If I want to test the BNNs you generate, should I use {1,-1,...} or {1,0,...} as an input image?

Hi there,

You are correct, for encoding the network because the network operations themselves are on images in {-1,1} we have to translate it to Boolean variables. However, the input image we take directly as Boolean variables (I must say, not necessarily the most consistent way to go about it) so we can directly add it in the formula encoding. Please use {0, 1} for the input image.

Thanks,
Teo

If I understand correctly, I need to use {0,1} for the input image when I am trying to encode the verification problem. But if I want to test the network (just compute the classification result of an input image and needn't any CNF encoding), I need to use {-1,1} as an input of the BNNmodelYouTrained.pt.

Yes, correct. :)