guard test on 1.0

This commit is contained in:
Mike Innes 2019-11-15 15:59:42 +00:00
parent 665e441919
commit e24215ca98

View File

@ -191,6 +191,7 @@ end
end end
if VERSION >= v"1.1"
@testset "GroupNorm" begin @testset "GroupNorm" begin
# begin tests # begin tests
squeeze(x) = dropdims(x, dims = tuple(findall(size(x) .== 1)...)) # To remove all singular dimensions squeeze(x) = dropdims(x, dims = tuple(findall(size(x) .== 1)...)) # To remove all singular dimensions
@ -289,5 +290,5 @@ end
x = Float32.(reshape(collect(1:prod(sizes)), sizes)) x = Float32.(reshape(collect(1:prod(sizes)), sizes))
@test BN(x) GN(x) @test BN(x) GN(x)
end end
end
end end