Recently torchvision was updated with pretrained models for faster r-cnn (and more):
I’ve been trying to get it to play nice with fastai but it seems to be incompatible, or am I missing something?
I had it up to the point where I was able to create a Learner (with its constructor), but the main problem seems to be that the loss function is baked into the model. In training mode the model expects images and targets (model(images, targets)
) so that the model can produce the loss(es).
The fastai Learner
's fit()
(or actually in loss_batch()
) would only pass images.
I see how a some of the complexity was abstracted away like this, but still… thinking of compatibility, why did they decide to do this?
Is there some feature in fastai that I’ve missed that anticipates this sort of behavior?
I’ve been at it a few days now but so far haven’t been able to make it work. I guess to get it working one would need to:
a) clone and alter most of the torchvision detection code; or
b) create a custom learner?; or
c) hopefully something better that I haven’t discovered yet
Has anyone else had more luck with this?