일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- InstructPix2Pix
- AI Security
- TensorFlow Object Detection Error
- CARLA simulator
- Docker
- TensorFlow Object Detection API install
- Carla
- Linux build
- TensorFlow Object Detection Model Build
- Paper Analysis
- 커스텀 애니메이션 적용
- Git
- 논문분석
- 개발흐름
- 사회초년생 추천독서
- Custom Animation
- Branch 활용 개발
- Towards Deep Learning Models Resistant to Adversarial Attacks
- 리눅스 빌드
- paper review
- DOTA dataset
- Object Detection Dataset 생성
- DACON
- 객체 탐지
- VOC 변환
- 논문 분석
- object detection
- 크롤링
- 기능과 역할
- TensorFlow Object Detection 사용예시
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