일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Object Detection Dataset 생성
- Linux build
- 기능과 역할
- 객체 탐지
- Custom Animation
- Carla
- TensorFlow Object Detection Model Build
- Towards Deep Learning Models Resistant to Adversarial Attacks
- TensorFlow Object Detection API install
- Git
- TensorFlow Object Detection Error
- 커스텀 애니메이션 적용
- TensorFlow Object Detection 사용예시
- InstructPix2Pix
- AI Security
- DOTA dataset
- paper review
- Paper Analysis
- 리눅스 빌드
- Branch 활용 개발
- object detection
- CARLA simulator
- 논문분석
- Docker
- 논문 분석
- DACON
- 사회초년생 추천독서
- 개발흐름
- 크롤링
- VOC 변환
Archives
- Today
- Total
JSP's Deep learning
[Setting] 0. TensorFlow 메모리 관리 코드 본문
* TensorFlow 메모리 관리 코드
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
tf.config.experimental.set_memory_growth(gpus[0], True)
except RuntimeError as e:
# 프로그램 시작시에 메모리 증가가 설정되어야만 합니다
print(e)
- TensorFlow-gpu 라이브러리는 코드 실행 시 잔여 GPU memory을 사용가능한 최대치로 할당해버린다.
- 따라서 위의 코드를 설정하지 않으면, GPU memory을 효율적으로 사용하지 못하기 때문에, 해당 코드로 GPU memory을 필요한만큼 할당할 수 있도록 한다.
(* Stack 형식으로 메모리를 할당한다)
Comments