taskdataloaders
function
defined in module
FastAI
taskdataloaders(data, task[, batchsize])
taskdataloaders(traindata, validdata, task[, batchsize; shuffle = true, dlkwargs...])
Create training and validation
DataLoader
s from two data containers
(traindata, valdata)
. If only one container
data
is passed, splits it into two, with
pctgvalid
% of the data going into the validation split.
Positional:
batchsize = 16
Keyword:
shuffle = true
: Whether to shuffle the training data container
validbsfactor = 2
: Factor to multiply batchsize for validation data loader with (validation batches can be larger since no GPU memory is needed for the backward pass)
All remaining keyword arguments are passed to
DataLoader
.
Basic usage:
traindl
,
validdl
=
taskdataloaders
(
data
,
task
,
128
)
Explicit validation data container and no shuffling of training container:
traindl
,
validdl
=
taskdataloaders
(
traindata
,
validdata
,
task
,
shuffle
=
false
)
Customizing the
DataLoader
traindl
,
validdl
=
taskdataloaders
(
data
,
task
,
parallel
=
false
,
buffered
=
false
)
There are
2
methods for FastAI.taskdataloaders
:
The following pages link back here:
Custom learning tasks, Glossary, Image segmentation, Introduction, Keypoint regression, Performant data pipelines, Siamese image similarity, TimeSeries Classification, Variational autoencoders, tsregression
FastAI.jl , learner.jl , tasks/taskdata.jl , tasks/segmentation.jl