diff options
author | Mingsheng Hong <hongm@google.com> | 2018-03-09 19:07:44 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-09 19:11:36 -0800 |
commit | a9bb191793e8e8c924b6a19f645610809b1dae62 (patch) | |
tree | d39702d206596b1518465ba49e0e484ab8979b22 /tensorflow/c/c_test_util.cc | |
parent | 54d785dfdcb4eb6758741e20a6d111fda577dc99 (diff) |
Unified test util PlaceHolderFloat() into PlaceHolder(), and extended the latter
to take a TF_DataType param.
PiperOrigin-RevId: 188570493
Diffstat (limited to 'tensorflow/c/c_test_util.cc')
-rw-r--r-- | tensorflow/c/c_test_util.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tensorflow/c/c_test_util.cc b/tensorflow/c/c_test_util.cc index 53346a8cdf..22f77e7b87 100644 --- a/tensorflow/c/c_test_util.cc +++ b/tensorflow/c/c_test_util.cc @@ -102,16 +102,10 @@ void PlaceholderHelper(TF_Graph* graph, TF_Status* s, const char* name, ASSERT_NE(*op, nullptr); } -TF_Operation* Placeholder(TF_Graph* graph, TF_Status* s, const char* name) { +TF_Operation* Placeholder(TF_Graph* graph, TF_Status* s, const char* name, + TF_DataType dtype) { TF_Operation* op; - PlaceholderHelper(graph, s, name, TF_INT32, &op); - return op; -} - -TF_Operation* PlaceholderFloat(TF_Graph* graph, TF_Status* s, - const char* name) { - TF_Operation* op; - PlaceholderHelper(graph, s, name, TF_FLOAT, &op); + PlaceholderHelper(graph, s, name, dtype, &op); return op; } |