๋ฐฐ์์ผ ํ๋ ์ด์
contributors๊ฐ ์ ์ผ ๋ง๊ณ ์ฌ์ฉํ๋ ์ฌ๋๋ค๋ ์ ์ผ ๋ง์
Tensorflow๋?
Tesorflow is an open source software library for numerical computation using data flow graphs.
ํ ์๋ธ๋ก๋ data flow ๊ทธ๋ํ๋ฅผ ์ฌ์ฉํ์ฌ ์์น์ ์ธ ๊ณ์ฐ์ ํ ์ ์๋ ์คํ์์ค ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ด๋ค.
Data Flow Graph
ํ
์ ํ๋ก์ฐ๋ย dataflow graphํ์์ ๋ฐ๋ฅด๋๋ฐ, ์ด๋ ๊ธฐ์กด์ programming ๋ฐฉ์๊ณผ๋ ๋ค๋ฅด๊ฒ computation ์์๊ฐ ๊ฐ๊ฐ์ operation๊ฐ์ ๊ด๊ณ์ ๋ฐ๋ผ ๊ฒฐ์ ๋๋ ๊ฒ์ด๋ค. ์ด๋ย Parallel compution์ ์์ฃผ ์ ์ฉํ ๊ฐ๋
์ธ๋ฐ, ๊ฐ๊ฐ์ย node๋ ์ฐ์ฐ์ ์ต์ ๋จ์๋ฅผ ๋งํ๋ฉฐย edge๋ ์ฐ์ฐ์ ์ฌ์ฉ๋๋ data๋ฅผ ํํํ๋ค. ์๋ฅผ ๋ค์ด ๋ ๊ฐ์ matrix๋ฅผ ๊ณฑํด์ ํ๋์ matrix ๊ฒฐ๊ณผ๋ฅผ ๋ง๋๋ย tf.matmul
๋ฅผ ์๊ฐํด๋ณด์. ์ด operation์๋ 2๊ฐ์ matrix input์ ์๋ฏธํ๋ 2๊ฐ์ incoming edge, ์ฐ์ฐ์ ๋ด๋นํ๋ node ๊ทธ๋ฆฌ๊ณ matrix multiplication์ ๊ฒฐ๊ณผ๋ฅผ ์๋ฏธํ๋ 1๊ฐ์ outgoing edge๊ฐ ์กด์ฌํ๋ค.
Node โ operation
edge โ data
Install tensorflow
ํ์ฌ ๋ด ๋งฅ๋ถ์๋ python์ด ์ค์น ๋์ด์๋ค.
python์ ์ค์นํ๋ฉด pip๋ ์ค์น๋๋ ์ค ์๊ณ ์์๋๋ฐ, ๋งฅ์์๋ ์๋ ๊ฐ๋ณด๋ค.
์ ๊ฒฝ์ฐ๋ ํ์ด์ฌ ํํ์ด์ง์์ pkg๋ฅผ ์ง์ ๋ค์ด๋ฐ์ ์ค์นํ ๊ฒฝ์ฐ ๋ฐ์ํ ์ ์๋ ๋ฌธ์ ๋ผ๊ณ ํ๋ค.
๋ฐ๋ผ์ ๋ฐ๋ก pip๋ฅผ ์ค์นํด์ฃผ์.
์ ๋ฐฉ๋ฒ๋ ์กด์ฌํ๊ณ ์๋์ ๋ฐฉ๋ฒ ์ฒ๋ผ brew ๋ก ์ฌ์ค์น ํ๋ ๋ฐฉ๋ฒ๋ ์กด์ฌํ๋ค.
|
|
pip ์ค์ ์ด ์๋ฃ ๋์์ผ๋ฉด ๋ค์๊ณผ ๊ฐ์ด ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ์ฌ tensorflow๋ฅผ ์ค์นํ๋ค.
|
|
-
๋์ปค๋ฅผ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ๋ ์กด์ฌํ๋ค. (docker ๋ง์ธ!)
1 2
docker pull tensorflow/tensorflow:latest # Download latest stable image docker run -it -p 8888:8888 tensorflow/tensorflow:latest-jupyter # Start Jupyter server
ํ ์ํ๋ก ๋ฒ์ ํ์ธ
|
|
[ํ์ด์ฌ] Tensorflow 2.0 session / placeholder ์ค๋ฅ ํด๊ฒฐ ๋ฐฉ๋ฒ
Install Tensorflow-GPU
๊ธฐ์กด ๋งฅ๋ถ ๊ฐ์ ๊ฒฝ์ฐ๋ tensorflow-gpu๋ฅผ ํ์ฑํด์ฃผ์ง ์์๋ค.(gpu๊ฐ amd๊ธฐ ๋๋ฌธ์…)
ํ์ง๋ง ์ ํ์ด M1๋ฅผ ์ง์ ์ ์ํ๊ฒ ๋๋ฉด์, gpu๋ฅผ ์ง์ํด์ฃผ๋ ค๋ ๋
ธ๋ ฅ์ ํ๊ณ ์๋ค….
๋ค์ ๊ณผ์ ์ ๋ฐ๋ผํ๋ฉด m1์์๋ gpu๋ฅผ ํ์ฑํํ์ฌ tensorflow๋ฅผ ๋๋ฆด์ ์๋ค.
conda install
https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
์์ ๋งํฌ์์ ํ์ผ์ ๋ฐ๊ณ ๋ค์๊ณผ์ ์ผ๋ก ์ค์น๋ฅผ ์งํํ๋ค.
|
|
์ด ํ ์ํ๋ ํ๊ฒฝ์ ๋ง๋ค์ด activation ํด์คํ ๋ค์๊ณผ์ ์ ์งํํ๋ค.
install the tensorflow dependencies
|
|
tensorflow version upgrade
|
|
install base Tensorflow
|
|
install tensorflow-metal plugin
|
|