Cleanup: Remove unused declarations and unnecessary conversions

PiperOrigin-RevId: 178617606
This commit is contained in:
A. Unique TensorFlower 2017-12-11 07:50:08 -08:00 committed by TensorFlower Gardener
parent 309f7e29a6
commit 218caf995a
4 changed files with 6 additions and 9 deletions

View File

@ -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())

View File

@ -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();
}
}

View File

@ -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;

View File

@ -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>