Skip to content
This repository was archived by the owner on Sep 28, 2024. It is now read-only.

Commit d093556

Browse files
committed
Add a test to check if model description is printed, when defined
- Increase coverage
1 parent 9b97e60 commit d093556

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/nomad.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
model = NOMAD((length(a), 22, length(a)), (length(a) + length(sensors), length(sensors)), σ, tanh; init_approximator=Flux.glorot_normal, bias_decoder=false)
2222
y = model(a, sensors)
2323
@test size(y) == (1, 16)
24+
# Check if model description is printed, when defined
25+
@test repr(model) == "NOMAD with\nApproximator net: (Chain(Dense(16 => 22, σ), Dense(22 => 16, σ)))\nDecoder net: (Chain(Dense(32 => 16, tanh; bias=false)))\n"
2426

2527
mgrad = Flux.Zygote.gradient(() -> sum(model(a, sensors)), Flux.params(model))
2628
@info mgrad.grads

0 commit comments

Comments
 (0)