File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,26 @@ include("../imports.jl")
139139 @test_nowarn apply! (buffer, tfm, image2)
140140 end
141141
142+ @testset ExtendedTestSet " FlipX 2D: flip dimension of 1 = identity" begin
143+ tfm = FlipX {2} ()
144+ img = rand (RGB, 10 , 1 )
145+ item = Image (img)
146+ @test_nowarn titem = apply (tfm, item)
147+ titem = apply (tfm, item)
148+ @test itemdata (titem) == img
149+ end
150+
151+ @testset ExtendedTestSet " FlipZ 3D: flip dimension of 1 = identity" begin
152+ tfm = FlipZ {3} ()
153+ img = rand (RGB, 10 , 10 , 1 )
154+ item = Image (img)
155+ @test_nowarn titem = apply (tfm, item)
156+ titem = apply (tfm, item)
157+ @test itemdata (titem) == img
158+ end
159+
142160 @testset ExtendedTestSet " `RandomCrop` correct indices" begin
143- # Flipping and cropping should be the same as reverse-indexing
161+ # Flipping followed by cropping should be the same as reverse-indexing
144162 # the flipped dimension
145163 tfm = FlipX {2} () |> RandomCrop ((64 , 64 )) |> PinOrigin ()
146164 img = rand (RGB, 64 , 64 )
You can’t perform that action at this time.
0 commit comments