diff options
author | 2016-06-24 15:44:06 -0800 | |
---|---|---|
committer | 2016-06-24 16:47:40 -0700 | |
commit | 3fc8c8349a152cbfeac4f29df6a33d1a0fda390d (patch) | |
tree | 2a17d9bb7256bdbed7fb19084eb69fc98af96129 /tensorflow/core/graph/testlib.cc | |
parent | ad62daacadb2e53712761ff44cf7d8ddb84be63a (diff) |
Added more ops to testlib.
Change: 125829994
Diffstat (limited to 'tensorflow/core/graph/testlib.cc')
-rw-r--r-- | tensorflow/core/graph/testlib.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tensorflow/core/graph/testlib.cc b/tensorflow/core/graph/testlib.cc index ddd20d5adf..f27229631d 100644 --- a/tensorflow/core/graph/testlib.cc +++ b/tensorflow/core/graph/testlib.cc @@ -403,6 +403,25 @@ Node* Relu(Graph* g, Node* in) { return ret; } +Node* Relu6(Graph* g, Node* in) { + Node* ret; + TF_CHECK_OK(NodeBuilder(g->NewName("n"), "Relu6") + .Input(in, 0) + .Attr("T", DT_FLOAT) + .Finalize(g, &ret)); + return ret; +} + +Node* BiasAdd(Graph* g, Node* value, Node* bias) { + Node* ret; + TF_CHECK_OK(NodeBuilder(g->NewName("n"), "BiasAdd") + .Input(value) + .Input(bias) + .Attr("T", DT_FLOAT) + .Finalize(g, &ret)); + return ret; +} + void ToGraphDef(Graph* g, GraphDef* gdef) { g->ToGraphDef(gdef); } } // end namespace graph |