aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David G. Andersen <dga@google.com>2016-03-23 20:58:57 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-03-23 22:03:38 -0700
commit5e06a231344f6324cc5054b867b0eb8cbeb37771 (patch)
treed9768f6c929381c37b117a8082020564d5757833
parentf4ebdaba60d2fb2698d14ee87960e3a6294be196 (diff)
Fix int64 implicit downcast
Change: 118000502
-rw-r--r--tensorflow/core/kernels/bcast_ops.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/kernels/bcast_ops.cc b/tensorflow/core/kernels/bcast_ops.cc
index 7a45f4cfea..8ab038a4b7 100644
--- a/tensorflow/core/kernels/bcast_ops.cc
+++ b/tensorflow/core/kernels/bcast_ops.cc
@@ -60,10 +60,10 @@ class BCastGradArgsOp : public OpKernel {
private:
void Output(OpKernelContext* ctx, int idx, const BCast::Vec& v) {
- const int len = v.size();
+ const int64 len = v.size();
Tensor* o = nullptr;
OP_REQUIRES_OK(ctx, ctx->allocate_output(idx, TensorShape({len}), &o));
- for (int i = 0; i < len; ++i) o->flat<int32>()(i) = v[i];
+ for (int64 i = 0; i < len; ++i) o->flat<int32>()(i) = v[i];
}
TF_DISALLOW_COPY_AND_ASSIGN(BCastGradArgsOp);