반응형
docker로 python 실행 & container 접속
tensorflow 설치
pip install tensorflow
tensorflow-demo.py 코드 작성
vi tensorflow-demo.py
import tensorflow as tf
# 상수 정의
a = tf.constant(2)
b = tf.constant(3)
# 덧셈 연산
result = a + b
# 결과 출력
print("a + b =", result.numpy())
tensorflow-demo.py 실행
$ python tensorflow-demo.py
a + b = 5
반응형
'Development > Python' 카테고리의 다른 글
[Python] 설치 (0) | 2021.05.16 |
---|---|
[Python] MySQL (0) | 2020.12.30 |
[Python] locust (0) | 2020.12.30 |
[Python] 가상환경 (0) | 2020.12.30 |
[Python] 기본 문법 (0) | 2020.12.30 |