Hi,
Are these values in two different branch of the network or all into the same Tensors?
Also for memory issues, you can try the checkpoint 1 module to reduce memory usage at the cost of some compute.