Fastai2 Test Time Augmentation

Just letting everyone know that on the issue associated with this on Github a workaround was identified and a pull request has been submitted. The workaround is set the learner epoch to zero right before calling tta. For example

learn.epoch = 0
preds = learn.tta(dl=tst_dl, n=5)

Updates on Github at: Fastai2 Test Time Augmentation

6 Likes

learn.epoch = 0 solved my problem, so as you.

In 07_sizing_and_tta.ipynb for fastbook, precisely https://njk94tug.gradient.paperspace.com/notebooks/course-v4/nbs/07_sizing_and_tta.ipynb, I had got the same error message, AttributeError: 'NBProgressBar' object has no attribute 'start_t'.

Thanks the posts.

@bpisaacoff
do oyu know how i can get get_preds work with item_tfms.
I am not using batch_tfms but item tfms, tta uses item tfms which contains Center Crop that makes the image size uniform , but during get preds during test time dsnt calls item tfms so my loader fails with different image sizes.