How to quantize the values of tf.Variables in Tensorflow
问题 I have a training model like Y = w * X + b where Y and X are output and input placeholder, w and b are the vectors I already know the value of w can only be 0 or 1, while b is still tf.float32. How could I quantize the range of variable w when I define it? or Can I have two different learning rates? The rate for w is 1 or -1 and the rate for b is 0.0001 as usual. 回答1: There is no way to limit your variable during the activation. But what you can do is to limit it after each iteration. Here is