I am building an autoencoder with the ImageImageLIst class
I am able to create the data but I don’t get resizing of the output.
pct = 0.1
sample = 5000
src = (ImageImageList.from_df(df=df_.sample(sample), path=PATH, folder=TRAIN_AUG, suffix='.png')
.random_split_by_pct(pct, seed=42)
)
def get_data(sz=64, bs=64):
data = (src.label_from_func(lambda x: x)
.transform(tfms, size=sz, tfms_y=True)
.databunch(bs=bs).normalize(stats, do_y=True)
)
data.c = 3
return data
This only applies tfms and not the resize to output.
data = get_data(64, 2)
x,y = next(iter(data.train_dl))
>>(torch.Size([2, 3, 64, 64]), torch.Size([2, 3, 512, 512]))