Skip to content

Commit

Permalink
2019 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalomcorreia committed Oct 11, 2019
1 parent e384d07 commit 329f736
Show file tree
Hide file tree
Showing 8 changed files with 1,911 additions and 1,305 deletions.
169 changes: 169 additions & 0 deletions 00-intro.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Introduction\n",
"\n",
"Material for this tutorial is here: !!LINK\n",
"\n",
"**Note:**\n",
"If you use PyTorch on a daily basis, you will most probably not learn a lot during this tutorial.\n",
"\n",
"**Goals:**\n",
"- understand PyTorch concepts (e.g. autograd, broadcasting, ...) and understand what it can and cannot do\n",
"- be aware of some handy tools/libraries\n",
"- be able to create simple neural networks\n",
"- learn the some tools that will help to code more complicated models in the future"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](img/the_real_reason.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# PyTorch Overview\n",
"\n",
"\n",
"> \"PyTorch - Tensors and Dynamic neural networks in Python\n",
"with strong GPU acceleration.\n",
"PyTorch is a deep learning framework for fast, flexible experimentation.\"\n",
">\n",
"> -- https://pytorch.org/*\n",
"\n",
"This was the tagline prior to PyTorch 1.0.\n",
"Now it's:\n",
"\n",
"> \"PyTorch - From Research To Production\n",
"> \n",
"> An open source deep learning platform that provides a seamless path from research prototyping to production deployment.\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## \"Build by run\" - what is that and why do I care?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](img/dynamic_graph.gif)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A very practical reason to use PyTorch:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import torch\n",
"from IPython.core.debugger import set_trace\n",
"\n",
"def f(x):\n",
" res = x + x\n",
" # set_trace() # <-- :o\n",
" return res\n",
"\n",
"x = torch.randn(1, 10)\n",
"f(x)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## TensorFlow and PyTorch\n",
"- static vs dynamic\n",
"- production vs prototyping "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Other neural network toolkits you might want to check out\n",
"- TensorFlow\n",
"- MXNet\n",
"- Keras\n",
"- CNTK\n",
"- Chainer\n",
"- caffe\n",
"- caffe2\n",
"- dynet\n",
"- many many more\n",
"\n",
"All of them are good!\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Useful Links\n",
"\n",
"- Twitter: https://twitter.com/PyTorch\n",
"- Forum: https://discuss.pytorch.org/\n",
"- Tutorials: https://pytorch.org/tutorials/\n",
"- Examples: https://github.com/pytorch/examples\n",
"- API Reference: https://pytorch.org/docs/stable/index.html\n",
"- Torchvision: https://pytorch.org/docs/stable/torchvision/index.html\n",
"- PyTorch Text: https://github.com/pytorch/text\n",
"- PyTorch Audio: https://github.com/pytorch/audio\n",
"\n",
"## Tutorials I based this on...\n",
"\n",
"- https://github.com/sotte/pytorch_tutorial\n",
"- https://github.com/erickrf/pytorch-lecture"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Some Jupyter Notebook shortcuts that might be useful:\n",
"\n",
"- `A` and `B` create a cell above and below, respectively\n",
"- `Shift+Enter` runs the cell and jumps to the next one/creates one below\n",
"- `D`, `D` deletes the cell"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit 329f736

Please sign in to comment.