Can you give pseudo code of what you want to do? I’m not sure to understand.
Do you mean this?
model = Model()
for sample in data:
    out = model(sample)
    # more stuff
    del model
    # Then the second iteration will fail because model does not exist anymore!