But if I do have 3D -> 1D, then how will the training work? If the second layer has 3D, but  the output is 1D, how will the weights for the second layer get updated? Will it calculate 3  separate gradients for all 3 elements only for the second layer, and deeper layers will have only 1 shared gradient?