How are weights calculated in a feed-forward neural network before they are summed up with bias?
Initial weights are simply initialized by the programmer, usually according to some random distribution (e.g. Gaussian). 
There are several well known initializers, such as xavier,
that have been shown to improve the training process.

If you read ML papers, you will see that researchers always mention how they initialized weights for their models so that their results are reproducible.