Skip to content

Commit 9c3043f

Browse files
committed
TensorFlow: Improve performance of Alexnet
Changes: * error message that refers to removed `DefaultSession` method. * -Wnull-conversion warnings * the "_start_time" attr for recvs when the flag "--brain_enable_scheduling_for_recvs" is set. * typo in tutorial data download progress message. * a typo ("however their installing"=>"however installing"). * typo, rename "TensorFlow Mechanics" to "How To" to be consistent with the website. * a typo ("subtact"=>"subtract"). * protobuf examples in comments in tensorflow::Example.proto. * formula formatting in MNIST beginner tutorial * negative fraction-of-queue-full stats * protobuf inclusion path so that Android demo will build under Blaze. * small typo (moderatly > moderately) * Session.run() to check that tensor arguments come from the session's graph. * another six import * seq2seq typo in bazel command Base CL: 108349164
1 parent f7918e1 commit 9c3043f

File tree

1,271 files changed

+18402
-1067
lines changed

Some content is hidden

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

1,271 files changed

+18402
-1067
lines changed

ACKNOWLEDGMENTS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Some of TensorFlow's code is derived from Caffe, which is subject to the following copyright notice:
1+
## Some of TensorFlow's code is derived from Caffe, which is subject to the following copyright notice:
22

33
COPYRIGHT
44

tensorflow/__init__.py

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright 2015 Google Inc. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ==============================================================================
15+
116
# Bring in all of the public TensorFlow interface into this
217
# module.
318
# pylint: disable=wildcard-import

tensorflow/cc/ops/array_grad.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/core/framework/function.h"
217
#include "tensorflow/core/lib/core/errors.h"
318

tensorflow/cc/ops/cc_op_gen.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
// TODO(josh11b): Rewrite function parameter names to avoid C++ keywords
217
// or "opts".
318

tensorflow/cc/ops/cc_op_gen.h

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#ifndef TENSORFLOW_CC_OPS_CC_OP_GEN_H_
217
#define TENSORFLOW_CC_OPS_CC_OP_GEN_H_
318

tensorflow/cc/ops/cc_op_gen_main.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/cc/ops/cc_op_gen.h"
217
#include "tensorflow/core/framework/op.h"
318
#include "tensorflow/core/framework/op_def.pb.h"

tensorflow/cc/ops/const_op.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/cc/ops/const_op.h"
217

318
#include "tensorflow/core/framework/types.h"

tensorflow/cc/ops/const_op.h

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#ifndef TENSORFLOW_CC_OPS_CONST_OP_H_
217
#define TENSORFLOW_CC_OPS_CONST_OP_H_
318

tensorflow/cc/ops/functional_grad.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/core/framework/function.h"
217
#include "tensorflow/core/lib/core/errors.h"
318

tensorflow/cc/ops/math_grad.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/core/framework/function.h"
217
#include "tensorflow/core/lib/core/errors.h"
318

tensorflow/cc/ops/nn_grad.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/core/framework/function.h"
217
#include "tensorflow/core/lib/core/errors.h"
318

tensorflow/cc/ops/standard_ops.h

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
// #include this file to get access to the standard set of C++ graph
217
// definition libraries.
318

tensorflow/cc/tutorials/example_trainer.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include <cstdio>
217
#include <functional>
318
#include <string>

tensorflow/core/BUILD

+4
Original file line numberDiff line numberDiff line change
@@ -607,13 +607,15 @@ filegroup(
607607
"//tensorflow/core:kernels/cwise_op_add.cc",
608608
"//tensorflow/core:kernels/cwise_op_div.cc",
609609
"//tensorflow/core:kernels/cwise_op_exp.cc",
610+
"//tensorflow/core:kernels/cwise_op_less.cc",
610611
"//tensorflow/core:kernels/cwise_op_log.cc",
611612
"//tensorflow/core:kernels/cwise_op_mul.cc",
612613
"//tensorflow/core:kernels/cwise_op_sigmoid.cc",
613614
"//tensorflow/core:kernels/cwise_op_sqrt.cc",
614615
"//tensorflow/core:kernels/cwise_op_square.cc",
615616
"//tensorflow/core:kernels/cwise_op_sub.cc",
616617
"//tensorflow/core:kernels/cwise_op_tanh.cc",
618+
"//tensorflow/core:kernels/dynamic_partition_op.cc",
617619
"//tensorflow/core:kernels/lrn_op.cc",
618620
"//tensorflow/core:kernels/maxpooling_op.cc",
619621
"//tensorflow/core:kernels/maxpooling_op.h",
@@ -629,6 +631,8 @@ filegroup(
629631
"//tensorflow/core:kernels/transpose_op.cc",
630632
"//tensorflow/core:kernels/transpose_op.h",
631633
"//tensorflow/core:kernels/transpose_op_functor.h",
634+
"//tensorflow/core:kernels/where_op.cc",
635+
"//tensorflow/core:kernels/where_op.h",
632636
],
633637
visibility = ["//visibility:public"],
634638
)

tensorflow/core/client/tensor_c_api.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/core/public/tensor_c_api.h"
217

318
#include <memory>

tensorflow/core/client/tensor_c_api_test.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/core/public/tensor_c_api.h"
217

318
#include <gtest/gtest.h>

tensorflow/core/common_runtime/device.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/core/common_runtime/device.h"
217

318
#include "tensorflow/core/framework/op_segment.h"

tensorflow/core/common_runtime/device.h

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
// A Device is a something that can perform computations as part of a
217
// model. Devices can be local (runs computation on this machine), or
318
// remote (contacts a device local to another machine using an RPC to

tensorflow/core/common_runtime/device_factory.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/core/common_runtime/device_factory.h"
217

318
#include <memory>

tensorflow/core/common_runtime/device_factory.h

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#ifndef TENSORFLOW_COMMON_RUNTIME_DEVICE_FACTORY_H_
217
#define TENSORFLOW_COMMON_RUNTIME_DEVICE_FACTORY_H_
318

tensorflow/core/common_runtime/device_mgr.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2015 Google Inc. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "tensorflow/core/common_runtime/device_mgr.h"
217

318
#include "tensorflow/core/common_runtime/local_device.h"

0 commit comments

Comments
 (0)