Training tricks: Is there a bug in mixup?

Hi! I wanted to try out mixup as explained in the docs so following them I wrote this code:

import fastai.callbacks.mixup

The code runs, the metrics are plotted but mixup throws an error. Am I doing something wrong or is it a bug from mixup? Thanks a lot!

If you look carefully, the .mixup is used when creating the Learner, not when training your model.

From the docs:

model = simple_cnn((3,16,16,2))
learner = Learner(data, model, metrics=[accuracy]).mixup()
learner.fit(8)

Ups! You are absolutely right @NathanHub. I will try it again and see if it works!