Browse Source

tensorflow example update

tobby48 6 years ago
parent
commit
ebc8961eda

+ 0
- 2
src/main/python/kr/co/swh/lecture/opensource/tensorflow/two-sum-high.py View File

13
 # 앞에서 정의한 상수텐서들을 연산할 오퍼레이션 추가, 해당 오퍼레이션의 출력텐서를 'tensor_c'가 가르킴
13
 # 앞에서 정의한 상수텐서들을 연산할 오퍼레이션 추가, 해당 오퍼레이션의 출력텐서를 'tensor_c'가 가르킴
14
 tensor_c = tensor_a + tensor_b
14
 tensor_c = tensor_a + tensor_b
15
 
15
 
16
-
17
 # Tensor("a:0", shape=(), dtype=float32)
16
 # Tensor("a:0", shape=(), dtype=float32)
18
 # 1. 'a:0'는 a의 첫번째 출력텐서
17
 # 1. 'a:0'는 a의 첫번째 출력텐서
19
 # 2. 'shape=()'는 스칼라 텐서
18
 # 2. 'shape=()'는 스칼라 텐서
22
 print(tensor_b)
21
 print(tensor_b)
23
 print(tensor_c)
22
 print(tensor_c)
24
 
23
 
25
-
26
 print(tensor_a.op)                # 텐서에 대한 오퍼레이션 정보
24
 print(tensor_a.op)                # 텐서에 대한 오퍼레이션 정보
27
 print(tensor_a.op.node_def)        # 텐서에 대한 오퍼레이션 정보
25
 print(tensor_a.op.node_def)        # 텐서에 대한 오퍼레이션 정보
28
 print(tensor_a.op.inputs)        # 상수 오퍼레이션의 입력은 출력해볼 수 없다.
26
 print(tensor_a.op.inputs)        # 상수 오퍼레이션의 입력은 출력해볼 수 없다.