Browse Source

Update linear_regression.py

change mul into multiply
xiaodepei 8 years ago
parent
commit
392a667688
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/2_BasicModels/linear_regression.py

+ 1 - 1
examples/2_BasicModels/linear_regression.py

@@ -33,7 +33,7 @@ W = tf.Variable(rng.randn(), name="weight")
 b = tf.Variable(rng.randn(), name="bias")
 
 # Construct a linear model
-pred = tf.add(tf.mul(X, W), b)
+pred = tf.add(tf.multiply(X, W), b)
 
 # Mean squared error
 cost = tf.reduce_sum(tf.pow(pred-Y, 2))/(2*n_samples)