Thanks for your replay and sorry to late check.
My question is about a calculating partial derivatives.
Here is an example.

캡처685×637 63.8 KB

To find the slope of the network, the output values are required.
a1, a2, a3 are output values  of training.
This is my question.
The output value is used to obtain the slop.
but the evaluation of the model is calculated twice in the code above.
    anchors_output = model(anchors)
    neighbors_output = model(neighbors) 

What evaluation values ​​are used to find the slope?
Thanks.