aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tensorflow/contrib/lite/testing/generated_examples_zip_test.cc2
-rw-r--r--tensorflow/contrib/lite/toco/tooling_util.cc4
-rw-r--r--tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc2
-rw-r--r--tensorflow/core/kernels/bucketize_op.cc7
4 files changed, 6 insertions, 9 deletions
diff --git a/tensorflow/contrib/lite/testing/generated_examples_zip_test.cc b/tensorflow/contrib/lite/testing/generated_examples_zip_test.cc
index f8f6044b62..3b3266738c 100644
--- a/tensorflow/contrib/lite/testing/generated_examples_zip_test.cc
+++ b/tensorflow/contrib/lite/testing/generated_examples_zip_test.cc
@@ -102,7 +102,7 @@ class ZipEnvironment : public ::testing::Environment {
tensorflow::SubProcess proc;
string unzip_binary =
"/usr/bin/unzip";
- proc.SetProgram(unzip_binary, {"unzip", "-d", dir, zip.c_str()});
+ proc.SetProgram(unzip_binary, {"unzip", "-d", dir, zip});
proc.SetChannelAction(tensorflow::CHAN_STDOUT, tensorflow::ACTION_PIPE);
proc.SetChannelAction(tensorflow::CHAN_STDERR, tensorflow::ACTION_PIPE);
if (!proc.Start())
diff --git a/tensorflow/contrib/lite/toco/tooling_util.cc b/tensorflow/contrib/lite/toco/tooling_util.cc
index 65bf1f215a..21b85c86cc 100644
--- a/tensorflow/contrib/lite/toco/tooling_util.cc
+++ b/tensorflow/contrib/lite/toco/tooling_util.cc
@@ -30,7 +30,6 @@ limitations under the License.
#include "tensorflow/contrib/lite/toco/toco_port.h"
#include "tensorflow/core/platform/logging.h"
-
namespace toco {
string LogName(const Operator& op) {
@@ -996,8 +995,7 @@ void ResolveModelFlags(const ModelFlags& model_flags, Model* model) {
<< dst_input_array->shape().dims(i);
}
} else {
- dst_input_array->mutable_shape()->CopyFrom(
- specified_input_array.shape());
+ *dst_input_array->mutable_shape() = specified_input_array.shape();
}
}
diff --git a/tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc b/tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc
index 9629e074ee..d6bc8614f9 100644
--- a/tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc
+++ b/tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc
@@ -447,7 +447,7 @@ NodeDef* ArithmeticOptimizer::AddNode(const string& name,
AddPrefixToNodeName(name, kArithmeticOptimizer);
node_map_->AddNode(NodeName(name_with_prefix), new_node);
if (node_to_copy != nullptr) {
- new_node->CopyFrom(*node_to_copy);
+ *new_node = *node_to_copy;
}
new_node->set_name(name_with_prefix);
return new_node;
diff --git a/tensorflow/core/kernels/bucketize_op.cc b/tensorflow/core/kernels/bucketize_op.cc
index c1693de538..4e4b6d5215 100644
--- a/tensorflow/core/kernels/bucketize_op.cc
+++ b/tensorflow/core/kernels/bucketize_op.cc
@@ -25,10 +25,8 @@ limitations under the License.
namespace tensorflow {
-using thread::ThreadPool;
-
-typedef Eigen::ThreadPoolDevice CPUDevice;
-typedef Eigen::GpuDevice GPUDevice;
+using CPUDevice = Eigen::ThreadPoolDevice;
+using GPUDevice = Eigen::GpuDevice;
namespace functor {
@@ -49,6 +47,7 @@ struct BucketizeFunctor<CPUDevice, T> {
return Status::OK();
}
};
+
} // namespace functor
template <typename Device, typename T>