MiniFastai
MiniFastai.Databunch
— TypeDatabunch(train_loader::Flux.Data.DataLoader,val_loader::Flux.Data.DataLoader)
Two dataloaders, one for the train set and one for the validation set.
MiniFastai.normalize
— Methodnormalize(x,m,s)
Substract scalar m
from array x
and rescale by scalar s
.
MiniFastai.normalize_imgs
— Methodnormalize_imgs(imgs, labels; is_train=true, m=0, s=1)
Take a onehot encoding of the labels. If is_train=true
, compute the mean and std of the images and normalize them. Return the normalized images and the mean and std computed. Otherwise, normalize the imgs with m
and s
. Should be used with is_train=true
on the train set and with is_train=false
otherwise with the parameters m
and s
computed on the training set.