General Utilities for Custom Dataset

Flux3D.Dataset.CustomDatasetType
CustomDataset

Minimal Custom Dataset. CustomDataset also support indexing and slicing.

Fields:

  • length::Int - Length of dataset.
  • getdata::Function - Function which takes idx as input and returns corresponding data

Available Contructor:

  • CustomDataset(length::Int, getdata::Function)
  • CustomDataset(;length::Int, getdata::Function)

Examples:

julia> x = rand(10,32)
julia> getdata(idx) = x[idx,:]
julia> dset = CustomDataset(size(x,1), getdata)
julia> [x[1,:], x[2,:]] == dset[1:2]
source