Doubt regarding inception v3 monkey patching
In cnn_archs notebook you mentioned we need to monkey patch the forward pass(excluding final layers). But it seems like you've also excluded initial transform_input part as well.
if self.transform_input:
x = x.clone()
x[:, 0] = x[:, 0] * (0.229 / 0.5) + (0.485 - 0.5) / 0.5
x[:, 1] = x[:, 1] * (0.224 / 0.5) + (0.456 - 0.5) / 0.5
x[:, 2] = x[:, 2] * (0.225 / 0.5) + (0.406 - 0.5) / 0.5
Although I tried to add these lines to your notebook and it ran without any issue. But is there any specific reason to skip this part ?
Hi @Kshitij09,
You're right, I think I copied the _forward function of this line, rather than the forward function, so I overlooked the transform input part...
@PPPW thanks for the clarification. Excellent work btw. this notebook has helped me a lot!
Can I use this thread to ask any further questions or do you have any forum for discussion?
Hi @Kshitij09, I'm glad you find it useful! Yes, feel free to ask any questions in here or in the fastai forum, I'm also learning and will happy to discuss