Skip to content

Commit 6f21a42

Browse files
committed
Fix relative links for previews to work
1 parent 000fce9 commit 6f21a42

10 files changed

+131
-62
lines changed

.github/workflows/Deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1515
with:
1616
persist-credentials: false
1717
# NOTE: Python is necessary for the pre-rendering (minification) step

_layout/head.html

+14-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,20 @@
5050

5151
<!-- Bootstrap CSS (4.1) -->
5252
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
53-
<link rel="stylesheet" href="/css/script_default.css">
54-
<link rel="stylesheet" href="/css/site.css">
53+
{{ispage index || ispage 404}}
54+
<link rel="stylesheet" href="./css/script_default.css">
55+
<link rel="stylesheet" href="./css/site.css">
56+
{{end}}
57+
58+
{{ispage blogposts/* || ispage tutorialposts/*}}
59+
<link rel="stylesheet" href="../../css/script_default.css">
60+
<link rel="stylesheet" href="../../css/site.css">
61+
{{end}}
62+
63+
{{ispage getting_started || ispage blog || ispage governance || ispage gsoc || ispage tutorials}}
64+
<link rel="stylesheet" href="../css/script_default.css">
65+
<link rel="stylesheet" href="../css/site.css">
66+
{{end}}
5567

5668
<!-- Font Awesome -->
5769
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">

_layout/navbar.html

+77-20
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,88 @@
11
<!-- Navbar -->
22
<nav class="navbar navbar-expand-lg navbar-dark container lighter">
3-
<a class="navbar-brand" href="/">
4-
<div class="logo" style="font-size:30pt;margin-top:-15px;margin-bottom:-10px;">flux</div>
5-
</a>
3+
{{ispage index || ispage 404}}
4+
<a class="navbar-brand" href="./">
5+
<div class="logo" style="font-size:30pt;margin-top:-15px;margin-bottom:-10px;">flux</div>
6+
</a>
7+
{{end}}
8+
9+
{{ispage blogposts/* || ispage tutorialposts/*}}
10+
<a class="navbar-brand" href="../../">
11+
<div class="logo" style="font-size:30pt;margin-top:-15px;margin-bottom:-10px;">flux</div>
12+
</a>
13+
{{end}}
14+
15+
{{ispage getting_started || ispage blog || ispage governance || ispage gsoc || ispage tutorials}}
16+
<a class="navbar-brand" href="../">
17+
<div class="logo" style="font-size:30pt;margin-top:-15px;margin-bottom:-10px;">flux</div>
18+
</a>
19+
{{end}}
620
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
721
<span class="navbar-toggler-icon"></span>
822
</button>
923

1024
<div class="collapse navbar-collapse" id="navbarSupportedContent">
1125
<ul class="navbar-nav mr-auto">
12-
<li class="nav-item">
13-
<a class="nav-link" href="/getting_started/">Getting Started</a>
14-
</li>
15-
<li class="nav-item">
16-
<a class="nav-link" href="https://fluxml.ai/Flux.jl/" target="_blank">Docs</a>
17-
</li>
18-
<li class="nav-item">
19-
<a class="nav-link" href="/blog/">Blog</a>
20-
</li>
21-
<li class="nav-item">
22-
<a class="nav-link" href="/tutorials/">Tutorials</a>
23-
</li>
24-
<li class="nav-item">
25-
<a class="nav-link" href="https://fluxml.ai/Flux.jl/dev/ecosystem/">Ecosystem</a>
26-
</li>
27-
<li class="nav-item">
28-
<a class="nav-link" href="/gsoc/">GSoC</a>
26+
{{ispage index || ispage 404}}
27+
<li class="nav-item">
28+
<a class="nav-link" href="./getting_started/">Getting Started</a>
29+
</li>
30+
<li class="nav-item">
31+
<a class="nav-link" href="https://fluxml.ai/Flux.jl/" target="_blank">Docs</a>
32+
</li>
33+
<li class="nav-item">
34+
<a class="nav-link" href="./blog/">Blog</a>
35+
</li>
36+
<li class="nav-item">
37+
<a class="nav-link" href="./tutorials/">Tutorials</a>
38+
</li>
39+
<li class="nav-item">
40+
<a class="nav-link" href="https://fluxml.ai/Flux.jl/dev/ecosystem/">Ecosystem</a>
41+
</li>
42+
<li class="nav-item">
43+
<a class="nav-link" href="./gsoc/">GSoC</a>
44+
{{end}}
45+
46+
{{ispage blogposts/* || ispage tutorialposts/*}}
47+
<li class="nav-item">
48+
<a class="nav-link" href="../../getting_started/">Getting Started</a>
49+
</li>
50+
<li class="nav-item">
51+
<a class="nav-link" href="https://fluxml.ai/Flux.jl/" target="_blank">Docs</a>
52+
</li>
53+
<li class="nav-item">
54+
<a class="nav-link" href="../../blog/">Blog</a>
55+
</li>
56+
<li class="nav-item">
57+
<a class="nav-link" href="../../tutorials/">Tutorials</a>
58+
</li>
59+
<li class="nav-item">
60+
<a class="nav-link" href="https://fluxml.ai/Flux.jl/dev/ecosystem/">Ecosystem</a>
61+
</li>
62+
<li class="nav-item">
63+
<a class="nav-link" href="../../gsoc/">GSoC</a>
64+
{{end}}
65+
66+
{{ispage getting_started || ispage blog || ispage governance || ispage gsoc || ispage tutorials}}
67+
<li class="nav-item">
68+
<a class="nav-link" href="../getting_started/">Getting Started</a>
69+
</li>
70+
<li class="nav-item">
71+
<a class="nav-link" href="https://fluxml.ai/Flux.jl/" target="_blank">Docs</a>
72+
</li>
73+
<li class="nav-item">
74+
<a class="nav-link" href="../blog/">Blog</a>
75+
</li>
76+
<li class="nav-item">
77+
<a class="nav-link" href="../tutorials/">Tutorials</a>
78+
</li>
79+
<li class="nav-item">
80+
<a class="nav-link" href="https://fluxml.ai/Flux.jl/dev/ecosystem/">Ecosystem</a>
81+
</li>
82+
<li class="nav-item">
83+
<a class="nav-link" href="../gsoc/">GSoC</a>
84+
{{end}}
85+
2986
</li>
3087
<li class="nav-item">
3188
<a class="nav-link" href="https://discourse.julialang.org/c/domain/ML" target="_blank">Discuss</a>

blogposts/2019-03-05-dp-vs-rl.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We've discussed the idea of [differentiable programming](https://fluxml.ai/2019/
1010

1111
Differentiation is what makes deep learning tick; given a function $y = f(x)$ we use the gradient $\frac{dy}{dx}$ to figure out how a change in $x$ will affect $y$. Despite the mathematical clothing, gradients are actually a very general and intuitive concept. Forget the formulas you had to stare at in school; let's do something more fun, like throwing stuff.
1212

13-
![](/assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-basic.gif)
13+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-basic.gif)
1414

1515
When we throw things with a trebuchet, our $x$ represents a setting (say, the size of the counterweight, or the angle of release), and $y$ is the distance the projectile travels before landing. If you're trying to aim, the gradient tells you something very useful – whether a change in aim will increase or decrease the distance. To maximise distance, just follow the gradient.
1616

@@ -31,19 +31,19 @@ Now we have that, let's do something interesting with it.
3131

3232
A simple way to use this is to aim the trebuchet at a target, using gradients to fine-tune the angle of release; this kind of thing is common under the name of _parameter estimation_, and we've [covered examples like it before](https://julialang.org/blog/2019/01/fluxdiffeq). We can make things more interesting by going meta: instead of aiming the trebuchet given a single target, we'll optimise a neural network that can aim it given _any_ target. Here's how it works: the neural net takes two inputs, the target distance in metres and the current wind speed. The network spits out trebuchet settings (the mass of the counterweight and the angle of release) that get fed into the simulator, which calculates the achieved distance. We then compare to our target, and _backpropagate through the entire chain_, end to end, to adjust the weights of the network. Our "dataset" is a randomly chosen set of targets and wind speeds.
3333

34-
![](/assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-flow.png)
34+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-flow.png)
3535

3636
A nice property of this simple model is that training it is _fast_, because we've expressed exactly what we want from the model in a fully differentiable way. Initially it looks like this:
3737

38-
![](/assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-miss.gif)
38+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-miss.gif)
3939

4040
After about five minutes of training (on a single core of my laptop's CPU), it looks like this:
4141

42-
![](/assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-hit.gif)
42+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-hit.gif)
4343

4444
If you want to try pushing it, turn up the wind speed:
4545

46-
![](/assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-wind.gif)
46+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/trebuchet-wind.gif)
4747

4848
It's only off by 16cm, or about 0.3%.
4949

@@ -55,7 +55,7 @@ This is about the simplest possible control problem, which we use mainly for ill
5555

5656
A more recognisable control problem is [CartPole](https://gym.openai.com/envs/CartPole-v0/), the "hello world" for reinforcement learning. The task is to learn to balance an upright pole by nudging its base left or right. Our setup is broadly similar to the trebuchet case: a [Julia implementation](https://github.com/tejank10/Gym.jl) means we can directly treat the reward produced by the environment as a loss. ∂P allows us to switch seamlessly from model-free to model-based RL.
5757

58-
![](/assets/blogposts/2019-03-05-dp-vs-rl/cartpole-flow.png)
58+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/cartpole-flow.png)
5959

6060
The astute reader may notice a snag. The action space for cartpole – nudge left or right – is discrete, and therefore not differentiable. We solve this by introducing a _differentiable discretisation_, defined [like so](https://github.com/FluxML/model-zoo/blob/cdda5cad3e87b216fa67069a5ca84a3016f2a604/games/differentiable-programming/cartpole/DiffRL.jl#L32):
6161

@@ -74,22 +74,22 @@ In other words, we force the gradient to behave as if $f$ were the identity func
7474

7575
The results speak for themselves. Where RL methods need to train for hundreds of episodes before solving the problem, the ∂P model only needs around 5 episodes to win conclusively.
7676

77-
![](/assets/blogposts/2019-03-05-dp-vs-rl/cartpole.gif)
77+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/cartpole.gif)
7878

7979

8080
## The Pendulum & Backprop through Time
8181

8282
An important aim for RL is to handle _delayed reward_, when an action doesn't help us until several steps in the future. ∂P allows this too, and in a very familiar way: when the environment is differentiable, we can actually train the agent using backpropagation through time, just like a recurrent net! In this case the environmental state becomes the "hidden state" that changes between time steps.
8383

84-
![](/assets/blogposts/2019-03-05-dp-vs-rl/bptt.png)
84+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/bptt.png)
8585

8686
To demonstrate this technique we looked at the [pendulum](https://github.com/openai/gym/wiki/Pendulum-v0) environment, where the task is to swing a pendulum until it stands upright, keeping it balanced with minimal effort. This is hard for RL models; after around 20 episodes of training the problem is solved, but often the route to a solution is visibly sub-optimal. In contrast, BPTT can beat the [RL leaderboard](https://github.com/openai/gym/wiki/Leaderboard#pendulum-v0) in _a single episode of training_. It's instructive to actually watch this episode unfold; at the beginning of the recording the strategy is random, and the model improves over time. The pace of learning is almost alarming.
8787

88-
![](/assets/blogposts/2019-03-05-dp-vs-rl/pendulum-training.gif)
88+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/pendulum-training.gif)
8989

9090
Despite only experiencing a single episode, the model generalises well to handle any initial angle, and has something pretty close to the optimal strategy. When restarted the model looks more like this.
9191

92-
![](/assets/blogposts/2019-03-05-dp-vs-rl/pendulum-dp.gif)
92+
![](../../assets/blogposts/2019-03-05-dp-vs-rl/pendulum-dp.gif)
9393

9494
This is just the beginning; we'll get the real wins applying DP to environments that are too hard for RL to work with at all, where rich simulations and models already exist (as in much of engineering and the sciences), and where interpretability is an important factor (as in medicine).
9595

blogposts/2019-09-11-simulating-the-motion-of-charges.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ end
131131

132132
Using some basic plotting functions, I graphed my charges at every training iteration and put them all together in a gif.
133133

134-
![](/assets/charges/maingif.gif)
134+
![](../../assets/charges/maingif.gif)
135135

136136
*Red charges are positive, Blue charges are negative and size of the dot is proportional to the absolute value of charge.*
137137

@@ -143,18 +143,18 @@ Let’s prove this.
143143

144144
Let’s take a trivial case and define a system of two charges: one positive and one negative. Let’s place them diametrically opposite with respect to the origin.
145145

146-
![](/assets/charges/plot1.png)
146+
![](../../assets/charges/plot1.png)
147147

148148
What do we expect to happen? The charges should move together.
149149

150-
![](/assets/charges/plot2.png)
150+
![](../../assets/charges/plot2.png)
151151

152152
And they do!
153153

154154
_(What’s interesting is that they seem to have overshot and actually crossed each other at one point, only to get drawn to each other once more. An apt parallel is charges overshooting due to inertia of motion)_
155155

156156
Let’s go back to that system of 100 charges and plot the potential energy at every training iteration.
157-
![](/assets/charges/plot3.png)
157+
![](../../assets/charges/plot3.png)
158158

159159
It’s safe to say that the system has converged at a value of approximately -1360 .
160160

blogposts/2020-06-29-acclerating-flux-torch.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ For popular object detection models - ResNet50, ResNet101 and VGG19 - we compare
1212

1313
~~~
1414
<p float="middle">
15-
<img src="/assets/blogposts/2020-06-29-acclerating-flux-torch/combined_benchmarks_2.png">
16-
<img src="/assets/blogposts/2020-06-29-acclerating-flux-torch/resnet101.png" height="300">
15+
<img src="../../assets/blogposts/2020-06-29-acclerating-flux-torch/combined_benchmarks_2.png">
16+
<img src="../../assets/blogposts/2020-06-29-acclerating-flux-torch/resnet101.png" height="300">
1717
</p>
1818
~~~
1919

blogposts/2020-12-20-Flux3D.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Performing 3D vision tasks involve preparing datasets to fit a certain represent
1212

1313
~~~
1414
<div style="text-align:center">
15-
<img width="400" src="/assets/blogposts/2020-12-20-Flux3D/visualize_anim.gif">
15+
<img width="400" src="../../assets/blogposts/2020-12-20-Flux3D/visualize_anim.gif">
1616
</div>
1717
~~~
1818

@@ -36,9 +36,9 @@ Kaolin is a popular 3D vision library based on PyTorch. Flux3D.jl is overall fas
3636

3737
~~~
3838
<p float="middle">
39-
<img src="/assets/blogposts/2020-12-20-Flux3D/bm_pcloud.png">
40-
<img src="/assets/blogposts/2020-12-20-Flux3D/bm_trimesh.png">
41-
<img src="/assets/blogposts/2020-12-20-Flux3D/bm_metrics.png">
39+
<img src="../../assets/blogposts/2020-12-20-Flux3D/bm_pcloud.png">
40+
<img src="../../assets/blogposts/2020-12-20-Flux3D/bm_trimesh.png">
41+
<img src="../../assets/blogposts/2020-12-20-Flux3D/bm_metrics.png">
4242
</p>
4343
~~~
4444

@@ -158,7 +158,7 @@ Additonally, 3D structures and all relevant transforms, as well as metrics, are
158158

159159
~~~
160160
<div style="text-align:center">
161-
<img width="300" src="/assets/blogposts/2020-12-20-Flux3D/fitmesh_anim.gif">
161+
<img width="300" src="../../assets/blogposts/2020-12-20-Flux3D/fitmesh_anim.gif">
162162
</div>
163163
~~~
164164

@@ -183,7 +183,7 @@ julia> vbox(
183183

184184
~~~
185185
<div style="text-align:center">
186-
<img src="/assets/blogposts/2020-12-20-Flux3D/visualize.png">
186+
<img src="../../assets/blogposts/2020-12-20-Flux3D/visualize.png">
187187
</div>
188188
~~~
189189

blogposts/2021-12-1-flux-numfocus.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author = "Dhairya Gandhi, Logan Kilpatrick"
66

77
~~~
88
<p float="middle">
9-
<img src="/assets/blogposts/2021-12-1-flux-numfocus/flux_numfocus.png" height="300">
9+
<img src="../../assets/blogposts/2021-12-1-flux-numfocus/flux_numfocus.png" height="300">
1010
</p>
1111
~~~
1212

index.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@@jumbotron,jumbotron-fluid,no-pad
33
@@container
44
~~~
5-
<img src="/assets/logo.png" style="max-width:100%;padding-bottom:20px"/>
5+
<img src="./assets/logo.png" style="max-width:100%;padding-bottom:20px"/>
66
<h2>The <i>Elegant</i> Machine Learning Stack</h2>
77
Flux is a 100% pure-Julia stack and provides lightweight abstractions on top of Julia's native GPU and AD support. It makes the easy things easy while remaining fully hackable.
88
~~~
@@ -194,71 +194,71 @@
194194
@@row
195195
@@col-md
196196
~~~
197-
<a href="https://julia.mit.edu"><img src="/assets/friends/mit-logo.png"></a>
197+
<a href="https://julia.mit.edu"><img src="./assets/friends/mit-logo.png"></a>
198198
~~~
199199
@@
200200
@@col-md
201201
~~~
202-
<a href="https://www.ucl.ac.uk"><img src="/assets/friends/ucl-logo.png"></a>
202+
<a href="https://www.ucl.ac.uk"><img src="./assets/friends/ucl-logo.png"></a>
203203
~~~
204204
@@
205205
@@col-md
206206
~~~
207-
<a href="https://www.utoronto.ca"><img src="/assets/friends/uoft_logo.png"></a>
207+
<a href="https://www.utoronto.ca"><img src="./assets/friends/uoft_logo.png"></a>
208208
~~~
209209
@@
210210
@@
211211

212212
@@row
213213
@@col-md
214214
~~~
215-
<a href="https://juliacomputing.com"><img src="/assets/friends/juliac-logo.png"></a>
215+
<a href="https://juliacomputing.com"><img src="./assets/friends/juliac-logo.png"></a>
216216
~~~
217217
@@
218218
@@col-md
219219
~~~
220-
<a href="https://www.turing.ac.uk/research/research-projects/machine-learning-julia"><img src="/assets/friends/alan-turing.jpg"></a>
220+
<a href="https://www.turing.ac.uk/research/research-projects/machine-learning-julia"><img src="./assets/friends/alan-turing.jpg"></a>
221221
~~~
222222
@@
223223
@@col-md
224224
~~~
225-
<a href="https://www.ed.ac.uk"><img src="/assets/friends/edinburgh.png"></a>
225+
<a href="https://www.ed.ac.uk"><img src="./assets/friends/edinburgh.png"></a>
226226
~~~
227227
@@
228228
@@
229229

230230
@@row
231231
@@col-md
232232
~~~
233-
<a href="https://www.relational.ai"><img src="/assets/friends/rai-logo.png"></a>
233+
<a href="https://www.relational.ai"><img src="./assets/friends/rai-logo.png"></a>
234234
~~~
235235
@@
236236
@@col-md
237237
~~~
238-
<a href="https://www.washington.edu"><img src="/assets/friends/washington.jpg"></a>
238+
<a href="https://www.washington.edu"><img src="./assets/friends/washington.jpg"></a>
239239
~~~
240240
@@
241241
@@col-md
242242
~~~
243-
<a href="https://www.cam.ac.uk"><img src="/assets/friends/cambridge.jpg"></a>
243+
<a href="https://www.cam.ac.uk"><img src="./assets/friends/cambridge.jpg"></a>
244244
~~~
245245
@@
246246
@@
247247

248248
@@row
249249
@@col-md
250250
~~~
251-
<a href="https://www.cmu.edu"><img src="/assets/friends/cmu-logo.png"></a>
251+
<a href="https://www.cmu.edu"><img src="./assets/friends/cmu-logo.png"></a>
252252
~~~
253253
@@
254254
@@col-md
255255
~~~
256-
<a href="https://www.invenia.ca"><img src="/assets/friends/invenia-logo.png"></a>
256+
<a href="https://www.invenia.ca"><img src="./assets/friends/invenia-logo.png"></a>
257257
~~~
258258
@@
259259
@@col-md
260260
~~~
261-
<a href="https://beacon.bio"><img src="/assets/friends/beacon_biosignals.jpg"></a>
261+
<a href="https://beacon.bio"><img src="./assets/friends/beacon_biosignals.jpg"></a>
262262
~~~
263263
@@
264264
@@

0 commit comments

Comments
 (0)