I'm not sure if the way i installed the tensorflow on my laptop is correct or not and still trying to figure out some of the issues.
Initially i installed Tensorflow on my Mac book pro and have no luck there (will come to that later) then i installed on a vagrant box using a ubuntu 16.04 image.
(tensorflow) ubuntu@ubuntu-xenial:~$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>>
(tensorflow) ubuntu@ubuntu-xenial:~$ go run testing_tensor.go
2017-11-22 15:50:43.747754: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX
Hello from TensorFlow version 1.4.0
Not sure how different this is from using a python library and go library and how can i identify if the tensorflow is using the cpu instead gpu?
TensorFlow will tell you what device a session is using if you create the session with the log_device_placement
option set to true:
conf = tf.ConfigProto(log_device_placement=True)
sess = tf.Session(config=conf)
print(sess.run(hello))