You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# DataLoader compatibility passing a vector of graphs and# effectively using `batch` as a collated function.
MLUtils.numobs(data::Vector{<:GNNGraph}) =length(data)
MLUtils.getobs(data::Vector{<:GNNGraph}, i::Int) = data[i]
MLUtils.getobs(data::Vector{<:GNNGraph}, i) = Flux.batch(data[i])
that make for a nice interaction with MLUtils.DataLoader since we have automatic batching a.k.a. collating.
On the other hand, this doesn't well play well with other transformations in MLUtils, where one ends up with a batched graph even if they didn't want to:
Let's wait for the outcome of the discussion in JuliaML/MLUtils.jl#90 and for whatever DataLoader Flux is exporting to have a collate option before solving this issue.
We currently have the following definitions
that make for a nice interaction with
MLUtils.DataLoader
since we have automatic batching a.k.a. collating.On the other hand, this doesn't well play well with other transformations in MLUtils, where one ends up with a batched graph even if they didn't want to:
We should remove the automatic batching from here, and the
DataLoader
itself should provide automatic batching by callingMLUtils.batch
The text was updated successfully, but these errors were encountered: