redo
This commit is contained in:
parent
5dca80bd68
commit
33c901c191
|
@ -24,7 +24,7 @@ julia> chunk(1:10, 3)
|
|||
"""
|
||||
chunk(xs, n) = collect(Iterators.partition(xs, ceil(Int, length(xs)/n)))
|
||||
|
||||
batchindex(xs, i) = (reverse(Base.tail(reverse(axes(xs))))..., i)
|
||||
batchindex(xs, i) = (reverse(Base.tail(reverse(indices(xs))))..., i)
|
||||
|
||||
"""
|
||||
frequencies(xs)
|
||||
|
|
|
@ -90,9 +90,3 @@ end
|
|||
m = RNN(10, 5)
|
||||
@test size.(params(m)) == [(5, 10), (5, 5), (5,), (5,)]
|
||||
end
|
||||
|
||||
@testset "batch" begin
|
||||
xs = [[1,2,3],[4,5,6]]
|
||||
X = [1 4; 2 5; 3 6]
|
||||
@test batch(xs) == X
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue