Any different between model(input) and model.forward(input) (original) (raw)
fmassa (Francisco Massa) June 5, 2017, 5:18am 2
You should avoid calling Module.forward
.
The difference is that all the hooks are dispatched in the __call__
function, so if you call .forward
and have hooks in your model, the hooks won’t have any effect
18 Likes
Potential solution to different forward for train and inference + IDE support for forward args