This is really amazing work! I have learned so much about fastai2 from this code repo. However, I am struggling to make a small addition. I'm trying to add the aug_transforms list into get_action_dataloaders. In another project I did something like this.
tfms = aug_transforms(max_zoom=1.2, max_lighting=0.3) mean = [0.16724987, 0.1670983 , 0.18462411] std = [0.19008317, 0.1897096 , 0.20567844] dblock = DataBlock(blocks=(ImageBlock, CategoryBlock), getters=getters, splitter=IndexSplitter(idxs), item_tfms=[Resize(image_size)],batch_tfms=[*tfms, Normalize.from_stats(mean, std)])
Adding the batch_tfms I have above into the method below doesn't seem to generate the transforms in the images. Where would I add aug_transforms here?
def get_action_dataloaders(files, bs=8, image_size=64, seq_len=20, val_idxs=None, random_sample=False): "Create a dataloader with
val_idxs splits" splits = RandomSplitter()(files) if val_idxs is None else IndexSplitter(val_idxs)(files) itfm = ImageTupleTfm(random_sample=random_sample, seq_len=seq_len) ds = Datasets(files, tfms=[[itfm], [parent_label, Categorize]], splits=splits) dls = ds.dataloaders(bs=bs, after_item=[Resize(image_size), ToTensor], batch_tfms=[*tfms, Normalize.from_stats(mean, std)], after_batch=[IntToFloatTensor, Normalize.from_stats(*imagenet_stats)], drop_last=True) return dls