2017 tensor flow dev summit (Sequence Models and the RNN API)
작성된 자료로 2017년 2월 22일 오후 8시 부터 Maru180에서
GDG Seoul 에서 주최한 2017 Tensorflow Dev Summit Extended Seou에서
발표를 진행
Sequence Models and the RNN API 정리 내역 공유
사내 스터디용으로 공부하며 만든 발표 자료입니다. 부족한 부분이 있을 수도 있으니 알려주시면 정정하도록 하겠습니다.
*슬라이드 6에 나오는 classical CNN architecture(뒤에도 계속 나옴)에서 ReLU - Pool - ReLu에서 뒤에 나오는 ReLU는 잘못된 표현입니다. ReLU - Pool에서 ReLU 계산을 또 하는 건 redundant 하기 때문입니다(Kyung Mo Kweon 피드백 감사합니다)
Deep Learning Into Advance - 1. Image, ConvNetHyojun Kim
[본 자료는 AB180 사내 스터디의 일환으로 제작되었습니다.]
딥러닝에 대한 기초적인 이해 및 적용 예시를 알아보고, 인사이트를 공유하기 위해 만들었습니다. 첫번째로 딥러닝이 이미지 프로세싱에 적용된 방식 및, Convolutional Neural Network (ConvNet)의 기초에 대해 다루었습니다.
* 본 스터디 자료는 Stanford 강좌인 CS231n (http://cs231n.stanford.edu)의 내용을 참고했습니다.
파이썬 데이터과학 레벨2 - 데이터 시각화와 실전 데이터분석, 그리고 머신러닝 입문 (2020년 이태영)Tae Young Lee
파이썬 데이터과학 레벨2 - 데이터 시각화와 실전 데이터분석, 그리고 머신러닝 입문 (2020년 이태영)
- 코스피 LG유플러스 주가분석, 대한민국 부동산 분석, 강남 아파트 매매 분석, VISA 보고서 분석, 워드클라우드 등
- 국내 어떤 책에서도 다루지 않는 진짜 데이터분석 강의
- (귀차니즘에..) 소수 금융권/대기업/공기업에게만 강의된 자료
Slides based on "Introduction to Machine Learning with Python" by Andreas Muller and Sarah Guido for Hongdae Machine Learning Study(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)
홍대 머신 러닝 스터디(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)의 "파이썬 라이브러리를 활용한 머신러닝"(옮긴이 박해선) 슬라이드 자료.
파이썬 데이터과학 레벨2 - 데이터 시각화와 실전 데이터분석, 그리고 머신러닝 입문 (2020년 이태영)Tae Young Lee
파이썬 데이터과학 레벨2 - 데이터 시각화와 실전 데이터분석, 그리고 머신러닝 입문 (2020년 이태영)
- 코스피 LG유플러스 주가분석, 대한민국 부동산 분석, 강남 아파트 매매 분석, VISA 보고서 분석, 워드클라우드 등
- 국내 어떤 책에서도 다루지 않는 진짜 데이터분석 강의
- (귀차니즘에..) 소수 금융권/대기업/공기업에게만 강의된 자료
Slides based on "Introduction to Machine Learning with Python" by Andreas Muller and Sarah Guido for Hongdae Machine Learning Study(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)
홍대 머신 러닝 스터디(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)의 "파이썬 라이브러리를 활용한 머신러닝"(옮긴이 박해선) 슬라이드 자료.
골빈해커(김진중) 지음 | 한빛미디어 | 22,000원
텐서플로 코드로 맛보는 딥러닝 핵심 개념!
이 책은 신경망 기초부터 CNN, Autoencoder, GAN, RNN, DQN까지 딥러닝의 가장 기본이 되는 모델들을 직접 구현하며 몸으로 익히도록 구성했습니다. 이론을 깊이 파헤치기보다는 다양한 딥러닝 모델의 기초 개념과 기본적인 텐서플로 사용법을 학습하는 데 초점을 두고, 각 모델의 논문에 수록된 복잡한 코드들을 그 핵심이 잘 드러나도록 재구현했습니다. 간결해진 예제들이 여러분을 딥러닝과 텐서플로의 세계로 즐겁고 편안히 모실 것입니다.
Project_Automatic Photo Classification Web ServiceHyo jeong Lee
The document describes a web application called Girlclash that provides automatic photo classification. It uses a convolutional neural network model trained on a dataset of over 40,000 images across 5 categories. The system is built with Django and TensorFlow, and uses tools like CNNs, max pooling and ReLU activation to achieve over 85% accuracy. Areas for further improvement include reducing misclassifications, adding download and member features, and expanding to apps and social media recommendations.
The document discusses a swap-aware JVM garbage collection policy and parallel logging. It proposes making the default GC policy in Java 8 aware of whether data has been swapped to reduce long GC times due to swap I/O. The full GC process of ParallelCompact is described. For swap-aware GC, solutions are proposed to either skip compacting swapped live data or avoid compaction by remapping virtual memory. For parallel logging in databases, the document discusses implementing a data structure called Grasshopper to support parallel logging in the Shore-MT database and evaluating its performance.
The document discusses a swap-aware JVM garbage collection (GC) policy. It begins with an overview of the standard full GC process of mark, summarize, and compact phases. It then analyzes the issues with the default GC policy not considering whether data is swapped, which can result in long GC times due to swap I/O during compaction. The proposed solution is a swap-aware GC policy that checks for swapped data using pagemap summaries and skips copying swapped live data during compaction to avoid unnecessary swap I/O. Evaluation involves microbenchmarks and real workloads like Neo4j, Spark, and deep learning to measure the performance benefits. Future work includes optimizing the overhead of checking for swapped data and
This progress report discusses the development of a swap-aware garbage collection policy for the Java virtual machine. Currently, the default GC policy does not consider whether data has been swapped to disk, resulting in long garbage collection times. The report proposes a solution that checks page metadata to identify swapped objects and skips compacting these objects to reduce swap I/O. It describes initial attempts to implement the solution and evaluate it using simple Java programs and real workloads like deep learning frameworks. Future work includes optimizing the GC policy and evaluating performance on additional benchmarks and real applications.
1. The document reports on progress of a swap-aware JVM garbage collector that allows free space between live objects using dummy objects.
2. It describes the multi-threaded marking, compacting, and post-compacting phases of the GC and a problem with dense object prefixes becoming unavailable.
3. Benchmark results are shown for the SPECjvm2008 benchmark suite run with the GC, reporting swap I/O and GC times for various workloads.
- The document describes progress on a swap-aware JVM garbage collection policy.
- An initial implementation was summarized, and issues with allowing free space between live objects were identified.
- A page-level reimplementation is underway, informed by related work. Validation tests using Deeplearning4Java and Spark workloads are planned.
- Future work includes optimizing the GC policy, adding journaling to the Lustre file system, and additional validation experiments.
Paper_Scalable database logging for multicoresHyo jeong Lee
The document presents a scalable logging method for modern databases called Eleda, which addresses the limitations of central log buffers in multicore environments. By utilizing concurrent data structures, Eleda enhances transaction throughput to over 3.9 million transactions per second while ensuring guaranteed atomicity and durability. The implementation is demonstrated through integration with existing systems like WiredTiger and Shore-MT, illustrating significant performance improvements.
Paper_An Efficient Garbage Collection in Java Virtual Machine via Swap I/O O...Hyo jeong Lee
The progress report discusses advancements in garbage collection for the Java Virtual Machine using swap I/O optimization, detailing completed tasks and planned evaluations. It highlights performance improvements in terms of garbage collection rates, throughput, and execution time across industry-standard benchmarks. Future work includes optimizing kernel APIs and implementing fine-grained compaction to address fragmentation issues.
Paper_Design of Swap-aware Java Virtual Machine Garbage Collector PolicyHyo jeong Lee
The document discusses the design of a swap-aware garbage collector policy for the Java Virtual Machine (JVM) geared towards enhancing performance during memory swapping events. It presents two solutions: using an LRU list to manage accessed objects and leveraging Linux's pagemap to differentiate between swapped and live objects during garbage collection. The author emphasizes the necessity for current JVM garbage collection policies to consider the Linux system-level swap impact and plans to implement their proposed solutions on selected workloads.
4. 딥러닝과 텐서플로
딥러닝
■ 신경망 알고리즘을 주로 사
용
– 퍼셉트론 알고리즘
■ CNN과 RNN
– CNN(합성곱 신경망)
이미지 내의 물체 인식
– RNN(순환 신경망)
번역과 음성인식
텐서플로
■ 최근의 딥러닝 연구에 널
리 사용되는 라이브러리
5. 텐서플로
■ 기본 구조
– 데이터 플로 그래프를 사용하여 수치 연산을 수행한다.
그래프의 노드 : 수학 연산
그래프의 에지 : 다차원 데이터 배열
– 수치 연산을 기호로 표현한 그래프 구조를 만들고 처리한다.
■ 장점
– CPU, GPU의 장점 모두 이용 가능
– 모바일 플랫폼, 64비트 리눅스에서 모두 이용 가능
– 텐서보드 모듈
많은 정보를 모니터링하고 디스플레이 해준다.
참고 : https://goo.gl/6Cyr20
6. 텐서플로 vs 텐서플로 서빙
텐서플로
■ 입력된 데이터를 가지고
머신러닝 알고리즘을 만
들어 모델을 훈련시켜준
다.
텐서플로 서빙
■ 훈련된 모델에 클라이언
트로부터 들어오는 입력
데이터를 반영해준다.
9. #1 docker 설치와 환경 설정
■ 텐서플로는 리눅스에서 작동하므로 가상 머신 역할을 해 주는
docker tool box를 설치
■ docker quick start terminal 실행
– docker-machine create vdocker –d virtualbox
최초 1회 실행!
– docker-machine ls
vdocker의 상태가 Running인지 확인한다
– Stopped이라면 docker-machine start vdocker
■ 터미널 종료
11. #2 cmd에서 docker 이미지 다운로드
■ cmd 실행
■ 아래 명령 입력 (띄어쓰기에 주의한다.)
– FOR /f "tokens=*" %i IN ('docker-machine env --shell
cmd default') DO %i
■ docker 이미지 다운로드 (최초 1회 실행!)
– docker run –v /c/Users/ML:/home/ML –it python bash
자신의 파이참 프로젝트 경로를 제대로 써 주기
■ 생성된 이미지명 확인하기
– 확인 : docker ps –a
– 삭제 : docker ps rm (image name)
안된다면 docker stop (image name) 하고 삭제 명령 재입력
12. #3 생성된 컨테이너 입장
■ 재시동 및 입장
– docker restart (image name)
– docker attach (image name) + Enter (약간의 버그!)
안되면 docker start (image name) 입력 후 attach 실행
13. #4 텐서플로 설치
■ https://www.tensorflow.org/versions/r0.11/get_started/os_set
up.html
– 자신의 컴퓨터 환경에 맞는 명령어 수행하여 텐서플로 설치
■ 완료되면 자신의 프로젝트 폴더로 이동하여 프로젝트를
실행해본다!
– cd (path)
– python (file name)
파일명 앞 부분까지 입력하고 Tab키를 누르면 해당 파일명 자동 완성
15. #6 간단한 예제 실행
: 알고리즘 기술 > 세션 생성 > 연산 실행!
■ placeholder
– 프로그램 실행 중 값을 변경할 수
있는 ‘심벌릭’ 변수
■ tensor
– 동적 크기 갖는 다차원 데이터 배
열
■ mul()
– 텐서 조작을 위해 텐서플로가 제
공하는 많은 수학 연산 함수 중
하나
■ Session()
– 세션 생성함으로써 프로그램이
텐서플로 라이브러리와 상호작
용
16. Note that…
■ 텐서플로에서 연산과 데이터에 대한 모든 정보는 그래프
구조 안에 저장됨
– 노드 : 수학 연산
데이터 입력과 출력의 위치를 표현하거나 저장된 변수를 읽고 씀
– 에지 : 입력 값과 출력 값으로 연결된 노드 간의 관계를 표현 + 텐
서플로의 기본 자료구조인 텐서 운반!
17. 선형 회귀 분석
변수 간의 관계에 대한 모델
비용 함수와 경사 하강법 알고리즘
알고리즘 실행
18. 선형 회귀 분석(linear regression)이란?
■ 변수들 사이의 관계를 분석하는 데 사용하는 통계학적 방
법
■ 독립변수 xi, 상수항 b와 종속변수 y간의 관계를 모델링
■ 단순회귀와 다중회귀
– 단순회귀 : 두 변수 간의 관계인 경우
– 다중회귀 : 여러 개의 변수를 다루는 경우
19. 변수 간의 관계에 대한 모델 : y =
W*x+b
■ 이차원 좌표계에 데이터를 생성하는 파이썬 프로그램 작
성
■ 위 샘플 데이터에 맞는 최적의 직선을 찾는 문제
20. 비용 함수(cost function)와 경사 하강법
알고리즘(gradient descent)
■ 문제 : 입력 데이터로부터 출력을 추정할 수 있는 학습 알
고리즘을 훈련시키기
– W와 b 두 개의 매개변수로 모델 표현 가능
– 입력 데이터 x_data를 이용해 출력 데이터 y_data를 만들 수 있는
최적의 매개변수 W와 b를 찾기
21. 비용 함수와 경사 하강법 알고리즘
■ 비용함수(=오차함수)
– 반복이 일어날 때마다 개선 여부를 확인하기 위해 얼마나 좋은
(나쁜) 직선인지 측정
– W와 b를 매개변수로 받아 직선이 얼마나 데이터에 잘 맞는지를
기준으로 오차 값을 리턴
여기서는 비용함수로 평균제곱오차(mean square error) 사용
– 실제 값과 알고리즘이 반복마다 추정한 값 사이의 거리를 오차로 하
는 값의 평균
– 비용함수 최소화 = 적합한 모델 찾는 것
22. 비용 함수와 경사 하강법 알고리즘
■ 경사하강법
– 일련의 매개변수로 된 함수가 주어지면 초기 시작점에서 함수의
값이 최소화 되는 방향으로 매개변수를 변경하는 것을 반복적으
로 수행하는 알고리즘
함수의 기울기를 음의 방향으로 진행하면서 반복적으로 최적화 수행
거리 값 제곱 : 양의 값을 만들기 위해
비용함수는 미분 가능 : 기울기 계산해야 하므로
– 매개변수(W, b)의 초기 값에서 시작하여 W, b를 수정해가며 비
용함수를 최소화하는 변수 값을 찾아낸다!
23. 비용 함수와 경사 하강법 알고리즘
■ 경사하강법의 실제 연산
– 그래프 구성
바닥의 2차원 공간 : W, b로 구
성
– 각 점은 하나의 직선 표현
높이 : 해당 직선에 대한 오차
– 연산 : 평면의 한 지점에서 시작
해 더 작은 오차를 갖는 직선을
찾아 이동!
비용 함수의 기울기를 계산
– W와 b에 대한 편미분 연산
기울기는 오차가 낮은 곳의 방
향을 가리킴
24. 알고리즘 실행
■ data set 생성
■ train에 경사하강법 적용한 옵티마이저 할당
■ train을 여러 번 반복하여 적합한 W, b 찾기