Skip to content

Commit 56313de

Browse files
author
Vijay Vasudevan
committed
TensorFlow: Doc and linter fixes, some additional tests and
error handling, updates to website. Changes: - Removes redundant reshape from image models by @mrry - Default TensorBoard to localhost by @danmane - Reformatting of tensorflow/core by @josh11b - Make tutorials backwards compatible to 0.5.0 by @girving - Improve print documentation (md files not updated). - Add proper scrolling to sitemap by @martinwicke Base CL: 107956254
1 parent cb9fa5f commit 56313de

File tree

291 files changed

+726
-765
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+726
-765
lines changed

tensorflow/core/common_runtime/device_set_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "tensorflow/core/common_runtime/device_set.h"
22

3-
#include "tensorflow/core/public/status.h"
43
#include <gtest/gtest.h>
4+
#include "tensorflow/core/public/status.h"
55

66
namespace tensorflow {
77
namespace {

tensorflow/core/common_runtime/direct_session.cc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void SchedClosure(std::function<void()> c) {
9393
} // namespace
9494

9595
DirectSession::DirectSession(const SessionOptions& options,
96-
const DeviceMgr* device_mgr)
96+
const DeviceMgr* device_mgr)
9797
: options_(options),
9898
device_mgr_(device_mgr),
9999
cancellation_manager_(new CancellationManager()) {
@@ -155,9 +155,9 @@ Status DirectSession::ExtendLocked(const GraphDef& graph) {
155155
}
156156

157157
Status DirectSession::Run(const std::vector<std::pair<string, Tensor>>& inputs,
158-
const std::vector<string>& output_names,
159-
const std::vector<string>& target_nodes,
160-
std::vector<Tensor>* outputs) {
158+
const std::vector<string>& output_names,
159+
const std::vector<string>& target_nodes,
160+
std::vector<Tensor>* outputs) {
161161
{
162162
mutex_lock l(graph_def_lock_);
163163
if (!graph_created_) {
@@ -379,10 +379,10 @@ void DirectSession::RestoreStatefulNodes(Graph* graph) {
379379
}
380380
}
381381

382-
Status DirectSession::CreateGraphs(gtl::ArraySlice<string> feeds,
383-
gtl::ArraySlice<string> fetches,
384-
gtl::ArraySlice<string> target_nodes,
385-
std::unordered_map<string, Graph*>* outputs) {
382+
Status DirectSession::CreateGraphs(
383+
gtl::ArraySlice<string> feeds, gtl::ArraySlice<string> fetches,
384+
gtl::ArraySlice<string> target_nodes,
385+
std::unordered_map<string, Graph*>* outputs) {
386386
Graph graph(OpRegistry::Global());
387387
GraphConstructorOptions opts;
388388

@@ -462,8 +462,7 @@ Status DirectSession::CreateGraphs(gtl::ArraySlice<string> feeds,
462462
// allow.
463463
device_opts.allow_internal_ops = true;
464464
device_opts.expect_device_spec = true;
465-
Status s =
466-
ConvertGraphDefToGraph(device_opts, graph_def, device_graph);
465+
Status s = ConvertGraphDefToGraph(device_opts, graph_def, device_graph);
467466
if (!s.ok()) {
468467
delete device_graph;
469468
// Also delete other graphs created during the loop.

tensorflow/core/common_runtime/direct_session.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
#include <unordered_map>
77
#include <vector>
88

9-
#include "tensorflow/core/platform/thread_annotations.h"
109
#include "tensorflow/core/common_runtime/device_mgr.h"
1110
#include "tensorflow/core/common_runtime/device_set.h"
1211
#include "tensorflow/core/common_runtime/executor.h"
1312
#include "tensorflow/core/framework/cancellation.h"
1413
#include "tensorflow/core/framework/graph.pb.h"
14+
#include "tensorflow/core/lib/core/errors.h"
1515
#include "tensorflow/core/platform/port.h"
16+
#include "tensorflow/core/platform/thread_annotations.h"
1617
#include "tensorflow/core/public/session.h"
17-
#include "tensorflow/core/public/tensor.h"
18-
#include "tensorflow/core/lib/core/errors.h"
1918
#include "tensorflow/core/public/status.h"
19+
#include "tensorflow/core/public/tensor.h"
2020

2121
namespace tensorflow {
2222

@@ -70,7 +70,7 @@ class DirectSession : public Session {
7070

7171
// Device structures.
7272
const std::unique_ptr<const DeviceMgr> device_mgr_;
73-
std::vector<Device*> devices_; // not owned
73+
std::vector<Device*> devices_; // not owned
7474
DeviceSet device_set_;
7575

7676
string session_handle_;

tensorflow/core/common_runtime/direct_session_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <unordered_map>
66
#include <vector>
77

8+
#include <gtest/gtest.h>
89
#include "tensorflow/core/framework/allocator.h"
910
#include "tensorflow/core/framework/graph.pb.h"
1011
#include "tensorflow/core/framework/tensor_testutil.h"
@@ -18,7 +19,6 @@
1819
#include "tensorflow/core/public/status.h"
1920
#include "tensorflow/core/public/tensor.h"
2021
#include "tensorflow/core/util/device_name_utils.h"
21-
#include <gtest/gtest.h>
2222

2323
namespace tensorflow {
2424
namespace {

tensorflow/core/common_runtime/eigen_thread_pool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef TENSORFLOW_COMMON_RUNTIME_EIGEN_THREAD_POOL_H_
22
#define TENSORFLOW_COMMON_RUNTIME_EIGEN_THREAD_POOL_H_
33

4-
#include "tensorflow/core/lib/core/threadpool.h"
54
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
5+
#include "tensorflow/core/lib/core/threadpool.h"
66

77
namespace tensorflow {
88

tensorflow/core/common_runtime/executor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#include "tensorflow/core/common_runtime/executor.h"
22

33
#include <atomic>
4+
#include <deque>
45
#include <memory>
56
#include <string>
67
#include <unordered_map>
78
#include <unordered_set>
89
#include <vector>
9-
#include <deque>
1010

1111
#include "tensorflow/core/framework/allocator.h"
1212
#include "tensorflow/core/framework/cancellation.h"

tensorflow/core/common_runtime/executor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#include "tensorflow/core/common_runtime/device.h"
55
#include "tensorflow/core/framework/rendezvous.h"
66
#include "tensorflow/core/graph/graph.h"
7-
#include "tensorflow/core/platform/logging.h"
87
#include "tensorflow/core/lib/core/notification.h"
8+
#include "tensorflow/core/platform/logging.h"
99
#include "tensorflow/core/public/status.h"
1010
#include "tensorflow/core/public/tensor.h"
1111

tensorflow/core/common_runtime/gpu/gpu_allocator_retry.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h"
2-
#include "tensorflow/core/public/env.h"
32
#include "tensorflow/core/platform/logging.h"
43
#include "tensorflow/core/platform/port.h"
4+
#include "tensorflow/core/public/env.h"
55

66
namespace tensorflow {
77

tensorflow/core/common_runtime/gpu/gpu_allocator_retry_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include "tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h"
22

3+
#include <gtest/gtest.h>
34
#include "tensorflow/core/lib/core/notification.h"
4-
#include "tensorflow/core/platform/port.h"
55
#include "tensorflow/core/platform/logging.h"
6+
#include "tensorflow/core/platform/port.h"
67
#include "tensorflow/core/platform/thread_annotations.h"
78
#include "tensorflow/core/public/env.h"
8-
#include <gtest/gtest.h>
99

1010
namespace tensorflow {
1111
namespace {

tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h"
22

3-
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
43
#include "tensorflow/stream_executor/multi_platform_manager.h"
54
#include "tensorflow/stream_executor/stream_executor.h"
5+
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
66

77
namespace gpu = ::perftools::gputools;
88

0 commit comments

Comments
 (0)