The candidate is what the unit would move to if it were fully updated. The reset gate lets the unit ignore the old state when computing that candidate, so it can start a fresh representation after an irrelevant part of the input.
Implement gru_candidate(x, h, r, W, U), which returns tanh(W x + U (r * h)).
h element-wise before the recurrent product.Compute r * h first, apply U to it, add W x, then tanh.
No results yet
Run your code to check it against the examples, or submit to run every test.