t in adam optimizer I'm newbie in NN and I get confused about frequency t in adam optimizer. if I have NN with architecture like this:

Can't it be said that Xk (k=1,2,..., n), where n is the number of input data? in the example above n=4. In adam optimization we calculate the gradient t with the following formula:

is it right if we can write gt ($t=1, 2, \dotsc, n$)? but $n$ here is what? if seen from the example picture above how many $n$ there?
 A: 
Can't it be said that Xk (k=1,2,..., n), where n is the number of
input data? in the example above n=4.

Sure, you can use the notation $n$ for that.

is it right if we can write gt ($t=1, 2, \dotsc, n$)? but $n$ here is what? if seen from the example picture above how many $n$ there?

Now $n$ is the maximum number of iterations in your optimization algorithm. This is defined by you a priori. This $n$ has nothing to do with the previous definition for $n$.
A: TL;DR the $t_i$ do not have to do with adam specifically. Instead, they seem like class frequencies in a multi-class classification problem.
During training you are finding the optimal parameters for the neural network. Those parameters are the coefficients of the links between the different nodes.
The coefficients are updated by improving the cost function in small steps and each step a change to the coefficients is made according to the gradient of the cost function with respect to the coefficient values. The adam optimizer does this in a particular fashion by adapting the stepsizes during each step.
The $t_i$ in your example seem to relate to a multi-class classification (with 3 classes). Given some predictors $x_k$ (4 of them) you wish to come up with an estimator $y_i$ for the frequencies $t_i$ of classes. The $t_i$ represents how often you observe class $i$ and $y_i$ represents your predicted probability for class $i$.
The derivatives should not be relative to the frequencies $t_i$ but relative to the coefficients in the NN. In the image these coefficients are not drawn, but it should probably be something like weights $w_{i,j}$ and $w_{j,k}$ (which are respectively 3x5 and 5x4 in number), and potentially there are more parameters then just those weights.
