Co-authored-by: pevnak <pevnak@gmail.com>
This commit is contained in:
Johan Gustafsson 2018-05-02 15:51:04 +02:00
parent 7d7d89569c
commit 51e7e1b40f
1 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,14 @@ gradtest(f, dims...) = gradtest(f, rand.(dims)...)
@test gradtest(vcat, rand(5), rand(3))
@test gradtest(vcat, rand(5), rand(3), rand(8))
@test gradtest(vcat, rand(5,2), rand(3,2), rand(8,2))
@test gradtest((i...) -> cat(1,i...), rand(5), rand(3))
@test gradtest((i...) -> cat(1,i...), rand(5), rand(8))
@test gradtest((i...) -> cat(1,i...), rand(5,2),rand(3,2), rand(8,2))
@test gradtest((i...) -> cat(2,i...), rand(5,1), rand(5,1))
@test gradtest((i...) -> cat(2,i...), rand(5,1), rand(5,4))
@test gradtest((i...) -> cat(2,i...), rand(5,2),rand(5,4), rand(5,8))
@test gradtest(x -> permutedims(x, [3,1,2]), rand(4,5,6))
@test gradtest(x -> repmat(x, 5,5), rand(4,5))