Linear_SVM wrong norm_term
RayXie29 opened this issue · 2 comments
RayXie29 commented
norm_term = tf.divide(tf.reduce_sum(tf.multiply(tf.transpose(W),W)),2)
should be
norm_term= tf.divide(tf.matmul(tf.transpose(W),W),2)
astorfi commented
Would please create a pull request? Why are you removing the tf.reduce_sum?
RayXie29 commented
Since the shape of W is Nx1. So I assume that tf.matmul( tf.transpose(W), W ) would be 1xN * Nx1, which the output will be 1x1. But I think it is better to add tf.reduce_sum. Already pull the request, thanks for the repo. It is very helpful.