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

Added Bilinear layer #1009

Merged
merged 37 commits into from
Feb 11, 2021
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c2d3bf7
Added the Billinear layer
bhvieira Jan 28, 2020
a114435
Added some tests
bhvieira Jan 28, 2020
92a99d9
Forgot the activation function
bhvieira Jan 28, 2020
cbef3a4
typo
bhvieira Jan 28, 2020
10f8e24
Change order, error out fast
bhvieira Jan 28, 2020
c6172d7
Splatting instead of reduce, solves grads
bhvieira Jan 29, 2020
b4d587e
Fix tests try 1
bhvieira Jan 29, 2020
19d520a
Fixed the error
bhvieira Jan 29, 2020
3d3665a
faster Bilinear implementation
mcabbott Feb 2, 2020
ee09f08
Update src/layers/basic.jl
bhvieira Feb 2, 2020
17450f3
Non-essential explicit call to Zygote
bhvieira Feb 2, 2020
7830a8d
Fixed forward pass of bilinear
bhvieira Feb 2, 2020
e670646
Removed type annotations of reducehcat
bhvieira Feb 3, 2020
7f891db
New implementation based on Zygote.Buffer
bhvieira Feb 10, 2020
dc78890
Added expanding args for two data streams
bhvieira Mar 1, 2020
5ea755f
Restricted Tuples
bhvieira Mar 1, 2020
3306e65
Missing end in test
bhvieira Mar 2, 2020
27e3f52
use batched_mul
mcabbott Mar 2, 2020
d99f2f3
tidy up docstring
mcabbott Mar 2, 2020
5545011
indent two spaces
mcabbott Mar 2, 2020
5c2496e
Specified julia in docstring
bhvieira Mar 7, 2020
997a3a6
Apply suggestions from code review
bhvieira Apr 2, 2020
d11efb6
Update basic.jl
bhvieira Apr 2, 2020
bf064bf
Added Bilinear to docs
bhvieira Dec 9, 2020
4ba3fb7
Stop splatting NTuple2 in Bilinear
bhvieira Jan 5, 2021
e0f6549
Upper case exception text
bhvieira Jan 5, 2021
4aab530
Update src/layers/basic.jl
bhvieira Jan 10, 2021
b849d60
Wrong testset added by mistake
bhvieira Jan 10, 2021
5aa8c82
Merge branch 'master' into billinear
mcabbott Jan 28, 2021
58da113
First bilinear gpu test
bhvieira Feb 7, 2021
67d016b
Update test/cuda/layers.jl
CarloLucibello Feb 7, 2021
82d61a0
Update test/cuda/layers.jl
CarloLucibello Feb 7, 2021
cde19ed
Update test/cuda/layers.jl
CarloLucibello Feb 7, 2021
9eac5b4
Missing parentheses in cuda test
bhvieira Feb 7, 2021
ca283f7
Update test/cuda/layers.jl
CarloLucibello Feb 7, 2021
793b92c
Update test/cuda/layers.jl
CarloLucibello Feb 8, 2021
f4a60c7
Merge branch 'master' into billinear
bhvieira Feb 11, 2021
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
Update test/cuda/layers.jl
  • Loading branch information
CarloLucibello committed Feb 7, 2021
commit ca283f78182f2063f21593f42b92f2cdeb8c5072
2 changes: 1 addition & 1 deletion test/cuda/layers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ end
b = Flux.Bilinear(10, 2, 3) |> gpu
@test size(b(x,y)) == (3,9)
@test sum(abs2, b(x,y)) ≈ 0f0
@test_nowarn gs_gpu = gradient(() -> sum(abs2.(b(x,y))), params(b))
gs_gpu = gradient(() -> sum(abs2.(b(x, y))), params(b))
b_cpu, x_cpu, y_cpu = b |> cpu, x |> cpu, y |> cpu
gs_cpu = gradient(() -> sum(abs2.(b_cpu(x_cpu, y_cpu))), params(b_cpu))
@test gs_cpu ≈ Array(gs_gpu)
CarloLucibello marked this conversation as resolved.
Show resolved Hide resolved
Expand Down