albanD:

If you try to print the weight after the del, you should get that you module has no attribute ‘weight’, is that what you get?


yes, I get that error msg:
AttributeError: 'Linear' object has no attribute 'weight'