Merge the outputs of a bidirectional RNN by concatenating the forward and backward hidden states along the last (feature) axis. Both inputs must have the same shape except for the last dimension.
Implement solve(forward, backward).
Returns. Return a NumPy array whose last dimension is the sum of the two input feature sizes. Mismatched leading dimensions raise ValueError.
Example 1
Input:
solve([[1.0, 2.0], [3.0, 4.0]], [[5.0], [6.0]])
Output:
[[1.0, 2.0, 5.0], [3.0, 4.0, 6.0]]
Example 2
Input:
solve([[1.0]], [[2.0]])
Output:
[[1.0, 2.0]]
No results yet
Run your code to check it against the examples, or submit to run every test.