ptrblck:

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? 


It makes sense, but I don’t have access to energies per atom :(. The energy of a molecular system comes from something we call the wave function and solving the Schrödinger equation using that function returns only total energies and not atomic ones.
Now with cat sizes match:
torch.Size([2])
torch.Size([2])

But the loss keeps decreasing without the outputs changing. Do you think I should change the forward method?