From 6a7ebd2a06795b690d62a08c724e8854539eb16b Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 3 Dec 2024 11:34:49 +0530 Subject: [PATCH] test: add a test for pooling layers --- test/contrib/debug_tests.jl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/contrib/debug_tests.jl b/test/contrib/debug_tests.jl index 6de0618743..a8b0109450 100644 --- a/test/contrib/debug_tests.jl +++ b/test/contrib/debug_tests.jl @@ -151,3 +151,20 @@ end @test !any(isnan, gs.layer_3.bias) end end + +@testitem "Debugging Tools: Issue #1068" setup=[SharedTestSetup] tags=[:misc] begin + model = Chain( + Conv((3, 3), 3 => 16, relu; stride=2), + MaxPool((2, 2)), + AdaptiveMaxPool((2, 2)), + GlobalMaxPool() + ) + + model_debug = Lux.Experimental.@debug_mode model + display(model_debug) + + @test model_debug[1] isa Lux.Experimental.DebugLayer + @test model_debug[2] isa Lux.Experimental.DebugLayer + @test model_debug[3] isa Lux.Experimental.DebugLayer + @test model_debug[4] isa Lux.Experimental.DebugLayer +end