Hi Sukhad!



 sukhadj:

    global_model_copy = global_model.copy()



What is .copy()?  Is that a method you implemented yourself?
Could you post a complete, runnable mini-script that illustrates
your loss_anom definition, your call to loss_anom() and your
call to loss.backward()?  (Create some dummy data for your
models, as appropriate, to keep your example script self-contained.)
Please also post the output of your mini-script, together with your
expectations for what it should have produced.
Best.
K. Frank