aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/summary_op.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-03-29 07:20:53 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-03-29 08:33:42 -0700
commitfe60adfb9d46f662f6ee216db23409efdbbb20e2 (patch)
tree1cef61a185b3dc0f2250f0e586a5cc2a4eee6cb4 /tensorflow/core/kernels/summary_op.cc
parent7b8cd1642b7d4bb08021480c8e130ba76d857452 (diff)
Add explicit casts for a few ops that assumed it could implicitly cast to/from
float and int for all types T. (The assumption doesn't hold for Eigen::half.) These were all ops I could find in CPU implementation; probably, some remain for GPU (and some other problems remain before we can turn on Eigen::half for all of them). Change: 118464463
Diffstat (limited to 'tensorflow/core/kernels/summary_op.cc')
-rw-r--r--tensorflow/core/kernels/summary_op.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/kernels/summary_op.cc b/tensorflow/core/kernels/summary_op.cc
index 9fd5a4a6fc..16e5b0a0ff 100644
--- a/tensorflow/core/kernels/summary_op.cc
+++ b/tensorflow/core/kernels/summary_op.cc
@@ -52,7 +52,7 @@ class SummaryScalarOp : public OpKernel {
for (int i = 0; i < Ttags.size(); i++) {
Summary::Value* v = s.add_value();
v->set_tag(Ttags(i));
- v->set_simple_value(Tvalues(i));
+ v->set_simple_value(T(Tvalues(i)));
}
Tensor* summary_tensor = nullptr;
@@ -92,7 +92,7 @@ class SummaryHistoOp : public OpKernel {
errors::OutOfRange("Nan in summary histogram for: ", name()));
break;
}
- histo.Add(v);
+ histo.Add(static_cast<double>(v));
}
Summary s;