Using latest pkg releases, the example will possibly fail for GPUs because of scalar indexing implicit in the make2d function (the use of a colon argument in reshape). Either use
function make2d(x)
l = length(x)
b = size(x)[end]
reshape(x, div(l, b), b)
end
Using latest pkg releases, the example will possibly fail for GPUs because of scalar indexing implicit in the
make2d
function (the use of a colon argument inreshape
). Either useOr
MLUtils.flatten
which does the same thing.