Fix warning of type conversion in array_ops.cc

Change: 155273711
This commit is contained in:
A. Unique TensorFlower 2017-05-05 22:46:14 -08:00 committed by TensorFlower Gardener
parent 1959ae333f
commit 1182c93e3e

View File

@ -550,7 +550,7 @@ REGISTER_OP("SplitV")
return errors::InvalidArgument( return errors::InvalidArgument(
"Length of size_splits should be equal to num_outputs"); "Length of size_splits should be equal to num_outputs");
} }
int cumsum_outputs = 0; int64_t cumsum_outputs = 0;
bool has_neg_one = false; bool has_neg_one = false;
// If the sizes of the splits are known, then // If the sizes of the splits are known, then
// make sure that the sizes add up to the expected // make sure that the sizes add up to the expected
@ -568,7 +568,7 @@ REGISTER_OP("SplitV")
else else
cumsum_outputs += data[i]; cumsum_outputs += data[i];
} }
int split_dim_size = c->Value(c->Dim(input, split_dim)); auto split_dim_size = c->Value(c->Dim(input, split_dim));
if (has_neg_one) { if (has_neg_one) {
if (cumsum_outputs < split_dim_size) if (cumsum_outputs < split_dim_size)
cumsum_outputs = split_dim_size; cumsum_outputs = split_dim_size;