I am trying to use the Test Time Augmentation on my Classifier:
log_preds,y = learn.TTA(scale=1.1, ds_type=DatasetType.Valid, with_loss=True)
And this is the error that it threw:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-14-f33d9737819a> in <module>()
----> 1 log_preds,y = learn.TTA(scale=1.1, ds_type=DatasetType.Valid, with_loss=True)
2 probs = np.mean(np.exp(log_preds),0)
3
4 accuracy(probs, y)
ValueError: too many values to unpack (expected 2)
Initially, I tried to find a way to use my custom test set in TTA but couldn’t figure out how to do it and DatasetType.Test was throwing an error so I decided to go with DatasetType.Valid and after running 8 epochs, I got the above error.
The error message indicate that learn.TTA
returns more than 2 values,but you only got log_preds
and y
for them.
You want to find out what exactly does learn.TTA
return