Skip to content

Commit

Permalink
upate slides
Browse files Browse the repository at this point in the history
  • Loading branch information
dboyliao committed Jul 30, 2020
1 parent dd9b168 commit d2e2819
Show file tree
Hide file tree
Showing 92 changed files with 1,486 additions and 7 deletions.
48 changes: 41 additions & 7 deletions presentation/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,37 @@ by [`Dboy Liao`](https://github.com/dboyliao)

## About Me

- My real name is Yin-Chen Liao but all my friends call me Dboy
- [GitHub](https://github.com/dboyliao)
- [Linkedin](https://www.linkedin.com/in/yin-chen-liao-69967188/)
- Core Developer of [`uTensor`](https://utensor.github.io/website/) project
- Author of [`utensor_cgen`](https://github.com/uTensor/utensor_cgen), code generator for `uTensor`
- Contributor to `uTensor` C++ runtime

---

## About Me

- Interested in
- Scientific Computing
- Optimization
- Machine Learning & Deep Learning
- Freelancer
- get a bunch of time hacking
- Got a bunch of time **hacking**
--

- That's why I'm here!
<div style="margin-left: 60px; font-size: 32px;">
That's why I'm here!
</div>

---

## About The Talk

- My one month challenge
- Try to reproduce a deep learining paper with Julia
- Writing my very first Julia package
- IN ONE MONTH

---

Expand Down Expand Up @@ -152,7 +174,9 @@ $\theta\_{y\_n} \cdot f\_{\phi}(x\_n) - \theta\_k\cdot f\_{\phi}(x\_n) \geq 1 -

--

All we need is $\triangledown\_{\phi}\mathcal{L}^{meta}$!
<div style="margin-left: 70px; font-size: 32px;">
All we need is $\triangledown_{\phi}\mathcal{L}^{meta}$!
</div>

---

Expand All @@ -169,7 +193,7 @@ All we need is $\triangledown\_{\phi}\mathcal{L}^{meta}$!

- Short story: the solver is in fact differentiable
--
- Long story: with **KKT conditions** and **implicit function theorem**, we can analytically compute the gradient as following
- Long story: with **strong duality**, **KKT conditions** and **implicit function theorem**, we can analytically compute the gradient as following

<div style="float: right;">
<img alt="diff-solver-1" src="assets/diff-solver-1.png" style="width: 50%; height: 120px;">
Expand All @@ -187,17 +211,23 @@ name: impl
## Implementation

1. Data preprocessing, reformat normal dataset as $\mathcal{D}^{meta\-train} = \\{(D^{meta\-train}\_{train}, D^{meta\-train}\_{test})\\}$
2. The $\text{QPSolver}$ and it's adjoint (with `Zygote.@adjoint`)
2. Differentiable $\text{QPSolver}$ (with `Zygote.@adjoint`)
3. The embedding network, $f\_{\phi}$
4. The inner/outer training loop

--

<div style="width: 300px; margin-top: -100px; margin-left: 500px;">
<img src="https://i.imgflip.com/49wcxu.jpg" title="made at imgflip.com"/>
</div>

---

## Data Preprocessing

- `data_loader.jl`
- Extending `sample` from `StatsBase`
- multiple dispatching make it really easy to integrate with existing library
- **Multiple dispatching** make it really easy to extend existing library

<div>
<span style="margin-right: 100px;">
Expand All @@ -211,7 +241,7 @@ name: impl

- `qp.jl`
- Solve the QP with `Convex.jl`, which has nice API and comply to `MathOptInterface`
- Define it's backward gradient with `Zygote.@adjoint` even the solver itself is not differentiable
- Define backward gradient with `Zygote.@adjoint` even the solver itself is not differentiable
- Just like `torch.nn.Module.backward`

<div style="width: 800px; padding-left: 100px;">
Expand All @@ -231,11 +261,15 @@ name: impl

---

## Experiments

- Finally my training script is working

--

<div style="margin-left: 60px; font-size: 32px;">
But the model is not working ...
</div>

---

Expand Down
Binary file added slides/assets/diff-solver-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/assets/diff-solver-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/assets/flux-layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/assets/meta-algorithm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/assets/meta-supervised-learn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/assets/solver-not-diff.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/assets/statsbase-sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/assets/zygote-adjoint-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/assets/zygote-adjoint-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions slides/auto-render.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added slides/fonts/KaTeX_AMS-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_AMS-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_AMS-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Caligraphic-Bold.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Caligraphic-Bold.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Caligraphic-Bold.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Caligraphic-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Caligraphic-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Caligraphic-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Fraktur-Bold.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Fraktur-Bold.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Fraktur-Bold.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Fraktur-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Fraktur-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Fraktur-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-Bold.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-Bold.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-Bold.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-BoldItalic.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-BoldItalic.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-BoldItalic.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-Italic.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-Italic.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-Italic.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Main-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Math-BoldItalic.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Math-BoldItalic.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Math-BoldItalic.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Math-Italic.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Math-Italic.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Math-Italic.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_SansSerif-Bold.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_SansSerif-Bold.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_SansSerif-Bold.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_SansSerif-Italic.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_SansSerif-Italic.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_SansSerif-Italic.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_SansSerif-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_SansSerif-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_SansSerif-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Script-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Script-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Script-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size1-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size1-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size1-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size2-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size2-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size2-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size3-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size3-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size3-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size4-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size4-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Size4-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/KaTeX_Typewriter-Regular.ttf
Binary file not shown.
Binary file added slides/fonts/KaTeX_Typewriter-Regular.woff
Binary file not shown.
Binary file added slides/fonts/KaTeX_Typewriter-Regular.woff2
Binary file not shown.
Binary file added slides/fonts/Lora/Lora-Bold.ttf
Binary file not shown.
Binary file added slides/fonts/Lora/Lora-BoldItalic.ttf
Binary file not shown.
Binary file added slides/fonts/Lora/Lora-Italic.ttf
Binary file not shown.
Binary file added slides/fonts/Lora/Lora-Regular.ttf
Binary file not shown.
93 changes: 93 additions & 0 deletions slides/fonts/Lora/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2011 The Lora Project Authors (https://github.com/cyrealtype/Lora-Cyrillic), with Reserved Font Name "Lora".

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
96 changes: 96 additions & 0 deletions slides/fonts/Ubuntu_Mono/UFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
-------------------------------
UBUNTU FONT LICENCE Version 1.0
-------------------------------

PREAMBLE
This licence allows the licensed fonts to be used, studied, modified and
redistributed freely. The fonts, including any derivative works, can be
bundled, embedded, and redistributed provided the terms of this licence
are met. The fonts and derivatives, however, cannot be released under
any other licence. The requirement for fonts to remain under this
licence does not require any document created using the fonts or their
derivatives to be published under this licence, as long as the primary
purpose of the document is not to be a vehicle for the distribution of
the fonts.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this licence and clearly marked as such. This may
include source files, build scripts and documentation.

"Original Version" refers to the collection of Font Software components
as received under this licence.

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to
a new environment.

"Copyright Holder(s)" refers to all individuals and companies who have a
copyright ownership of the Font Software.

"Substantially Changed" refers to Modified Versions which can be easily
identified as dissimilar to the Font Software by users of the Font
Software comparing the Original Version with the Modified Version.

To "Propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification and with or without charging
a redistribution fee), making available to the public, and in some
countries other activities as well.

PERMISSION & CONDITIONS
This licence does not grant any rights under trademark law and all such
rights are reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of the Font Software, to propagate the Font Software, subject to
the below conditions:

1) Each copy of the Font Software must contain the above copyright
notice and this licence. These can be included either as stand-alone
text files, human-readable headers or in the appropriate machine-
readable metadata fields within text or binary files as long as those
fields can be easily viewed by the user.

2) The font name complies with the following:
(a) The Original Version must retain its name, unmodified.
(b) Modified Versions which are Substantially Changed must be renamed to
avoid use of the name of the Original Version or similar names entirely.
(c) Modified Versions which are not Substantially Changed must be
renamed to both (i) retain the name of the Original Version and (ii) add
additional naming elements to distinguish the Modified Version from the
Original Version. The name of such Modified Versions must be the name of
the Original Version, with "derivative X" where X represents the name of
the new work, appended to that name.

3) The name(s) of the Copyright Holder(s) and any contributor to the
Font Software shall not be used to promote, endorse or advertise any
Modified Version, except (i) as required by this licence, (ii) to
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
their explicit written permission.

4) The Font Software, modified or unmodified, in part or in whole, must
be distributed entirely under this licence, and must not be distributed
under any other licence. The requirement for fonts to remain under this
licence does not affect any document created using the Font Software,
except any version of the Font Software extracted from a document
created using the Font Software may only be distributed under this
licence.

TERMINATION
This licence becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
DEALINGS IN THE FONT SOFTWARE.
Binary file added slides/fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file added slides/fonts/Ubuntu_Mono/UbuntuMono-Italic.ttf
Binary file not shown.
Binary file added slides/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf
Binary file not shown.
Loading

0 comments on commit d2e2819

Please sign in to comment.