How to load a model for pytorch1.6 using pytorch1.11

hello，I have a model that runs successfully on pytorch 1.6, but it gets an error on pytorch 1.11:

TypeError: the first argument must be callable

Looking forward to your reply

Could you post a minimal, executable code snippet reproducing this issue in 1.11, please?