*Tensorflow 란
Tensorflow는 Machine Intelligence를 위한 오픈소스 라이브러리이다.
구글이 만든 numerical computation을 위한 오픈소스 소프트웨어 라이브러리
data flow graphs를 사용할 수 있다는 특징
python으로 구현 가능
동일 코드를 CPU와 GPU에서 모두 사용 가능
데이터, 모델 병렬화
TensorBoard visualization
Tensor = Data
Flow = 흐름
즉 Tensorflow = 데이터의 흐름
*Dataflow graph :
- Nodes in graph :
=> represent mathematical operations
- Edges :
=> represent the multidimensional data arrays
=> (tensor) communicated between them
*Basic Usage
- To use Tensorflow you need to understand how tensorflow:
=> represents computations as graphs
=> executes graphs in the context of Session
=> represents data as tensors
=> maintains state with variables
=> use feeds and fetches to get data into and out of arbitrary operations
*Tensorflow Basic
Session을 수행하여야 결과를 얻을 수 있다 :
*PlaceHolder 주기 :
1 | "Mul: %i"% | cs |
*Tensor Ranks, Shapes, and Types
a = [[1,2,3], [4,5,6], [7,8,9]]
a의 rank = 2
shape는 [3,3] 이다
1) Tensor Ranks
0 scalar s=483
1 vector v=[1.1 2.2, 3.3]
2 matrix m=[[1,2,3], [4,5,6], [7,8,9]]
3 3-Tensor t=[[[2],[4],[6]],[1],[2],[3]],[[5],[6],[7]]]
4 nTensor
2) Tensor Shapes
Rank Shape Dimension Number
0 [] 0-D
1 [D0] 1-D
2 [D0, D1] 2-D
3 [D0, D1, D2] 3-D
n [D0, D1, ..., Dn-1] 4-D
3) Tensor Data Type(아래 2가지를 가장 많이 사용함):
DT_FLOAT tf.float32
DT_COUBLE tf.float64
DT_INT32 tf.int32
DT_Complex64 tf.complex64
* Pycharm 설치
아래 링크에서 Community 버전 설치
https://www.jetbrains.com/pycharm/download/#section=windows
'Python 활용 딥러닝' 카테고리의 다른 글
Linear Regression with 텐서플로우 (Pycharm 환경) (0) | 2018.12.18 |
---|---|
모두를 위한 머신러닝 + 기계학습 절차 Machine Learning Concept (0) | 2018.12.18 |
Scipy 사용법 (0) | 2018.12.17 |
Numpy 사용법(배열연산, 수학함수) (0) | 2018.12.17 |
Python if와 for Loop, while문 사용법 (0) | 2018.12.17 |