Skip to content

Commit

Permalink
hcat tests FluxML#194
Browse files Browse the repository at this point in the history
Co-authored-by: Elliot Saba <staticfloat@gmail.com>
  • Loading branch information
gustafsson and staticfloat committed May 2, 2018
1 parent 51e7e1b commit 59324c0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/tracker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))

Expand Down

0 comments on commit 59324c0

Please sign in to comment.