I am using TensorFlow and Python to create custom neural network. I need to make changes on weights and biases before each input data is passed. The architecture of network is common (sequential, supervised, with backpropagation) and the only difference is that before each pass I need to make some calculations.
So for example I have some inputs (x) and before I pass them throught the network and calculate network results (y), in each pass I need to run a function to change the weights. My question is how would be possible to do that and after I calculate new weights and biases, that the network calculates everything else (whole network calculation, loss, and optimization functions) further normally? If it is possible how could I reach weights and then create that additional custom step?