How to customize a model to Learner?

Hey guys. I am currently working on a 12 leads ECG prediction project, which inputs a 5000 x 12 tensor to output 55 different classes of heart diseases. To make the rest of the work easier, I am thinking maybe there is a way that I can put my model( constructed using pytorch) into a fastai Learner, so that I can use lr_find() and other convenient APIs just like cnn_learner.

I already found that there a way to modify the resnet by cutting layers and adding new layers, but the problem is that the kernel size doesn’t fit well in this condition, so I need to be able to change the kernel size and other settings for Conv layers.

If anyone had done something like this before, please help me out.

If you have any pytorch model that is working just pass it to Learner. Eg Learner(arch=model)


Oh! I didn’t realize we can do that, thank you so much!