Monday, October 10, 2016

Setting up Tensorflow on a server

Hello everyone!

We now have setted up a linux server acting like a cloud for our tensorflow application providing same data and neuronal network for all developers!
We followed the instructions of Tensorflow Installation.
We also tested the new environment with the installation test and from the introduction page:

import tensorflow as tf
import numpy as np

# Create 100 phony x, y data points in NumPy, y = x * 0.1 + 0.3
x_data = np.random.rand(100).astype(np.float32)
y_data = x_data * 0.1 + 0.3

# Try to find values for W and b that compute y_data = W * x_data + b
# (We know that W should be 0.1 and b 0.3, but TensorFlow will
# figure that out for us.)
W = tf.Variable(tf.random_uniform([1], -1.0, 1.0))
b = tf.Variable(tf.zeros([1]))
y = W * x_data + b

# Minimize the mean squared errors.
loss = tf.reduce_mean(tf.square(y - y_data))
optimizer = tf.train.GradientDescentOptimizer(0.5)
train = optimizer.minimize(loss)

# Before starting, initialize the variables.  We will 'run' this first.
init = tf.initialize_all_variables()

# Launch the graph.
sess = tf.Session()
sess.run(init)

# Fit the line.
for step in range(201):
    sess.run(train)
    if step % 20 == 0:
        print(step, sess.run(W), sess.run(b))

# Learns best fit is W: [0.1], b: [0.3]
 by Tensorflow Introduction

Wow! We can learn mathematical rules and patterns!

3 comments:

  1. Hey guys!
    It is great that you can learn mathematical rules and patterns now. It is such an interesting topic! And I can see a lot of code :) But I don't understand the most of it. Is it possible to make some more explanations how it works?
    Good luck with it :D

    ReplyDelete
  2. Hello Franziska,
    Thank you for your comment!
    Indeed it is not that easy to understand in the firstplace.
    But if you read carefully throw it, it can be very understanding and cool!
    Greethings!

    ReplyDelete
  3. Hello again,
    I'm sure, that a person with some more experience than myself, could unterstand it after reading it carefully. My problem is to understand the entirety of your code. Some pieces are easy to gather, but not all. So some more explaining words would be helpfull :)
    Greetings!

    ReplyDelete