adam paszke sam gross soumith chintala francisco massa
play

Adam Paszke, Sam Gross , Soumith Chintala , Francisco Massa, Adam - PowerPoint PPT Presentation

Adam Paszke, Sam Gross , Soumith Chintala , Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Alban Desmaison, Andreas Kopf, Edward Yang, Zach Devito, Martin Raison, Alykhan Tejani, Sasank


  1. Adam Paszke, Sam Gross , Soumith Chintala , Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Alban Desmaison, Andreas Kopf, Edward Yang, Zach Devito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy & Team

  2. What is PyTorch?

  3. What is PyTorch? automatic di ff erentiation Ndarray library gradient based Utilities with GPU support engine optimization package (data loading, etc.) Deep Learning Numpy-alternative Reinforcement Learning

  4. ndarray library • np.ndarray <-> torch.Tensor • 200+ operations, similar to numpy • very fast acceleration on NVIDIA GPUs

  5. ndarray library PyTorch Numpy

  6. ndarray / Tensor library

  7. ndarray / Tensor library

  8. ndarray / Tensor library

  9. ndarray / Tensor library

  10. NumPy bridge

  11. NumPy bridge Zero memory-copy very e ffi cient

  12. NumPy bridge

  13. NumPy bridge

  14. Seamless GPU Tensors

  15. automatic di ff erentiation engine for deep learning and reinforcement learning

  16. PyTorch Autograd from torch.autograd import Variable

  17. PyTorch Autograd from torch.autograd import Variable x = Variable(torch.randn(1, 10)) prev_h = Variable(torch.randn(1, 20)) W_h = Variable(torch.randn(20, 20)) W_x = Variable(torch.randn(20, 10))

  18. PyTorch Autograd from torch.autograd import Variable x = Variable(torch.randn(1, 10)) MM MM prev_h = Variable(torch.randn(1, 20)) W_h = Variable(torch.randn(20, 20)) W_x = Variable(torch.randn(20, 10)) i2h = torch.mm(W_x, x.t()) h2h = torch.mm(W_h, prev_h.t())

  19. PyTorch Autograd from torch.autograd import Variable x = Variable(torch.randn(1, 10)) MM MM prev_h = Variable(torch.randn(1, 20)) W_h = Variable(torch.randn(20, 20)) W_x = Variable(torch.randn(20, 10)) i2h = torch.mm(W_x, x.t()) h2h = torch.mm(W_h, prev_h.t()) next_h = i2h + h2h

  20. PyTorch Autograd from torch.autograd import Variable x = Variable(torch.randn(1, 10)) MM MM prev_h = Variable(torch.randn(1, 20)) W_h = Variable(torch.randn(20, 20)) W_x = Variable(torch.randn(20, 10)) Add i2h = torch.mm(W_x, x.t()) h2h = torch.mm(W_h, prev_h.t()) next_h = i2h + h2h

  21. PyTorch Autograd from torch.autograd import Variable x = Variable(torch.randn(1, 10)) MM MM prev_h = Variable(torch.randn(1, 20)) W_h = Variable(torch.randn(20, 20)) W_x = Variable(torch.randn(20, 10)) Add i2h = torch.mm(W_x, x.t()) h2h = torch.mm(W_h, prev_h.t()) next_h = i2h + h2h Tanh next_h = next_h.tanh()

  22. PyTorch Autograd from torch.autograd import Variable x = Variable(torch.randn(1, 10)) MM MM prev_h = Variable(torch.randn(1, 20)) W_h = Variable(torch.randn(20, 20)) W_x = Variable(torch.randn(20, 10)) Add i2h = torch.mm(W_x, x.t()) h2h = torch.mm(W_h, prev_h.t()) next_h = i2h + h2h Tanh next_h = next_h.tanh() next_h.backward(torch.ones(1, 20))

  23. Neural Networks

  24. Neural Networks

  25. Neural Networks

  26. Optimization package SGD, Adagrad, RMSProp, LBFGS, etc.

  27. Work items in practice Implementing Checkpointing Writing Building models Training loop models Dataset loaders Interfacing with Dealing with Building Building optimizers environments GPUs Baselines

  28. Work items in practice Implementing Checkpointing Writing Building models Training loop models Dataset loaders Python + PyTorch - an environment to do all of this Interfacing with Dealing with Building Building optimizers environments GPUs Baselines

  29. Writing Data Loaders • every dataset is slightly di ff erently formatted

  30. Writing Data Loaders • every dataset is slightly di ff erently formatted • have to be preprocessed and normalized di ff erently

  31. Writing Data Loaders • every dataset is slightly di ff erently formatted • have to be preprocessed and normalized di ff erently • need a multithreaded Data loader to feed GPUs fast enough

  32. Writing Data Loaders PyTorch solution: • share data loaders across the community!

  33. Writing Data Loaders PyTorch solution: • share data loaders across the community!

  34. Writing Data Loaders PyTorch solution: • use regular Python to write Datasets: leverage existing Python code

  35. Writing Data Loaders PyTorch solution: • use regular Python to write Datasets: leverage existing Python code Example: ParlAI

  36. Writing Data Loaders PyTorch solution: • Code in practice

  37. Writing Data Loaders PyTorch solution: • Code in practice Research Upcoming Core Philisophy Pain Points Workflows Features

  38. Writing Data Loaders PyTorch solution: • Code in practice Research Upcoming Core Philisophy Pain Points Workflows Features

  39. Interfacing with environments Cars Video games Internet

  40. Interfacing with environments Cars Video games Pretty much every environment provides a Python API

  41. Interfacing with environments Cars Video games Natively interact with the environment directly

  42. Debugging • PyTorch is a Python extension

  43. Debugging • PyTorch is a Python extension • Use your favorite Python debugger

  44. Debugging • PyTorch is a Python extension • Use your favorite Python debugger

  45. Debugging • PyTorch is a Python extension • Use your favorite Python debugger • Use the most popular debugger:

  46. Debugging • PyTorch is a Python extension • Use your favorite Python debugger • Use the most popular debugger: print(foo)

  47. Identifying bottlenecks • PyTorch is a Python extension • Use your favorite Python profiler

  48. Identifying bottlenecks • PyTorch is a Python extension • Use your favorite Python profiler: Line_Profiler

  49. Compilation Time • PyTorch is written for the impatient

  50. Compilation Time • PyTorch is written for the impatient • Absolutely no compilation time when writing your scripts whatsoever

  51. Compilation Time • PyTorch is written for the impatient • Absolutely no compilation time when writing your scripts whatsoever • All core kernels are pre-compiled

  52. Distributed PyTorch • MPI style distributed communication • Broadcast Tensors to other nodes • Reduce Tensors among nodes - for example: sum gradients among all nodes

  53. Visualization TensorBoard-PyTorch Visdom https://github.com/lanpa/tensorboard-pytorch https://github.com/facebookresearch/visdom

  54. Ecosystem • Use the entire Python ecosystem at your will

  55. Ecosystem • Use the entire Python ecosystem at your will • Including SciPy, Scikit-Learn, etc.

  56. Ecosystem • Use the entire Python ecosystem at your will • Including SciPy, Scikit-Learn, etc.

  57. Ecosystem • A shared model-zoo:

  58. Ecosystem • A shared model-zoo:

  59. Ecosystem • Probabilistic Programming github.com/probtorch/probtorch http://pyro.ai/

  60. Ecosystem • Gaussian Processes https://github.com/cornellius-gp/gpytorch

  61. Ecosystem • QRNN - 2x to 17x faster than LSTM https://github.com/salesforce/pytorch-qrnn

  62. Ecosystem • CycleGAN, pix2pix https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix

  63. Ecosystem • Machine Translation https://github.com/OpenNMT/OpenNMT-py https://github.com/facebookresearch/fairseq-py

  64. Ecosystem http://allennlp.org/ • AllenNLP

  65. Ecosystem • Pix2PixHD https://github.com/NVIDIA/pix2pixHD

  66. Ecosystem • Sentiment Discovery https://github.com/NVIDIA/sentiment-discovery

  67. Ecosystem • FlowNet2: Optical Flow Estimation with Deep Networks https://github.com/NVIDIA/flownet2-pytorch

  68. With ❤ from http://pytorch.org

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend