Using modifed resnet model with cnn_learner

Hi, this is my first post here. I am trying to implement a paper which modifies the resent18. I started fastai course a few days back and I wanted to see how the modified model works for the pets data Jeremy showed in lecture 1. The modified model can use the pre-trained weights. Anyway I can do this or I will have to do it with pytorch?


How exactly do you want to modify it?

You do a Learner(databunch, model, accuracy) to use a custom architecture.

I want to add double attention blocks between few of its layer based on A2 Nets paper published by FAIR.

Ok I’ll try this out, thank you

I don’t know, if it makes sense, to set the “known layers” to the learned weights, but it is also possible to assign a layer of your new model the weights of a learned old layer with the same shape.

Yep, that’s what I’m trying to do. Thank you for your responses, I’ll implement this on pytorch first. Later on I’ll get it working on fastai