• Stars
    star
    329
  • Rank 128,030 (Top 3 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created almost 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Thinking in tensors, writing in PyTorch (a hands-on deep learning intro)

Thinking in tensors, writing in PyTorch

A hands-on deep learning introduction, from pieces.

For an interactive, installation-free version, use Colab: https://colab.research.google.com/github/stared/thinking-in-tensors-writing-in-pytorch/

By Piotr Migdał et al. (Weronika Ormaniec, possibly others)

“Study hard what interests you the most in the most undisciplined, irreverent and original manner possible.” ― Richard Feynman

“Scientists start out doing work that's perfect, in the sense that they're just trying to reproduce work someone else has already done for them. Eventually, they get to the point where they can do original work. Whereas hackers, from the start, are doing original work; it's just very bad. So hackers start original, and get good, and scientists start good, and get original.” - Paul Graham in Hackers and Painters

Supporters

This project supported by: Jacek Migdał, Marek Cichy. Join the sponsors - show your ❤️ and support! It will give me time and energy to work on this project!

This project benefited from University of Silesia in Katowice course, which they let me to open source.

What's that?

Mathematical concepts behind deep learning using PyTorch 1.0.

  • All math equations as PyTorch code
  • Explicit, minimalistic examples
  • Jupyter Notebook for interactivity
  • “On the shoulders of giants” - I link and refer to the best materials I know
  • Fully open source & open for collaboration (I guess I will go with MIT for code, CC-BY for anything else)

Why not something else?

There are quite a few practical introductions to deep learning. I recommend Deep Learning in Python by François Chollet (the Keras author). Or you want, you can classify small pictures, or extraterrestrial beings, today.

When it comes to the mathematical background, Deep Learning Book by Ian Goodfellow et al. is a great starting point, giving a lot of overview. Though, it requires a lot of interest in maths. Convolutional networks start well after page 300.

I struggled to find something in the middle ground - showing mathematical foundations of deep learning, step by step, at the same time translating it into code. The closest example is CS231n: Convolutional Neural Networks for Visual Recognition (which is, IMHO, a masterpiece). Though, I believe that instead of using NumPy we can use PyTorch, giving a smooth transition between mathematic ideas and a practical, working code.

Of course, there are quite a few awesome posts, notebooks and visualizations. I try to link to the ones that are useful for reader. In particular, I maintain a collaborative list of Interactive Machine Learning, Deep Learning and Statistics websites.

Contribute!

Crucially, this course is for you, the reader. If you are interested in one topic, let us know! There is nothing more inspiring that eager readers.

Style

  • Start with concrete examples first
  • First 1d, then more
  • Equations in LaTeX AND PyTorch
  • x.matmul(y).pow(2).sum() not torch.sum(torch.matmul(x, y) ** 2)

Adverts

A few links of mine:

More Repositories

1

science-based-games-list

Science-based games - a collaborative list
1,577
star
2

livelossplot

Live training loss plot in Jupyter Notebook for Keras, PyTorch and others
Python
1,294
star
3

interactive-machine-learning-list

A collaborative list of interactive Machine Learning, Deep Learning and Statistics websites
JavaScript
432
star
4

quantum-game

Quantum Game (old version) - a puzzle game with real quantum mechanics in a browser
JavaScript
343
star
5

keras-sequential-ascii

ASCII summary for simple sequential models in Keras
Jupyter Notebook
126
star
6

tagoverflow

An interactive map of Stack Exchange tags for all sites.
JavaScript
125
star
7

tag-graph-map-of-stackexchange

Generates map in form of a graph from tags on StackExchange sites, e.g. StackOverflow.
Python
53
star
8

weltschmerz

Weltschmerz by age - "I am X years old and... [Google autocomplete]"
JavaScript
23
star
9

keras-mini-examples

Small Keras examples to get you started
Jupyter Notebook
20
star
10

data-science-pl

Data Science PL knowledge base / baza wiedzy
14
star
11

qubism

Self-similar visualization of many-body wavefunctions (and also: time series, DNA, proteins).
Mathematica
13
star
12

which-ml-are-you

Which ML are you?
Vue
12
star
13

jekyll-blog-pre-2022

Old Piotr Migdał's blog, in Jekyll, pre 2022
HTML
9
star
14

delab-matury

Analiza i wizualizacja danych maturalnych z lat 2010-2014
Jupyter Notebook
8
star
15

wizualizacja-wolnych-lektur

Themes and colours of readings from wolnelektury.pl - a visualization in D3.js.
Python
8
star
16

kfnrd_viz

Wizualizacje danych Krajowego Funduszu na rzecz Dzieci
JavaScript
7
star
17

cv-resume

My Curriculum Vitae / Resume
TeX
7
star
18

uw-ml-python-2017

Jupyter Notebook
6
star
19

hackart-you-in-artwork

Skarby muzeum (1 miejsce w HackArt Muzeum Narodowego w Warszawie)
Jupyter Notebook
6
star
20

pytorch-intro

Intro to PyTorch stuff; now internal, for interns
Jupyter Notebook
5
star
21

gossipingcommons

Gossiping Commons - “don't tell alike” and “no author, please” open licenses
5
star
22

stable-diffusion-keras-m1-gpu

Stable diffusion image generation with KerasCV for Macbook M1 GPU
Jupyter Notebook
4
star
23

se-api-py

A lightweight Python wrapper for StackExchange API v2.1
Python
4
star
24

matrix-decomposition-viz

Work in progress
JavaScript
4
star
25

talk_20160119_jupyter_notebook

Presentation on Jupyter Notebook (IPython Notebook + R) - at Data Science Warsaw Meetup
Jupyter Notebook
3
star
26

old-blog-gridsome-pre-2024

Old Piotr Migdał blog - Gridsome, 2022-2024
Vue
3
star
27

A-numerical-model-of-the-Mafia-game

Party game Mafia (a.k.a. Werewolf) investigated numerically.
Python
3
star
28

menger-vr

Menger Sponge - 3D Fractal VR - A-Frame
HTML
3
star
29

piotr_migdal_resume

Piotr Migdal Resume 2022+, LaTeX AltaCV template
TeX
2
star
30

dl-diag-d3js

Deep Learning architecture diagrams - a D3.js library
JavaScript
2
star
31

random_data_explorations

Random data explorations
Jupyter Notebook
2
star
32

art-tensor-diagrams

Tensor Diagrams expository article in RDMarkdown Distill
TeX
2
star
33

python-neuroaspects-2016

First steps with data analysis in Python - Aspects of Neuroscience 2016
Jupyter Notebook
2
star
34

trypo-brainhack

Jupyter Notebook
1
star
35

diffraction-gratings

Diffraction Gratings, Moire Pattern and Spiral Zone Plates - in PostScript
1
star
36

pypi-search-meteor

PyPI interactive package search in Meteor
JavaScript
1
star
37

stared.github.io

Personal website and blog by Piotr Migdał, in Nuxt 3 Content
Vue
1
star
38

szkolomat_dane

Szkołomat - dane
1
star
39

yarn-adding-pure-typescript-package-example

TypeScript
1
star
40

trolleython

Trolley with Friends - a cynical game (in dev)
JavaScript
1
star
41

nalogi-viz

Wizualizacja nałogów - co dają, co zwalczają (przyciągające się słowa)
Jupyter Notebook
1
star