MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / VarVector

Function VarVector

tensorflow/core/kernels/sdca_ops_test.cc:57–65  ·  view source on GitHub ↗

Returns a vector of size 'nodes' with each node being of size 'node_size'.

Source from the content-addressed store, hash-verified

55
56// Returns a vector of size 'nodes' with each node being of size 'node_size'.
57std::vector<Node*> VarVector(Graph* const g, const int nodes,
58 const int node_size) {
59 std::vector<Node*> result;
60 result.reserve(nodes);
61 for (int i = 0; i < nodes; ++i) {
62 result.push_back(Var(g, node_size));
63 }
64 return result;
65}
66
67Node* Zeros(Graph* const g, const TensorShape& shape) {
68 Tensor data(DT_FLOAT, shape);

Callers 1

GetGraphsFunction · 0.85

Calls 3

VarFunction · 0.70
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected