Using Learner capabilities with custom modules


I’m trying to define my own pytorch model and then use the fastai Learner to train it, so I can take advantage of the rate finder and cyclical learning rates.
What is the simplest way to do that, assuming I already have the data in a numpy array? The code I could find in DL1 course notebooks use things like ColumnarModelData.get_learner or ConvLearner.pretrained but I didn’t see an easy example of using it with your own model.

After looking through code and experimenting I got it to work using ArraysIndexDataset and BasicModel. Is that correct or is there another way? You can see my code in the notebook here

1 Like