code: def remove_attributes(self, model):
          
          for child in model.children():
              if 'nn.modules.container' in str(type(child)):
                  self.remove_attributes(child)
              else:
                  try:
                      del child.x
                  except AttributeError:
                      pass
                  try:
                      del child.y
                  except AttributeError:
                      pass
docs: Removes the x and y attributes which were added by the forward handles
          Recursively searches for non-container layers