목록PYTHON/A.I (9)
정구리의 우주정복
[tensorflow] 텐서와 그래프 실행 , AttributeError: module 'tensorflow' has no attribute 'Session' 에러
골빈해커의 3분 딥러닝 텐서플로 맛 을 보면서 공부를 해봐야징 1. tensorflow 설치 - pip3 install tensorflow 를 입력해서 설치해주도록 하자 2. tensorflow 설치 확인 import tensorflow as tf hello = tf.constant("Hello Tensorflow") print(hello) >>tf.Tensor(b'Hello Tensorflow', shape=(), dtype=string) 여기서 dtype 는 자료형을 의미한다 3. 그래프의 생성과 실행 -그래프란 간단하게 텐서들의 연산 모음이다 . 텐서플로는 텐서와 텐서들의 연산들을 먼저 정의하여 그래프를 만들고 필요할때 연산을 실행하는 코드를 넣어 ' 원하는 시점 ' 에 실제 연산을 수행 (지연실행..
PYTHON/A.I
2020. 9. 21. 00:07