How would I approach learning changes in speed using RNNs/LSTMs given x,y coordinates of continuous data? (I have to use a recurrent layer as this is a sub-problem of a bigger end-to-end model that does other things too)
Training data example:
x,y,speed_changed
0,0,0
0,0.1,0
0,0.2,0
0,0.3,0
0,0.5,1
0,0.6,0
0,0.7,0
...
So far I constructed stateful LSTM and train it on one item per batch. After, I reset the state of the LSTM every time there is a change in speed, so I learn that a segment had the same speed (segments can have different lengths).
How do I use such model in production then since the segments have different lengths?
Or is there a better way to train the recurrent net on such data? Perhaps an anomaly detection? (I want to avoid having a fixed batch size (e.g. window of 3 frames))