MCPcopy Index your code
hub / github.com/lisa-lab/DeepLearningTutorials / _slice

Function _slice

code/lstm.py:169–172  ·  view source on GitHub ↗
(_x, n, dim)

Source from the content-addressed store, hash-verified

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')])

Callers 1

_stepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected