ImageClassifierData.from_dls

I’m trying to trace this error raised by the ImageClassifierData.from_dls class.

The base class for ImageClassifierData.from_dls is the ModelData class.

In turn, the ModelData.from_dls classmethod calls the ModelDataLoader class.

The ModelDataLoader constructor def __init__(self, dl): self.dl=dl only has one argument.

What am I missing here?

TypeError                                 Traceback (most recent call last)
<ipython-input-34-be017b3cd2d0> in <module>()
----> 1 a = ImageClassifierData.from_dls(path=PATH, trn_dl=train_loader, val_dl=val_loader, test_dl=test_loader)

~/fastai/courses/dl1/fastai/dataset.py in from_dls(cls, path, trn_dl, val_dl, test_dl)
    191         trn_dl,val_dl = ModelDataLoader(trn_dl),ModelDataLoader(val_dl)
    192         if test_dl: test_dl = ModelDataLoader(test_dl)
--> 193         return cls(path, trn_dl, val_dl, test_dl)
    194 
    195     @property

TypeError: __init__() missing 1 required positional argument: 'classes'

Immediately after you get the error, type %debug in a cell to enter the debugger. Then use the standard python debugger commands to follow your code to see what’s happening. If you remind me, I’ll show how to do this on Monday. (cc @yinterian)

I’m having the same problem @dgovender did you solve it?