$35
Q1
Consider the following problem. There is a sequence of words representing positive integers, e.g.
["three", "one", "four", "one", "five", "two", "five", "three", "five"] and we want to know, for each token, the central moving average of the associated numbers, with a window size of 3. That is, .
The result for the above example should be [4/3, 8/3,2, 10/3, 8/3,4, 10/3, 13/3, 8/3].
Construct, manually, a bidirectional RNN structure and associated weights that will solve this problem. This should be in the form of a flowchart identifying inputs and outputs, weights, sums, and activation functions, along with any necessary auxiliary text. You may use only weights, sums, and scalar activation functions. Assume that the vocabulary is encoded as:
{
"five": [1,0,0,0,0],
"four": [0,1,0,0,0],
"one": [0,0,1,0,0],
"three": [0,0,0,1,0],
"two": [0,0,0,0,1],
}
Note that for your bidirectional RNN, you should specify the form of the forward cell, the backward cell, and the output (non-recurrent) cell.