MCPcopy Create free account
hub / github.com/clab/dynet / lookup_batch

Function lookup_batch

python/dynet_viz.py:249–249  ·  view source on GitHub ↗
(p, indices, update=True)

Source from the content-addressed store, hash-verified

247def inputMatrix(v, d): return GVExpr('inputMatrix', [v, d], make_dim(d, inferred=True))
248def lookup(p, index=0, update=True): return GVExpr('lookup', [p, index, update], p.dim)
249def lookup_batch(p, indices, update=True): return GVExpr('lookup_batch', [p, indices, update], p.dim)
250def pick(a, index=0, dim=0): return GVExpr('pick', [a, index], make_dim(1, inferred=True))
251def pick_batch(a, indices, dim=0): return GVExpr('pick_batch', [a, indices], make_dim(len(indices), inferred=True))
252def hinge(x, index, m=1.0): return GVExpr('hinge', [x, index, m], copy_dim(x))

Callers 2

batchMethod · 0.85
BuildLMGraphMethod · 0.85

Calls 1

GVExprFunction · 0.85

Tested by

no test coverage detected