We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fa134c commit 42a7147Copy full SHA for 42a7147
‎test/deeponet.jl‎
@@ -0,0 +1,17 @@
1
+using Test, Random, Flux
2
+
3
+@testset "DeepONet" begin
4
+ @testset "dimensions" begin
5
+ # Test the proper construction
6
+ # Branch net
7
+ @test size(DeepONet((32,64,72), (24,48,72), σ, tanh).branch_net.layers[end].weight) == (72,64)
8
+ @test size(DeepONet((32,64,72), (24,48,72), σ, tanh).branch_net.layers[end].bias) == (72,)
9
+ # Trunk net
10
+ @test size(DeepONet((32,64,72), (24,48,72), σ, tanh).trunk_net.layers[end].weight) == (72,48)
11
+ @test size(DeepONet((32,64,72), (24,48,72), σ, tanh).trunk_net.layers[end].bias) == (72,)
12
+ end
13
14
+ # Accept only Int as architecture parameters
15
+ @test_throws MethodError DeepONet((32.5,64,72), (24,48,72), σ, tanh)
16
+ @test_throws MethodError DeepONet((32,64,72), (24.1,48,72))
17
+end
‎test/runtests.jl‎
@@ -8,6 +8,10 @@ Random.seed!(0)
include("fourierlayer.jl")
end
+ include("deeponet.jl")
@testset "Weights" begin
include("complexweights.jl")
0 commit comments