-
ML lab 01 - TensorFlow의 설치및 기본적인 operations (new)인공지능 및 기계학습 개론/ML_LEC 2020. 2. 12. 18:49
TensorFlow
- Data flow graphs를 사용해서 numerical computation을 할수있는
- Python 오픈소스 라이브러리
Data Flow Graph
- Node(Operation)들이 Edge(Data, Tensors)로 연결된 작업 흐름도
- constant : node를 만든다
Computational Graph
TensowFlow Mechanics
- Build graph using tensorflow operation
- feed data and run graph : sess.run(op)
- update variables in the graph(and return value)
Placeholder
- 특별한 노드 not constant
- sess.run(add_node, feed_dict={a:3, b:4})
- 값을 실행할 때 넘겨 줄 수 있다
Everything is Tensor
- array
- rank : 몇차원 array? (scalar, vector, matrix, n-Tensor)
- shape : element가 몇개인가?
- type : 대부분 float32, int32
- https://www.tensorflow.org/install/pip
Install TensorFlow with pip | TensorFlow
TensorFlow 2 packages are available tensorflow —Latest stable release with CPU and GPU support (Ubuntu and Windows) tf-nightly —Preview build (unstable). Ubuntu and Windows include GPU support. Older versions of TensorFlow For TensorFlow 1.x, CPU and GPU p
www.tensorflow.org
- https://www.tensorflow.org/api_docs/python/tf/Graph#building_a_tfgraph
tf.Graph | TensorFlow Core v2.1.0
Class Graph A TensorFlow computation, represented as a dataflow graph. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.Graph, tf.compat.v2.Graph Graphs are used by tf.functions to represent the function's comput
www.tensorflow.org
hunkim/DeepLearningZeroToAll
TensorFlow Basic Tutorial Labs. Contribute to hunkim/DeepLearningZeroToAll development by creating an account on GitHub.
github.com
brew로 python3, pip3, virtualenv 설치 virtualenv에서 컴파일 성공 import, version 확인 강의에 Sesstion이 deprecate됬다고 함 The TF 2.0 supports eager execution it means you need not explicitly create the session and run the code in it. Runtimeerror: the session graph is empty. add operations to the graph before calling run(). - Kodlogs
Solution : The TF 2.0 supports eager execution it means you need not explicitly create the session and run the code in it. So the simplest solution is as follows: import tensorflow as tfprint(tf.__version__)# Building a dataflow graph.c = tf.constant([[1.0
kodlogs.com
HelloWorld print 성공 '인공지능 및 기계학습 개론 > ML_LEC' 카테고리의 다른 글
ML lec 08-1: 딥러닝의 기본 개념: 시작과 XOR 문제 (0) 2020.02.12 ML lec 07-2: Training/Testing 데이터 셋 (0) 2020.02.12 ML lec 07-1: 학습 rate, Overfitting, 그리고 일반화 (Regularization) (0) 2020.02.11 ML lec 06-1 Softmax Regression: 기본 개념 소개 (0) 2020.02.11 ML lec 06-2 Softmax classifier 의 cost함수 (0) 2020.02.11