Solved by googlebot in post #2 
              
              
                Identify the tensor. set_detect_anomaly will show the line where it was used, “output 0 of UnsqueezeBackward0” refers to earlier creation, that may be not as useful as shape.

Manually search for further mutating uses of that tensor. Its _version attribute will change somewhere.
Yes, this is annoyi…