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

Method TensorTest

tests/test-tensor.cc:17–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16struct TensorTest {
17 TensorTest() {
18 // initialize if necessary
19 if (default_device == nullptr) {
20 for (auto x : {"TensorTest", "--dynet-mem", "10"}) {
21 av.push_back(strdup(x));
22 }
23 ADD_EXTRA_ARGUMENTS(av)
24 char **argv = &av[0];
25 int argc = av.size();
26 dynet::initialize(argc, argv);
27 }
28
29 batch_vals = {1.f, 2.f, 1.f, 4.f, 5.f, 6.f};
30 }
31 ~TensorTest() {
32 for (auto x : av) free(x);
33 }

Callers

nothing calls this directly

Calls 2

initializeFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected