(_x, n, dim)
| 167 | assert mask is not None |
| 168 | |
| 169 | def _slice(_x, n, dim): |
| 170 | if _x.ndim == 3: |
| 171 | return _x[:, :, n * dim:(n + 1) * dim] |
| 172 | return _x[:, n * dim:(n + 1) * dim] |
| 173 | |
| 174 | def _step(m_, x_, h_, c_): |
| 175 | preact = tensor.dot(h_, tparams[_p(prefix, 'U')]) |