Flux.jl/src/dims/seq.jl

21 lines
423 B
Julia
Raw Normal View History

2016-10-26 11:37:48 +00:00
export seq, Seq, BatchSeq
immutable Seq{T,S} <: AbstractVector{T}
data::CatMat{T,S}
end
@forward Seq.data size, eltype, getindex, setindex!, rawbatch
Seq(xs) = Seq(CatMat(xs))
convert{T,S}(::Type{Seq{T,S}},storage::S) =
Seq{T,S}(storage)
@render Juno.Inline b::Seq begin
Tree(Row(Text("Seq of "), eltype(b),
Juno.fade("[$(length(b))]")),
Juno.trim(collect(b)))
end
2016-10-26 11:37:48 +00:00
2017-03-14 16:51:31 +00:00
BatchSeq{T<:Seq} = Batch{T}