aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/graph/testlib.cc
diff options
context:
space:
mode:
authorGravatar Ben Lee <blee@google.com>2016-12-13 11:15:34 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-12-13 11:23:20 -0800
commit41a48abe8da762290794e48ef11ce389674e1077 (patch)
treedfada8cc85fa2982f8f9fede36a7812bc16fe65b /tensorflow/core/graph/testlib.cc
parent40b2061d07b76840db4869a4e4ca8bc9026c6616 (diff)
Add ConcatV2 test helper method
Change: 141915811
Diffstat (limited to 'tensorflow/core/graph/testlib.cc')
-rw-r--r--tensorflow/core/graph/testlib.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/tensorflow/core/graph/testlib.cc b/tensorflow/core/graph/testlib.cc
index a9fe92acc8..65dd4d9230 100644
--- a/tensorflow/core/graph/testlib.cc
+++ b/tensorflow/core/graph/testlib.cc
@@ -351,6 +351,20 @@ Node* Concat(Graph* g, Node* concat_dim, gtl::ArraySlice<Node*> tensors) {
return ret;
}
+Node* ConcatV2(Graph* g, gtl::ArraySlice<Node*> tensors, Node* concat_dim) {
+ std::vector<NodeBuilder::NodeOut> nodeouts;
+ nodeouts.reserve(tensors.size());
+ for (auto const t : tensors) {
+ nodeouts.emplace_back(t);
+ }
+ Node* ret;
+ TF_CHECK_OK(NodeBuilder(g->NewName("n"), "ConcatV2")
+ .Input(nodeouts)
+ .Input(concat_dim)
+ .Finalize(g, &ret));
+ return ret;
+}
+
Node* Next(Graph* g, const string& name, Node* input) {
Node* ret;
TF_CHECK_OK(