I am trying to Predict Sum of the Sequence based on flag but my model is not able to converge.
for each time stamp, include the first element in sum if second number is 1 in Sequence.
Example
[[50,1],[40,0]]
[[150,1],[4,1]]
[[60,0],[40,1]]
[[760,0],[400,0]]
Output Should be:
50
154
40
0
Which model should I use? I am trying lstm using tflearn but result doesn't seems to be good.