I am using a pretrained VGG model,
model = models.vgg19(pretrained=True)

and interested in adding hand-crafted features before the model.classifier forward pass.
So, I am actually interested in doing:
feat = model.features( image )
model.classifier([feat,additional_features])

and then backpropagation to update the weights of the classifier, and the feature extraction layers.
What is the best way to write this in Pytorch? (I thought of writing a new class named “VGG_extended” that do the forward pass as required, but I am not exactly sure how the backprop will work in this case… Is there any simple solution?)
Thanks in advance!