Skip to content

Commit

Permalink
Merge pull request #579 from LuxDL/ap/agg_tutorials
Browse files Browse the repository at this point in the history
Add a gallery component
  • Loading branch information
avik-pal committed Apr 10, 2024
2 parents 132b99a + edf2f13 commit bf9c763
Show file tree
Hide file tree
Showing 24 changed files with 298 additions and 131 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ makedocs(; sitename="Lux.jl Documentation",
repo="github.com/LuxDL/Lux.jl", devbranch="main", devurl="dev",
deploy_url="https://lux.csail.mit.edu", deploy_decision),
draft=false,
pages=pages)
pages)

deploydocs(; repo="github.com/LuxDL/Lux.jl.git",
push_preview=true, target="build", devbranch="main")
23 changes: 21 additions & 2 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default defineConfig({
{ text: 'Home', link: '/' },
{ text: 'Getting Started', link: '/introduction' },
{ text: 'Benchmarks', link: 'https://lux.csail.mit.edu/benchmarks/' },
{ text: 'Tutorials', link: '/tutorials' },
{ text: 'Tutorials', link: '/tutorials/' },
{ text: 'Manual', link: '/manual/interface' },
{
text: 'API', items: [
Expand Down Expand Up @@ -120,7 +120,7 @@ export default defineConfig({
},
"/tutorials/": {
text: 'Tutorials', collapsed: false, items: [
{ text: 'Overview', link: '/tutorials' },
{ text: 'Overview', link: '/tutorials/' },
{
text: 'Beginner', collapsed: false, items: [
{ text: 'Julia & Lux for the Uninitiated', link: '/tutorials/beginner/1_Basics' },
Expand All @@ -137,6 +137,25 @@ export default defineConfig({
{
text: 'Advanced', collapsed: false, items: [
{ text: 'Training a Neural ODE to Model Gravitational Waveforms', link: '/tutorials/advanced/1_GravitationalWaveForm' }]
},
{
text: '3rd Party Tutorials', collapsed: true, items: [
{
text: 'PINNs (NeuralPDE.jl)', link: 'https://docs.sciml.ai/NeuralPDE/stable/tutorials/pdesystem/'
},
{
text: 'UDEs (SciMLSensitivity.jl)', link: 'https://docs.sciml.ai/SciMLSensitivity/stable/tutorials/data_parallel/'
},
{
text: 'Neural DEs (DiffEqFlux.jl)', link: 'https://docs.sciml.ai/DiffEqFlux/stable/examples/neural_ode/'
},
{
text: 'DEQs (DeepEquilibriumNetworks.jl)', link: 'https://docs.sciml.ai/DeepEquilibriumNetworks/stable/tutorials/basic_mnist_deq/'
},
{
text: 'Medical Image Segmentation', link: 'https://github.com/Dale-Black/ComputerVisionTutorials.jl/'
}
]
}]
},
"/manual/": {
Expand Down
Binary file removed docs/src/assets/android-chrome-192x192.png
Binary file not shown.
Binary file removed docs/src/assets/android-chrome-512x512.png
Binary file not shown.
Binary file removed docs/src/assets/apple-touch-icon.png
Binary file not shown.
Binary file removed docs/src/assets/favicon-16x16.png
Binary file not shown.
Binary file removed docs/src/assets/favicon-32x32.png
Binary file not shown.
Binary file removed docs/src/assets/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion docs/src/assets/site.webmanifest

This file was deleted.

39 changes: 39 additions & 0 deletions docs/src/components/Gallery.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!-- https://codepen.io/heyDante/pen/bxEYOw -->

<script setup lang="ts">
import GalleryImage, { type Props } from './GalleryImage.vue';

defineProps<{
images: Props[];
}>();
</script>

<template>
<div class="gallery-image">
<GalleryImage v-for="image in images" v-bind="image" />
</div>
</template>

<style scoped>
.heading {
text-align: center;
font-size: 2em;
letter-spacing: 1px;
padding: 40px;
color: white;
}

.gallery-image {
padding: 20px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}

.gallery-image :deep(img) {
height: 350px;
width: 250px;
transform: scale(1);
transition: transform 0.4s ease;
}
</style>
133 changes: 133 additions & 0 deletions docs/src/components/GalleryImage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<script setup lang="ts">
import { withBase } from 'vitepress'
export interface Props {
href: string;
src: string;
caption: string;
desc: string;
}
defineProps<Props>();
</script>

<template>
<div class="img-box">
<a :href="href">
<img :src="withBase(src)" height="150px" alt="">
<div class="transparent-box1">
<div class="caption">
<h2>{{ caption }}</h2>
</div>
</div>
<div class="transparent-box2">
<div class="subcaption">
<p class="opacity-low">{{ desc }}</p>
</div>
</div>
</a>
</div>
</template>

<style scoped>
.img-box {
box-sizing: content-box;
border-radius: 14px;
margin: 20px;
height: 350px;
width: 250px;
overflow: hidden;
display: inline-block;
color: white;
position: relative;
background-color: transparent;
border: 2px solid var(--vp-c-bg-alt);
}
.img-box h2 {
border-top: 0;
}
.img-box img {
height: 100%;
width: 100%;
object-fit: cover;
opacity: 0.3;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.caption {
position: absolute;
bottom: 30px;
color: var(--vp-c-text-1);
left: 10px;
opacity: 1;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.subcaption {
position: absolute;
bottom: 5px;
color: var(--vp-c-text-1);
left: 10px;
opacity: 0;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.transparent-box1 {
height: 250px;
width: 250px;
background-color: transparent;
position: absolute;
top: 0;
left: 0;
transition: background-color 0.3s ease;
}
.transparent-box2 {
height: 100px;
width: 250px;
background-color: transparent;
position: absolute;
top: 250px;
left: 0;
transition: background-color 0.3s ease;
}
.img-box:hover img {
transform: scale(1.1);
}
.img-box:hover .transparent-box1 {
background-color: var(--vp-c-bg-alt);
}
.img-box:hover .transparent-box2 {
background-color: var(--vp-c-bg-alt);
}
.img-box:hover .caption {
transform: translateY(-20px);
opacity: 1;
}
.img-box:hover .subcaption {
transform: translateY(-20px);
opacity: 1;
}
.img-box:hover {
border: 2px solid var(--vp-c-brand-light);
cursor: pointer;
}
.caption>p:nth-child(2) {
font-size: 0.8em;
}
.subcaption>p:nth-child(2) {
font-size: 0.8em;
}
.opacity-low {
opacity: 0.85;
}
</style>
Binary file added docs/src/public/blas_optimizations.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 docs/src/public/gravitational_waveform.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 docs/src/public/hypernet.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 docs/src/public/lstm-illustrative.webp
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file added docs/src/public/mlp.webp
Binary file not shown.
Binary file added docs/src/public/mnist.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 docs/src/public/neural-sde.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 docs/src/public/pinn.gif
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 docs/src/public/weather-neural-ode.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

1 comment on commit bf9c763

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Benchmark suite Current: bf9c763 Previous: 53b761f Ratio
Dense(2 => 2)/cpu/reverse/ReverseDiff (compiled)/(2, 128) 3625.625 ns 3674.375 ns 0.99
Dense(2 => 2)/cpu/reverse/Zygote/(2, 128) 8329.6 ns 8120 ns 1.03
Dense(2 => 2)/cpu/reverse/Tracker/(2, 128) 20008 ns 14758 ns 1.36
Dense(2 => 2)/cpu/reverse/ReverseDiff/(2, 128) 9760.2 ns 9956.6 ns 0.98
Dense(2 => 2)/cpu/reverse/Flux/(2, 128) 8968.8 ns 9099.25 ns 0.99
Dense(2 => 2)/cpu/reverse/SimpleChains/(2, 128) 4533.5 ns 4552.25 ns 1.00
Dense(2 => 2)/cpu/forward/NamedTuple/(2, 128) 1983.8 ns 1946.6 ns 1.02
Dense(2 => 2)/cpu/forward/ComponentArray/(2, 128) 1638.599290780142 ns 1652.8661971830986 ns 0.99
Dense(2 => 2)/cpu/forward/Flux/(2, 128) 1802.7111111111112 ns 1809.8431372549019 ns 1.00
Dense(2 => 2)/cpu/forward/SimpleChains/(2, 128) 179.69327731092437 ns 179.78851540616247 ns 1.00
Dense(20 => 20)/cpu/reverse/ReverseDiff (compiled)/(20, 128) 17463 ns 17672 ns 0.99
Dense(20 => 20)/cpu/reverse/Zygote/(20, 128) 18505 ns 18465 ns 1.00
Dense(20 => 20)/cpu/reverse/Tracker/(20, 128) 35877 ns 35817 ns 1.00
Dense(20 => 20)/cpu/reverse/ReverseDiff/(20, 128) 28904 ns 28573 ns 1.01
Dense(20 => 20)/cpu/reverse/Flux/(20, 128) 19788 ns 19737 ns 1.00
Dense(20 => 20)/cpu/reverse/SimpleChains/(20, 128) 17162 ns 17162 ns 1
Dense(20 => 20)/cpu/forward/NamedTuple/(20, 128) 4897.714285714285 ns 4893.428571428572 ns 1.00
Dense(20 => 20)/cpu/forward/ComponentArray/(20, 128) 4976.571428571428 ns 4952.142857142857 ns 1.00
Dense(20 => 20)/cpu/forward/Flux/(20, 128) 4939.285714285715 ns 4907.714285714285 ns 1.01
Dense(20 => 20)/cpu/forward/SimpleChains/(20, 128) 1662.1 ns 1652.1 ns 1.01
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 3, 128) 40744614.5 ns 39556217 ns 1.03
Conv((3, 3), 3 => 3)/cpu/reverse/Zygote/(64, 64, 3, 128) 79080421 ns 65510599 ns 1.21
Conv((3, 3), 3 => 3)/cpu/reverse/Tracker/(64, 64, 3, 128) 82653235 ns 76064407 ns 1.09
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff/(64, 64, 3, 128) 86200963 ns 88871403.5 ns 0.97
Conv((3, 3), 3 => 3)/cpu/reverse/Flux/(64, 64, 3, 128) 78905084.5 ns 72809658 ns 1.08
Conv((3, 3), 3 => 3)/cpu/reverse/SimpleChains/(64, 64, 3, 128) 12176069 ns 12100554 ns 1.01
Conv((3, 3), 3 => 3)/cpu/forward/NamedTuple/(64, 64, 3, 128) 11531072.5 ns 9991109.5 ns 1.15
Conv((3, 3), 3 => 3)/cpu/forward/ComponentArray/(64, 64, 3, 128) 11556258 ns 10432405.5 ns 1.11
Conv((3, 3), 3 => 3)/cpu/forward/Flux/(64, 64, 3, 128) 11564044 ns 10016491 ns 1.15
Conv((3, 3), 3 => 3)/cpu/forward/SimpleChains/(64, 64, 3, 128) 6462543 ns 6390966 ns 1.01
vgg16/cpu/reverse/Zygote/(32, 32, 3, 1) 109222130 ns 98848326.5 ns 1.10
vgg16/cpu/reverse/Zygote/(32, 32, 3, 16) 716498141 ns 764292345.5 ns 0.94
vgg16/cpu/reverse/Zygote/(32, 32, 3, 64) 2774434429 ns 2515730554 ns 1.10
vgg16/cpu/reverse/Tracker/(32, 32, 3, 1) 165722314.5 ns 156025821 ns 1.06
vgg16/cpu/reverse/Tracker/(32, 32, 3, 16) 1141146395 ns 1024851862.5 ns 1.11
vgg16/cpu/reverse/Tracker/(32, 32, 3, 64) 3638853485 ns 3539702577 ns 1.03
vgg16/cpu/reverse/Flux/(32, 32, 3, 1) 85633954.5 ns 82469855 ns 1.04
vgg16/cpu/reverse/Flux/(32, 32, 3, 16) 679669495.5 ns 710005717.5 ns 0.96
vgg16/cpu/reverse/Flux/(32, 32, 3, 64) 2869660483 ns 2858023873 ns 1.00
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 1) 25584446.5 ns 25939820 ns 0.99
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 16) 235037986 ns 207642246.5 ns 1.13
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 64) 891040822 ns 842419380 ns 1.06
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 1) 26661185 ns 26103135 ns 1.02
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 16) 237554693 ns 233006946 ns 1.02
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 64) 883259646 ns 809485246.5 ns 1.09
vgg16/cpu/forward/Flux/(32, 32, 3, 1) 23363541.5 ns 30921860 ns 0.76
vgg16/cpu/forward/Flux/(32, 32, 3, 16) 202016108 ns 203061153 ns 0.99
vgg16/cpu/forward/Flux/(32, 32, 3, 64) 749216070.5 ns 882871730 ns 0.85
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 64, 128) 1041528133 ns 1075834254 ns 0.97
Conv((3, 3), 64 => 64)/cpu/reverse/Zygote/(64, 64, 64, 128) 1953104606 ns 1918214947.5 ns 1.02
Conv((3, 3), 64 => 64)/cpu/reverse/Tracker/(64, 64, 64, 128) 2174288920.5 ns 2215726277.5 ns 0.98
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff/(64, 64, 64, 128) 2535798497 ns 2358848457 ns 1.08
Conv((3, 3), 64 => 64)/cpu/reverse/Flux/(64, 64, 64, 128) 1905801894 ns 1926331223 ns 0.99
Conv((3, 3), 64 => 64)/cpu/forward/NamedTuple/(64, 64, 64, 128) 467810649 ns 365007811.5 ns 1.28
Conv((3, 3), 64 => 64)/cpu/forward/ComponentArray/(64, 64, 64, 128) 401897224 ns 435227716 ns 0.92
Conv((3, 3), 64 => 64)/cpu/forward/Flux/(64, 64, 64, 128) 363511714 ns 376326451.5 ns 0.97
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 1, 128) 11993043.5 ns 12040318 ns 1.00
Conv((3, 3), 1 => 1)/cpu/reverse/Zygote/(64, 64, 1, 128) 18118667 ns 18052787 ns 1.00
Conv((3, 3), 1 => 1)/cpu/reverse/Tracker/(64, 64, 1, 128) 19266770.5 ns 19200702 ns 1.00
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff/(64, 64, 1, 128) 23946772 ns 23895482 ns 1.00
Conv((3, 3), 1 => 1)/cpu/reverse/Flux/(64, 64, 1, 128) 18001429 ns 17998985 ns 1.00
Conv((3, 3), 1 => 1)/cpu/reverse/SimpleChains/(64, 64, 1, 128) 1173906 ns 1162245 ns 1.01
Conv((3, 3), 1 => 1)/cpu/forward/NamedTuple/(64, 64, 1, 128) 2083284 ns 2074705 ns 1.00
Conv((3, 3), 1 => 1)/cpu/forward/ComponentArray/(64, 64, 1, 128) 2109134 ns 2088735.5 ns 1.01
Conv((3, 3), 1 => 1)/cpu/forward/Flux/(64, 64, 1, 128) 2087096 ns 2079959 ns 1.00
Conv((3, 3), 1 => 1)/cpu/forward/SimpleChains/(64, 64, 1, 128) 216375 ns 203118 ns 1.07
Dense(200 => 200)/cpu/reverse/ReverseDiff (compiled)/(200, 128) 299811 ns 303455.5 ns 0.99
Dense(200 => 200)/cpu/reverse/Zygote/(200, 128) 274022 ns 274336 ns 1.00
Dense(200 => 200)/cpu/reverse/Tracker/(200, 128) 366305 ns 363268 ns 1.01
Dense(200 => 200)/cpu/reverse/ReverseDiff/(200, 128) 412983 ns 413520 ns 1.00
Dense(200 => 200)/cpu/reverse/Flux/(200, 128) 273692 ns 275854 ns 0.99
Dense(200 => 200)/cpu/reverse/SimpleChains/(200, 128) 407292 ns 406938 ns 1.00
Dense(200 => 200)/cpu/forward/NamedTuple/(200, 128) 88606 ns 89587 ns 0.99
Dense(200 => 200)/cpu/forward/ComponentArray/(200, 128) 89167 ns 89717 ns 0.99
Dense(200 => 200)/cpu/forward/Flux/(200, 128) 86702 ns 86892 ns 1.00
Dense(200 => 200)/cpu/forward/SimpleChains/(200, 128) 104917 ns 104365 ns 1.01
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 16, 128) 204802127.5 ns 200351480 ns 1.02
Conv((3, 3), 16 => 16)/cpu/reverse/Zygote/(64, 64, 16, 128) 397826293 ns 408642932 ns 0.97
Conv((3, 3), 16 => 16)/cpu/reverse/Tracker/(64, 64, 16, 128) 407107142 ns 440103689 ns 0.93
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff/(64, 64, 16, 128) 468385350 ns 456029536.5 ns 1.03
Conv((3, 3), 16 => 16)/cpu/reverse/Flux/(64, 64, 16, 128) 379786116.5 ns 408071183 ns 0.93
Conv((3, 3), 16 => 16)/cpu/reverse/SimpleChains/(64, 64, 16, 128) 327214540 ns 335433443 ns 0.98
Conv((3, 3), 16 => 16)/cpu/forward/NamedTuple/(64, 64, 16, 128) 50982627.5 ns 60980045 ns 0.84
Conv((3, 3), 16 => 16)/cpu/forward/ComponentArray/(64, 64, 16, 128) 61754318.5 ns 57470482 ns 1.07
Conv((3, 3), 16 => 16)/cpu/forward/Flux/(64, 64, 16, 128) 51202786 ns 57093732 ns 0.90
Conv((3, 3), 16 => 16)/cpu/forward/SimpleChains/(64, 64, 16, 128) 28422322 ns 28329442 ns 1.00
Dense(2000 => 2000)/cpu/reverse/ReverseDiff (compiled)/(2000, 128) 19437690 ns 19434661 ns 1.00
Dense(2000 => 2000)/cpu/reverse/Zygote/(2000, 128) 19638543 ns 19731528 ns 1.00
Dense(2000 => 2000)/cpu/reverse/Tracker/(2000, 128) 23400447 ns 23382597 ns 1.00
Dense(2000 => 2000)/cpu/reverse/ReverseDiff/(2000, 128) 24207548 ns 24160799 ns 1.00
Dense(2000 => 2000)/cpu/reverse/Flux/(2000, 128) 19668914 ns 19746006.5 ns 1.00
Dense(2000 => 2000)/cpu/forward/NamedTuple/(2000, 128) 6590668 ns 6626390.5 ns 0.99
Dense(2000 => 2000)/cpu/forward/ComponentArray/(2000, 128) 6574953 ns 6615541 ns 0.99
Dense(2000 => 2000)/cpu/forward/Flux/(2000, 128) 6491001 ns 6561480 ns 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.