[Tensorflow] tensorflow source build & install on osx 10.12

ITWeb/개발일반 2017. 8. 2. 09:54

설치 하면서 참고 문서니 순서를 정리 하지 않아서 그냥 raw data 만 일단 투척해 봅니다.

그냥 brew install 해서 설치를 해도 되지만 아래와 같은 오류가 발생을 해서 소스 빌드 했습니다.


[오류]

$ python helloworld.py

2017-08-01 17:04:11.721245: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.

2017-08-01 17:04:11.721266: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.

2017-08-01 17:04:11.721270: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.

2017-08-01 17:04:11.721274: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.

Hello, TensorFlow!

(tensorflow) imac-2:src henry$ deactivate


[참고문서들]


tensorflow)


bazel)


nvidia)

- cudnn 다운로드를 받기 위해서는 로그인을 하셔야 합니다.


기본 설치 가이드)


$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

$ sudo pip install /tmp/tensorflow_pkg/tensorflow-1.2.1-py2-none-any.whl


# 아래는 six-1.4.1 패키지로 인해서 설치 오류가 발생을 합니다. 이를 회피 하기 위한 옵션 추가 입니다.

$ sudo pip install --ignore-installed six


#!/usr/bin/python

import tensorflow as tf

hello = tf.constant('Hello, TensorFlow!')

sess = tf.Session()

print(sess.run(hello))


: