Hey, I am facing a similar error as you mention in the question. However, doing input.requires_grad = True fixes the error. Could you elaborate as to why you are using a dummy variable and not the input itself? What exactly is the overhead you are talking about?