-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #584 from LuxDL/ap/promote_compact
Improvement to the `@compact` API
- Loading branch information
Showing
26 changed files
with
267 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Spell Check | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
typos-check: | ||
name: Spell Check with Typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
- name: Check spelling | ||
uses: crate-ci/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[default.extend-words] | ||
numer = "numer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "Lux" | ||
uuid = "b2108857-7c20-44ae-9111-449ecde12c47" | ||
authors = ["Avik Pal <[email protected]> and contributors"] | ||
version = "0.5.34" | ||
version = "0.5.35" | ||
|
||
[deps] | ||
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,11 @@ Lux.f64 | |
StatefulLuxLayer | ||
``` | ||
|
||
## Compact Layer | ||
|
||
```@docs | ||
@compact | ||
``` | ||
|
||
## Truncated Stacktraces | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
9f1d902
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark Results
Dense(2 => 2)/cpu/reverse/ReverseDiff (compiled)/(2, 128)
3643
ns3653
ns1.00
Dense(2 => 2)/cpu/reverse/Zygote/(2, 128)
7953.166666666667
ns7729.5
ns1.03
Dense(2 => 2)/cpu/reverse/Tracker/(2, 128)
14727
ns14106
ns1.04
Dense(2 => 2)/cpu/reverse/ReverseDiff/(2, 128)
9702
ns9916
ns0.98
Dense(2 => 2)/cpu/reverse/Flux/(2, 128)
8947
ns8698.75
ns1.03
Dense(2 => 2)/cpu/reverse/SimpleChains/(2, 128)
4445.75
ns4506.5625
ns0.99
Dense(2 => 2)/cpu/forward/NamedTuple/(2, 128)
1981.7
ns1971.7
ns1.01
Dense(2 => 2)/cpu/forward/ComponentArray/(2, 128)
1634.3680555555557
ns1648.5314685314686
ns0.99
Dense(2 => 2)/cpu/forward/Flux/(2, 128)
1772.7592592592594
ns1824.8510638297873
ns0.97
Dense(2 => 2)/cpu/forward/SimpleChains/(2, 128)
179.9111424541608
ns179.4728789986092
ns1.00
Dense(20 => 20)/cpu/reverse/ReverseDiff (compiled)/(20, 128)
17322
ns17333
ns1.00
Dense(20 => 20)/cpu/reverse/Zygote/(20, 128)
18544
ns18394
ns1.01
Dense(20 => 20)/cpu/reverse/Tracker/(20, 128)
34985
ns35396
ns0.99
Dense(20 => 20)/cpu/reverse/ReverseDiff/(20, 128)
28292
ns28633
ns0.99
Dense(20 => 20)/cpu/reverse/Flux/(20, 128)
20618
ns19607
ns1.05
Dense(20 => 20)/cpu/reverse/SimpleChains/(20, 128)
16972
ns17032
ns1.00
Dense(20 => 20)/cpu/forward/NamedTuple/(20, 128)
4747.428571428572
ns4768.857142857143
ns1.00
Dense(20 => 20)/cpu/forward/ComponentArray/(20, 128)
4751.714285714285
ns4800.428571428572
ns0.99
Dense(20 => 20)/cpu/forward/Flux/(20, 128)
4766
ns4800.428571428572
ns0.99
Dense(20 => 20)/cpu/forward/SimpleChains/(20, 128)
1661.1
ns1659.1
ns1.00
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 3, 128)
47236878
ns48367699
ns0.98
Conv((3, 3), 3 => 3)/cpu/reverse/Zygote/(64, 64, 3, 128)
79390814
ns90662926
ns0.88
Conv((3, 3), 3 => 3)/cpu/reverse/Tracker/(64, 64, 3, 128)
110354486.5
ns97653785.5
ns1.13
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff/(64, 64, 3, 128)
107007516
ns107727588
ns0.99
Conv((3, 3), 3 => 3)/cpu/reverse/Flux/(64, 64, 3, 128)
90584786
ns108249388
ns0.84
Conv((3, 3), 3 => 3)/cpu/reverse/SimpleChains/(64, 64, 3, 128)
12157594
ns12110710
ns1.00
Conv((3, 3), 3 => 3)/cpu/forward/NamedTuple/(64, 64, 3, 128)
18467350
ns18210910.5
ns1.01
Conv((3, 3), 3 => 3)/cpu/forward/ComponentArray/(64, 64, 3, 128)
12094742
ns18544073
ns0.65
Conv((3, 3), 3 => 3)/cpu/forward/Flux/(64, 64, 3, 128)
18057739
ns18466654
ns0.98
Conv((3, 3), 3 => 3)/cpu/forward/SimpleChains/(64, 64, 3, 128)
6406764
ns6396982
ns1.00
vgg16/cpu/reverse/Zygote/(32, 32, 3, 1)
103302825
ns106620467.5
ns0.97
vgg16/cpu/reverse/Zygote/(32, 32, 3, 16)
915303511
ns763640160
ns1.20
vgg16/cpu/reverse/Zygote/(32, 32, 3, 64)
3001164643
ns2762978316
ns1.09
vgg16/cpu/reverse/Tracker/(32, 32, 3, 1)
161191117
ns163403619
ns0.99
vgg16/cpu/reverse/Tracker/(32, 32, 3, 16)
1077040118
ns1198898689
ns0.90
vgg16/cpu/reverse/Tracker/(32, 32, 3, 64)
3836744884
ns3765767577
ns1.02
vgg16/cpu/reverse/Flux/(32, 32, 3, 1)
84401417
ns85276372.5
ns0.99
vgg16/cpu/reverse/Flux/(32, 32, 3, 16)
821989995
ns840374369
ns0.98
vgg16/cpu/reverse/Flux/(32, 32, 3, 64)
3595869124
ns3347793443
ns1.07
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 1)
24852621
ns25080614.5
ns0.99
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 16)
221149106.5
ns232258093
ns0.95
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 64)
885666932.5
ns1019038431
ns0.87
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 1)
26159258.5
ns25059892
ns1.04
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 16)
223180012
ns236184814.5
ns0.94
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 64)
902076527.5
ns999233211
ns0.90
vgg16/cpu/forward/Flux/(32, 32, 3, 1)
24166346
ns24562440.5
ns0.98
vgg16/cpu/forward/Flux/(32, 32, 3, 16)
212906366
ns211748278
ns1.01
vgg16/cpu/forward/Flux/(32, 32, 3, 64)
824038154.5
ns712431369.5
ns1.16
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 64, 128)
1052403840
ns1132641019
ns0.93
Conv((3, 3), 64 => 64)/cpu/reverse/Zygote/(64, 64, 64, 128)
1950974267
ns1842889677.5
ns1.06
Conv((3, 3), 64 => 64)/cpu/reverse/Tracker/(64, 64, 64, 128)
2254863718
ns2124383065.5
ns1.06
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff/(64, 64, 64, 128)
2569062884
ns2365462129
ns1.09
Conv((3, 3), 64 => 64)/cpu/reverse/Flux/(64, 64, 64, 128)
1987293572
ns1854224454.5
ns1.07
Conv((3, 3), 64 => 64)/cpu/forward/NamedTuple/(64, 64, 64, 128)
372672192.5
ns456010240
ns0.82
Conv((3, 3), 64 => 64)/cpu/forward/ComponentArray/(64, 64, 64, 128)
384292918.5
ns359691595
ns1.07
Conv((3, 3), 64 => 64)/cpu/forward/Flux/(64, 64, 64, 128)
375958081.5
ns359652717.5
ns1.05
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 1, 128)
11991204
ns11966091
ns1.00
Conv((3, 3), 1 => 1)/cpu/reverse/Zygote/(64, 64, 1, 128)
18085257
ns18076793
ns1.00
Conv((3, 3), 1 => 1)/cpu/reverse/Tracker/(64, 64, 1, 128)
19537014
ns19252254
ns1.01
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff/(64, 64, 1, 128)
23942477
ns23893264
ns1.00
Conv((3, 3), 1 => 1)/cpu/reverse/Flux/(64, 64, 1, 128)
18064912
ns18061934
ns1.00
Conv((3, 3), 1 => 1)/cpu/reverse/SimpleChains/(64, 64, 1, 128)
1147017
ns1158025
ns0.99
Conv((3, 3), 1 => 1)/cpu/forward/NamedTuple/(64, 64, 1, 128)
2077290
ns2075109
ns1.00
Conv((3, 3), 1 => 1)/cpu/forward/ComponentArray/(64, 64, 1, 128)
2088844.5
ns2081892
ns1.00
Conv((3, 3), 1 => 1)/cpu/forward/Flux/(64, 64, 1, 128)
2092047.5
ns2071516.5
ns1.01
Conv((3, 3), 1 => 1)/cpu/forward/SimpleChains/(64, 64, 1, 128)
201450.5
ns200054
ns1.01
Dense(200 => 200)/cpu/reverse/ReverseDiff (compiled)/(200, 128)
297764.5
ns298147
ns1.00
Dense(200 => 200)/cpu/reverse/Zygote/(200, 128)
271320.5
ns273642
ns0.99
Dense(200 => 200)/cpu/reverse/Tracker/(200, 128)
359580
ns365467.5
ns0.98
Dense(200 => 200)/cpu/reverse/ReverseDiff/(200, 128)
409393
ns414444.5
ns0.99
Dense(200 => 200)/cpu/reverse/Flux/(200, 128)
273400
ns275154
ns0.99
Dense(200 => 200)/cpu/reverse/SimpleChains/(200, 128)
409113
ns410968
ns1.00
Dense(200 => 200)/cpu/forward/NamedTuple/(200, 128)
88825
ns89371.5
ns0.99
Dense(200 => 200)/cpu/forward/ComponentArray/(200, 128)
91651
ns89357.5
ns1.03
Dense(200 => 200)/cpu/forward/Flux/(200, 128)
86871.5
ns87022
ns1.00
Dense(200 => 200)/cpu/forward/SimpleChains/(200, 128)
104455
ns104495
ns1.00
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 16, 128)
210883198
ns197534448
ns1.07
Conv((3, 3), 16 => 16)/cpu/reverse/Zygote/(64, 64, 16, 128)
411576886
ns372121710
ns1.11
Conv((3, 3), 16 => 16)/cpu/reverse/Tracker/(64, 64, 16, 128)
445918896
ns403011132
ns1.11
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff/(64, 64, 16, 128)
474241975
ns482377826
ns0.98
Conv((3, 3), 16 => 16)/cpu/reverse/Flux/(64, 64, 16, 128)
409801025
ns371969112
ns1.10
Conv((3, 3), 16 => 16)/cpu/reverse/SimpleChains/(64, 64, 16, 128)
346098127
ns334264188.5
ns1.04
Conv((3, 3), 16 => 16)/cpu/forward/NamedTuple/(64, 64, 16, 128)
57379896.5
ns59961589
ns0.96
Conv((3, 3), 16 => 16)/cpu/forward/ComponentArray/(64, 64, 16, 128)
57238569.5
ns53644168
ns1.07
Conv((3, 3), 16 => 16)/cpu/forward/Flux/(64, 64, 16, 128)
57607353
ns56527647
ns1.02
Conv((3, 3), 16 => 16)/cpu/forward/SimpleChains/(64, 64, 16, 128)
28476232
ns29291598.5
ns0.97
Dense(2000 => 2000)/cpu/reverse/ReverseDiff (compiled)/(2000, 128)
19438952.5
ns19730534
ns0.99
Dense(2000 => 2000)/cpu/reverse/Zygote/(2000, 128)
19717994
ns19802579.5
ns1.00
Dense(2000 => 2000)/cpu/reverse/Tracker/(2000, 128)
23319997
ns23663463
ns0.99
Dense(2000 => 2000)/cpu/reverse/ReverseDiff/(2000, 128)
24172745
ns24349385
ns0.99
Dense(2000 => 2000)/cpu/reverse/Flux/(2000, 128)
19750594.5
ns19922312
ns0.99
Dense(2000 => 2000)/cpu/forward/NamedTuple/(2000, 128)
6603171
ns6620742
ns1.00
Dense(2000 => 2000)/cpu/forward/ComponentArray/(2000, 128)
6609978
ns6614070
ns1.00
Dense(2000 => 2000)/cpu/forward/Flux/(2000, 128)
6584581
ns6529781
ns1.01
This comment was automatically generated by workflow using github-action-benchmark.