Hi,
I have a situation that looks like this:
model = resnet50()
classifier = nn.Linear(1000, 20)

x = model(input)
out1 = classifier(x)
out2 = classifier(x.detach()) # Computation to avoid

where the classifier is expensive and would like to avoid recomputing out2_d = classifier(x.detach())
Can we use out1 to backward with x detached ?
Thank you