aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/graph/testlib.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/graph/testlib.cc')
-rw-r--r--tensorflow/core/graph/testlib.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/core/graph/testlib.cc b/tensorflow/core/graph/testlib.cc
index f27229631d..2c49e088c6 100644
--- a/tensorflow/core/graph/testlib.cc
+++ b/tensorflow/core/graph/testlib.cc
@@ -422,6 +422,18 @@ Node* BiasAdd(Graph* g, Node* value, Node* bias) {
return ret;
}
+Node* Conv2D(Graph* g, Node* in0, Node* in1) {
+ Node* ret;
+ TF_CHECK_OK(NodeBuilder(g->NewName("n"), "Conv2D")
+ .Input(in0)
+ .Input(in1)
+ .Attr("T", DT_FLOAT)
+ .Attr("strides", {1, 1, 1, 1})
+ .Attr("padding", "SAME")
+ .Finalize(g, &ret));
+ return ret;
+}
+
void ToGraphDef(Graph* g, GraphDef* gdef) { g->ToGraphDef(gdef); }
} // end namespace graph