Hi,
You can simply pass the other_tensor to the optimizer like other parameters.
For instance, let’s assume we have two models model0 and model1 and other_tensor to be optimized:
optim = torch.optim.Adam(params=itertools.chain(list(model0.parameters()), list(model1.parameters()), [other_tensor]))

Bests