Co-authored-by: Elliot Saba <staticfloat@gmail.com>
This commit is contained in:
Johan Gustafsson 2018-05-02 15:22:59 +02:00
parent 51e7e1b40f
commit 59324c0f91
1 changed files with 6 additions and 2 deletions

View File

@ -33,6 +33,10 @@ gradtest(f, dims...) = gradtest(f, rand.(dims)...)
@test gradtest(vcat, rand(5), rand(3), rand(8))
@test gradtest(vcat, rand(5,2), rand(3,2), rand(8,2))
@test gradtest(vcat, rand(5,2,3), rand(3,2,3), rand(8,2,3))
@test gradtest(hcat, rand(5), rand(5), rand(5,2))
@test gradtest(hcat, rand(5,2), rand(5,3), rand(5,5))
@test gradtest(hcat, rand(5,2,3), rand(5,3,3), rand(5,5,3))
@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))
@ -45,9 +49,9 @@ gradtest(f, dims...) = gradtest(f, rand.(dims)...)
@test gradtest(x -> repmat(x, 5,5), rand(4,5))
@test gradtest(x -> repmat(x, 5), rand(4,5))
@test gradtest(kron,rand(5), rand(3))
@test gradtest(kron, rand(5), rand(3))
@test gradtest(kron, rand(5), rand(3), rand(8))
@test gradtest(kron,rand(5,1), rand(3,1))
@test gradtest(kron, rand(5,1), rand(3,1))
@test gradtest(kron, rand(5,1), rand(3,1), rand(8,1))
@test gradtest(kron, rand(5,2), rand(3,2), rand(8,2))