Shurn the Awesomer
My first attempt at Machine Learning

My first attempt at Machine Learning

Written on Tue, 28 June 2016

So I've started doing learning machine learning with tensorflow. Coming from a PHP background, I often forget that python doesn't require semi-colon. I haven't done anything impressive yet. Just some codes to make sure that my tensorflow works.

So here's the code that I've tried so far.

import tensorflow as tf
matrix1 = tf.constant([ [3., 3.] ])
matrix2 = tf.constant([ [2.], [2.] ])
product = tf.matmul(matrix1, matrix2)

sess = tf.Session()
result = sess.run(product)
print(result)

sess.close()

And my output is [ [ 12.] ]

Honestly, I don't know what's matmul, mathematically and programmatically. But I'll figure it out along the way. I just need more practise. At least I know I can get tensorflow to work.