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

Method setUp

tests/python/test.py:327–334  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

325class TestBatchManipulation(unittest.TestCase):
326
327 def setUp(self):
328 # create model
329 self.m = dy.ParameterCollection()
330 # Parameter
331 self.p = self.m.add_lookup_parameters((2, 3))
332 # Values
333 self.pval = np.asarray([[1, 2, 3], [4, 5, 6]], dtype=np.float32)
334 self.p.init_from_array(self.pval)
335
336 def test_lookup_batch(self):
337 dy.renew_cg()

Callers

nothing calls this directly

Calls 3

ParameterCollectionMethod · 0.80
init_from_arrayMethod · 0.80
add_lookup_parametersMethod · 0.45

Tested by

no test coverage detected