I have a model:
class model(nn.Module):
def __init__(self, ...., train=True):
...
if train:
....
Which inside if
they produce some networks. I would like to produce two instances of the same mode:
main_model = model(...)
pivot_model = model(....,train=False)
But what I see is that even in the pivot_model
I can see the networks in the if
statement. This is not what I have expected.