Could you try to call the model directly instead of model.forward?
I’m not sure, how DataParallelModel is implemented, but if you call the model directly, its internal __call__ method will be used, which will properly register all hooks etc.
Let me know, if that helps.