Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LeakyReLU #81

Merged
merged 29 commits into from
Sep 22, 2020
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1e27430
added LeakyReLU as a Bijector
torfjelde Feb 9, 2020
180a527
added Compat.jl
torfjelde Feb 11, 2020
0f5200a
forgot to use Compat.jl
torfjelde Feb 12, 2020
7d36fde
Merge branch 'master' into tor/leaky-relu
torfjelde Sep 10, 2020
533b86e
added some tests for LeakyReLU
torfjelde Sep 10, 2020
fd2e33b
using masks rather than ifelse for type-stability and simplicity
torfjelde Sep 10, 2020
8b69cab
removed some redundant comments
torfjelde Sep 10, 2020
ba299ff
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
9b4d0d6
removed unnecessary broadcasting and useless import
torfjelde Sep 11, 2020
dbeb414
Merge branch 'tor/leaky-relu' of https://github.com/TuringLang/Biject…
torfjelde Sep 11, 2020
7771155
fixed a typo
torfjelde Sep 11, 2020
6e9d9f7
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
18e30f9
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
c5b058b
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
c72fd11
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
68d3518
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
c14a5db
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
4a21b73
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
b4119fd
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
1b97a0f
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
1ebd9ba
Apply suggestions from code review
torfjelde Sep 11, 2020
07cc632
Update src/bijectors/leaky_relu.jl
torfjelde Sep 11, 2020
f2f167e
Apply suggestions from code review
torfjelde Sep 12, 2020
003dfb6
Apply suggestions from code review
torfjelde Sep 12, 2020
e17d5d7
Update src/bijectors/leaky_relu.jl
torfjelde Sep 12, 2020
a83cb7b
Update src/bijectors/leaky_relu.jl
torfjelde Sep 12, 2020
28158ae
Apply suggestions from code review
torfjelde Sep 12, 2020
6077578
Apply suggestions from code review
torfjelde Sep 12, 2020
410166b
Merge branch 'master' into tor/leaky-relu
torfjelde Sep 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed a typo
  • Loading branch information
torfjelde committed Sep 11, 2020
commit 7771155094b52c3a7e970e05caadcb685082557c
2 changes: 1 addition & 1 deletion src/bijectors/leaky_relu.jl
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ end

function (ib::Inverse{<:LeakyReLU, 0})(y::Real)
mask = y < zero(y)
return mask * (x / ib.orig.α) + (1 - mask) * x
return mask * (y / ib.orig.α) + (1 - mask) * y
torfjelde marked this conversation as resolved.
Show resolved Hide resolved
end
(ib::Inverse{<:LeakyReLU{<:Any}, 0})(y::AbstractVector{<:Real}) = ib.(y)
torfjelde marked this conversation as resolved.
Show resolved Hide resolved