Thanks a lot! I think the issue had to do with the model not being called properly. I also fixed forw to the proper forward function to avoid hooks from being detatched.
I have one more issue with the model–turns out that none of the x’s in the forward method retains a gradient after calling backwards, which is presumably why my network is performing so poorly. Do you notice anything in the above model that would cause such issues? Or could pre-processing of input images (before the forward() call) influence the computational graph anyhow? Truly appreciate your help @ptrblck