Selaa lähdekoodia

Update linear_regression.py

change mul into multiply
xiaodepei 8 vuotta sitten
vanhempi
commit
392a667688
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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)