Great! If you don’t want an additional dimension, you could use torch.cat, but you would end up with 4 values nevertheless so there is a shape mismatch indeed.
If you are dealing with energies for 4 atoms, I would expect the target to also have 4 values. Does it make sense or what am I still missing something?