How Tenserflow figures out weights for every neuron/unit with one output set

In the coffee roasting lab, which uses a 2 layered neural network,the training data gives the x values and the expected y values. How is tenserflow able to train the optimal weights and biases for every unit/neuron with just the final expected y values? Wouldnt each neuron/unit need its own y value set to train on since each one is running its own logistic regression?

Thank You!

Hi @YahshA , welcome to the community.
Regarding your question, neurons don’t need their own labels because backpropagation lets the network adjust all weights, including for the hidden layers, based on how they affect the final prediction error. TensorFlow uses the chain rule to compute gradients for each weight and updates them using optimizers like Adam or SGD. So even though only the final output y is given, all neurons learn useful features to reduce the loss. In other words, the final output is enough for the training. This is treated in detail in the first course of the Deep Learning Specialization (DLS). A recommended sequence is to enroll in the DLS after Machine learning Specialization.

2 Likes