I am a self-taught python user so my knowledge is limited, I want to know how to debug my packaged model if something goes wrong in a certain operation. A basic example would be:
model = [ conv1, bn1, relu1, conv2, bn2, relu2] model = nn.Sequential( *model ) model(tensor)
Say if you run into shape error and you would like to check the input before a particular calculation how do you do it?
Right now I am trying to experiment with nn.Sequential more, with a Class function I can explicitly define and check each forward step for errors, what are some tips on debugging a packaged model?
Yeah, more or less.
You could use register_backward_hook on a module, but note the warning, as this might not give you the expected results for complex modules.