Closed
Description
This behavior of Array(chn)
dropping the third dimension when only a single chain is present was unexpected to me. Is it meant to be this way?
It breaks code that uses mapslices
on the Array over the third dimension, e.g. for computing an output for each sample, that does not check the special case of only a single chain before.
Minimal working example:
chn2 = Chains(rand(3, 2, 1), [:a, :b]);
size(chn2) # 3-dimensional
size(Array(chn2)) # only 2-dimensional
Metadata
Metadata
Assignees
Labels
No labels