We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getobs!(buffer, data::BatchView, idx)
buffer
For example,
using MLUtils buffer = zeros(3,2) data = BatchView(rand(3,100); batchsize = 2) getobs!(buffer, data, 1) buffer == zeros(3,2) # true
Looks like it just falls back to getobs defined here. This leads to e.g. DataLoader never calling getobs! when batchsize > 0:
getobs
DataLoader
getobs!
batchsize > 0
struct DummyData{X} x::X end MLUtils.numobs(data::DummyData) = numobs(data.x) MLUtils.getobs(data::DummyData, idx) = getobs(data.x, idx) MLUtils.getobs!(buffer, data::DummyData, idx) = error("getobs! is called") data = DummyData(rand(3,100)) collect(DataLoader(data; batchsize=1, buffer=true)) # no error collect(DataLoader(data; batchsize=0, buffer=true)) # error
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
For example,
Looks like it just falls back to
getobs
defined here. This leads to e.g.DataLoader
never callinggetobs!
whenbatchsize > 0
:The text was updated successfully, but these errors were encountered: