diff options
author | 2016-08-09 11:16:12 -0800 | |
---|---|---|
committer | 2016-08-09 12:31:24 -0700 | |
commit | a8c58014ee62b48e31a7bb627924a92fa8ff6258 (patch) | |
tree | e6902d7ded50ead0efeb820a015b7f63ec5c2578 /tensorflow/core/util/tensor_slice_writer.cc | |
parent | 1df3fb0b4ae5915364f09e233496e98a99a4a886 (diff) |
Fixing int32 assumption for save_restore_tensor.cc and adding a python "end to end" test for saving large partition variables.
Change: 129778368
Diffstat (limited to 'tensorflow/core/util/tensor_slice_writer.cc')
-rw-r--r-- | tensorflow/core/util/tensor_slice_writer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/util/tensor_slice_writer.cc b/tensorflow/core/util/tensor_slice_writer.cc index bef421e8cf..8907aa6522 100644 --- a/tensorflow/core/util/tensor_slice_writer.cc +++ b/tensorflow/core/util/tensor_slice_writer.cc @@ -173,11 +173,11 @@ size_t TensorSliceWriter::MaxBytesPerElement(DataType dt) { } template <> -Status TensorSliceWriter::SaveData(const string* data, int num_elements, +Status TensorSliceWriter::SaveData(const string* data, int64 num_elements, SavedSlice* ss) { size_t size_bound = ss->ByteSize() + kTensorProtoHeaderBytes + (num_elements * MaxBytesPerElement(DT_INT32)); - for (int i = 0; i < num_elements; ++i) { + for (int64 i = 0; i < num_elements; ++i) { size_bound += data[i].size(); } if (size_bound > kMaxMessageBytes) { |