-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
The function linked below references A, which is not defined.
function _create_buffer(x::BatchView)
obsindices = _batchrange(x, 1)
return [getobs(A.data, idx) for idx in enumerate(obsindices)]
end
I encountered this when using a custom collate function together with buffer.
function shift_pair(X)
inputs = map(X) do x
T = size(x, 4)
return selectdim(x, 4, 1:(T-1))
end
targets = map(X) do x
T = size(x, 4)
return selectdim(x, 4, 2:T)
end
return (stack(inputs), stack(targets))
end
trajectory = randn(Float32, 32, 32, 4, 3, 5);
loader = DataLoader(
trajectory;
batchsize=2,
partial=false,
buffer=true,
collate = shift_pair,
)
Metadata
Metadata
Assignees
Labels
No labels