tf.metrics.accuracy not working as intended
问题 I have linear regression model that seems to be working fine, but I want to display the accuracy of the model. First, I initialize the variables and placeholders... X_train, X_test, Y_train, Y_test = train_test_split( X_data, Y_data, test_size=0.2 ) n_rows = X_train.shape[0] X = tf.placeholder(tf.float32, [None, 89]) Y = tf.placeholder(tf.float32, [None, 1]) W_shape = tf.TensorShape([89, 1]) b_shape = tf.TensorShape([1]) W = tf.Variable(tf.random_normal(W_shape)) b = tf.Variable(tf.random