hapines MYPI

hapines
접속 : 5564   Lv. 66

Category

Profile

Counter

  • 오늘 : 15 명
  • 전체 : 504454 명
  • Mypi Ver. 0.3.1 β
[퍼즐 연구] 텐서플로 설치해보기 (0) 2019/07/01 PM 05:58

- 파이선

https://www.python.org/downloads/    : python-3.7.3-amd64.exe (파일명은 amd64 이지만 'for AMD64/EM64T/x64')

- Anaconda

https://www.anaconda.com/distribution/   : Anaconda 2019.03 for Windows Installer


----------------------------------------------

! Anaconda> 라고 되어있는 것은 'Anaconda Prompt' 를 실행한 후 커맨드를 입력한다.

! Python> 이라고 되어있는 것은 '명령 프롬프트'를 실행한 후 커맨드를 입력한다.

 

Anaconda> conda update -n base conda     // 아니콘다 업데이트

Anaconda> conda update --all             // 모듈 업데이트

 

Python> pip install tensorflow                // 텐서플로 설치

Python> python -m pip install --upgrade pip   // pip 업데이트


Anaconda> conda create -n tensorflow python=3.7  // 콘다 환경 만들기 (?)

Anaconda> activate tensorflow  // 텐서플로 액티베이트. 프롬프트가 바뀜.

 

----------------------------------------------

Python TEST 코드 (모두 설치한 후 Python을 실행한 후 쳐본다)


>>> import tensorflow as tf

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

>>> sess = tf.Session()

>>> print(sess.run(hello))

b'Hello, TensorFlow!'

>>>

>>> a = tf.constant(10)

>>> b = tf.constant(32)

>>> print(sess.run(a+b))

42

----------------------------------------------

2019-07-01 17:36:04.799106: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

라는 에러가 나왔는데 bazel을 설치하고 tensorflow를 AVX2 에 맞게 빌드를 해야 에러가 안나온다고 한다.

 

Anaconda> conda install bazel    // bazel 설치???

 

숙제) bazel build 에 관해서 찾아서 AVX2 빌드를 다시 할 수 있는 지식을 갖춘다.



신고

 
X