Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16743

How the parameter vector of zeroes works in tensorflow?

$
0
0

So, I'm following book on Tensorflow by Chris Mattman. It is pretty buggy and outdated, but I'm still trying to get into ML with it (there are interesting concepts further in the book)

Here is the code:

import tensorflow as tftf.disable_v1_behavior()#...#...#...def model(X, w):    terms = []    for i in range(num_coeffs): #num_coeffs = 6        term = tf.multiply(w[i], tf.pow(X, i))        terms.append(term)    return tf.add_n(terms)w = tf.Variable([0.]*num_coeffs, name="parameters")y_model = model(X, w) #X = tf.placeholder(tf.float32)

My question: how do we multiply 0. by some value in the variable and get anything different from 0?Edit: I forgot to mention, it is to be polynomial regression model =)


Viewing all articles
Browse latest Browse all 16743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>