AI Tech - Naver Boostcamp/3. Pytorch

1. Introduction to PyTorch

Pinocchio 2021. 8. 18. 15:01

Deep Learning Framework

Pytorch: Deep Learning Framework

프레임워크 사용하지 않고 직접 짰던 케이스: 의료 AI Startup 뷰노, 한동대학교 등 → 정말 힘듦

Book Recommendation: 밑바닥부터 시작하는 딥러닝 3

수 많은 Framework들이 있음.

ex. mxnet (아마존 지원) 등

Pytorch VS Tensorflow

그러나 현재 리딩하는 프레임 워크는 Pytorch(Facebook), Tensorflow(Google)

Pytorch = Python + torch 로 torch와는 아예 다름

디지털 마케팅 분야에서 Google(35%), Facebook(20%)로 Duopoly 상태

연산 과정을 다음과 같이 Graph로 표현할 때

g=(x+y)zg = (x + y) * z

Pytorch: Dynamic computation graph = DCG = Define by run: 실행을 하면서 그래프를 생성하는 방식

Tensorflow: Define and run: 그래프를 먼저 정의하고 실행 시점에 data feed. Tensorflow는 Pytorch의 DCG에 대응하기 위한 Eager execution을 만들었으나 혹평을 받음


Tensorflow는 Google 도구나 Production, Cloud, Multi-GPU에 강점.

Pytorch는 논문 분야 혹은 비교적 낮은 learning curve로 처음 배울 때 좀 더 적합함.

Keras

  • 언어, wrapper.
  • 기본적으로 shell이 있고 interface가 있어서 user가 사용하기 쉽게 해 놓았음.
  • Keras로 Tensorflow, Pytorch 등을 쉽게 쓸 수 있게 해줌.
  • 현재는 Tensorflow와 Keras가 사실상 합쳐짐.
  • Book: Keras 창시자에게 배우는 Deep Learning
  • 굉장히 user-friendly한 쉬운 프레임워크

AI conferences

  • CVPR: CV, Computer Vision
  • ECCV: CV, Computer Vision
  • ACL: NLP, Annual Meeting of the Association for Computational Linguistics
  • NAACL: NLP, Annual Conference of the North American Chapter of the Association for Computational Linguistics
  • ICML: ML, International Conference on Machine Learning
  • NIPS: ML, Neural Information Processing Systems
  • ICLR: ML, International Conference on Learning Representations
  • ICCV: CV, the premier international computer vision event
  • EMNLP: NLP, Empirical Methods in Natural Language Processing

Why Pytorch

  • Define by Run 의 장점
    • 즉시 확인 가능 → pythonic code
  • GPU support, Good API and community
  • 사용하기 편한 장점이 가장 큼
  • TF는 production 과 scalability의 장점
  • Numpy + AutoGrad + Function
    • Numpy 구조를 가지는 Tensor 객체로 array 표현
    • 자동미분을 지원하여 DL 연산을 지원
    • 다양한 형태의 DL을 지원하는 함수와 모델을 지원함