Thanks!
For me save_for_backward complained if what I passed is not input or output.
RuntimeError: save_for_backward can only save input or output tensors, but argument 2 doesn't satisfy this condition

I’ll do the assigning to self.intermediate, I just wanted to check that it does not run into problems with advanced (e.g. parallel) use.