convertel for batch
This commit is contained in:
parent
8db503eafa
commit
b79e536c13
@ -36,3 +36,7 @@ function rebatch(xs)
|
|||||||
B = Array{eltype(xs),dims+1}
|
B = Array{eltype(xs),dims+1}
|
||||||
Batch{T,B}(xs)
|
Batch{T,B}(xs)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
convertel(T::Type, xs::Batch) =
|
||||||
|
isa(eltype(eltype(xs)), T) ? xs :
|
||||||
|
Batch(map(x->convertel(T, x), xs))
|
||||||
|
Loading…
Reference in New Issue
Block a user