Hi! I’m trying to get two representation of the same input in model.eval() and model.train(), respectively. I write the following codes:
for id, batch in enumerate(loader):
model.train()
rep1 = model(batch.text)
model.eval()
rep2 = model(bacth.text)
However, it seems it didn’t work, so is there any ways to do that?