This is my first question, suggestions are appreciated!
I built a model similar to this one.
I am using model.predict(inputs)
to make predictions and I built my custom functions and process to make it learn. It seems to work and when it predicts all seems good.
Some days ago, I watched this video: https://youtu.be/8HyCNIVRbSU?t=284 (It starts in the part that generated my question) And I copied the image that caught my attention: It says that each input is inserted sequentially on each cell, and each cell will provide more information to the next in that order.
I began to wonder if my implementation is correct and I will give you all the details that might be useful.
stateful=True
for both GRU layers.model.predict(inputs)
is defined like inputs = [np.array(arr).reshape(1, 1, 6), np.array(arr2).reshape(1, 1, 4)]
.model.predict
. Because of this, if there is another way to be able to send both the static and "dynamic data", I would be happy to do it.Now, with all this information, the question would be:
In a course of forward pass (either predict()
or fit()
) GRU (and other RNNs) takes the first item from your sequence, recalculates its state, takes the second item, recalculates its state and so on.