Parcourir la source

Merge pull request #113 from xiaodepei/patch-1

Update linear_regression.py
Aymeric Damien il y a 8 ans
Parent
commit
ca907ab9a8
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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)