<blockquote>
  <p>What does the x, b, W and y variables represent?</p>
</blockquote>

<p>These are symbolic variables that the model is going to use - input, output and neural network parameters.
<code>x</code> and <code>y</code> are the data, they don't change, that's why they're defined as <code>tf.placeholder</code>. <code>W</code> and <code>y</code> are learnable parameters (in TF terminology <em>trainable</em>). Initial value is less important than the dimensions of those parameters (in fact, <a href="https://arxiv.org/abs/1511.06422" rel="nofollow noreferrer">not exactly</a>, but that's an advanced topic). In this example, both <code>W</code> and <code>b</code> are one-dimensional, though usually <code>W</code> is a matrix and <code>b</code> is a vector.</p>

<p>Together, all defined variables form a so called <em>computational graph</em>.</p>

<blockquote>
  <p>Why is the code passing in a parameter value of 0.01 to the
  GradientDescentOptimizer function?</p>
</blockquote>

<p>This is the <em>learning rate</em>. In simple terms, it's the step size that the engine is making when it optimizes the objective function <code>loss</code>. The learning rate is usually close to 0, but exact value depends on many factors. In fact, it's one of common hyperparameters that researches try manually. <code>0.01</code> seems like a good starting point, because it's good enough in many cases.</p>

<blockquote>
  <p>What does y_train represent here?</p>
</blockquote>

<p><code>x_train</code> and <code>y_train</code> are the training data, the first one is the input and the second one is the expected label. In this case, you are telling that input <code>1</code> should lead to result <code>0</code>, input <code>2</code> to <code>1</code> and so on. Hopefully, the network is going to figure out from these 4 examples that it should learn a "minus one" operation (side note: the neural networks is just a linear model that fits perfectly). It's called <em>supervised learning</em>.</p>

<blockquote>
  <p>What does the variables curr_W, curr_b represent here?</p>
</blockquote>

<p>First of all, note that <code>curr_W</code> and <code>curr_b</code> are ordinary python variables, while <code>W</code> and <code>b</code> are symbolic variables. Symbolic variables define how your computation is organized and they take different values during training. <code>curr_W</code> and <code>curr_b</code> are just one of those values after some iterations. Basically, you take a snapshot of the model and print it out to see what the neural network has learned. The result values <code>-1</code> and <code>1</code> (almost) mean that the neural network successfully a linear transformation.</p>
TensorFlow code help - Getting Started Example
<p>I need help from someone to explain to me the code below. I'm kind of new to TensorFlow, but I have specific questions defined within code below</p>

<pre><code>import tensorflow as tf

# Model parameters
#Why are variables initialize with .3 and -.3
W = tf.Variable([.3], dtype=tf.float32)
b = tf.Variable([-.3], dtype=tf.float32)
</code></pre>

<p>What does the x, b, W and y variables represent?</p>

<pre><code># Model input and output
x = tf.placeholder(tf.float32) # this is the input
linear_model = W * x + b       # this is the linear_model operation
y = tf.placeholder(tf.float32) # Is this the output we're trying to predict.
</code></pre>

<p>Why is the code passing in a parameter value of 0.01 to the GradientDescentOptimizer function?</p>

<pre><code># loss - measure how far apart the current model is from the provided data.
loss = tf.reduce_sum(tf.square(linear_model - y)) # sum of the squares
# optimizer
optimizer = tf.train.GradientDescentOptimizer(0.01) # Why are we passing the value '0.01'
train = optimizer.minimize(loss)
</code></pre>

<p>What does y_train represent here?    </p>

<pre><code># training data
x_train = [1, 2, 3, 4] # the input variables we know
y_train = [0, -1, -2, -3] # 

# training loop
init = tf.global_variables_initializer() # init is a handle to the TensorFlow sub-graph that initializes all the global variables. Until we call sess.run, the variables are  unitialized
sess = tf.Session() # Sesson encapsulates the control and state of the TensorFlow runtime. ITs used to evaluate the nodes, we must run the computational graph within a session
sess.run(init) # reset values to wrong
for i in range(1000):
  sess.run(train, {x: x_train, y: y_train})
</code></pre>

<p>What does the variables curr_W, curr_b represent here?</p>

<pre><code># evaluate training accuracy
# Why does the variables W and b represent?
curr_W, curr_b, curr_loss = sess.run([W, b, loss], {x: x_train, y: y_train})
print("W: %s b: %s loss: %s"%(curr_W, curr_b, curr_loss))
</code></pre>

<p>The code example comes from Tensorflow website: <a href="https://www.tensorflow.org/get_started/get_started#complete_program" rel="nofollow noreferrer">https://www.tensorflow.org/get_started/get_started#complete_program</a></p>