aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--README.md8
-rw-r--r--RELEASE.md4
-rw-r--r--WORKSPACE2
-rwxr-xr-xconfigure7
-rw-r--r--tensorflow/BUILD7
-rw-r--r--tensorflow/contrib/BUILD1
-rw-r--r--tensorflow/contrib/cmake/tf_python.cmake1
-rw-r--r--tensorflow/contrib/graph_editor/reroute.py6
-rw-r--r--tensorflow/contrib/hooks/BUILD54
-rw-r--r--tensorflow/contrib/hooks/README.md30
-rw-r--r--tensorflow/contrib/hooks/__init__.py32
-rw-r--r--tensorflow/contrib/hooks/python/__init__.py24
-rw-r--r--tensorflow/contrib/hooks/python/training/__init__.py22
-rw-r--r--tensorflow/contrib/hooks/python/training/profiler_hook.py104
-rw-r--r--tensorflow/contrib/hooks/python/training/profiler_hook_test.py122
-rw-r--r--tensorflow/contrib/imperative/README.md155
-rw-r--r--tensorflow/contrib/learn/python/learn/datasets/mnist.py4
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py4
-rw-r--r--tensorflow/contrib/learn/python/learn/experiment.py3
-rw-r--r--tensorflow/contrib/makefile/README.md4
-rwxr-xr-xtensorflow/contrib/makefile/compile_android_protobuf.sh2
-rw-r--r--tensorflow/contrib/pi_examples/label_image/label_image.cc1
-rw-r--r--tensorflow/contrib/rnn/BUILD2
-rw-r--r--tensorflow/contrib/sparsemax/python/ops/sparsemax.py1
-rw-r--r--tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py1
-rw-r--r--tensorflow/core/BUILD21
-rw-r--r--tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc3
-rw-r--r--tensorflow/core/kernels/segment_reduction_ops.cc2
-rw-r--r--tensorflow/core/lib/hash/crc32c_accelerate.cc6
-rw-r--r--tensorflow/core/ops/ops.pbtxt53
-rw-r--r--tensorflow/core/platform/posix/error.cc2
-rw-r--r--tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc1
-rw-r--r--tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h2
-rw-r--r--tensorflow/core/public/version.h2
-rw-r--r--tensorflow/examples/learn/boston.py9
-rw-r--r--tensorflow/examples/learn/iris_custom_model.py2
-rw-r--r--tensorflow/examples/learn/mnist.py2
-rw-r--r--tensorflow/examples/learn/multiple_gpu.py2
-rwxr-xr-xtensorflow/examples/learn/resnet.py2
-rw-r--r--tensorflow/examples/learn/text_classification_character_cnn.py4
-rw-r--r--tensorflow/examples/tutorials/word2vec/word2vec_basic.py2
-rw-r--r--tensorflow/examples/udacity/1_notmnist.ipynb2
-rw-r--r--tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.summary.TaggedRunMetadata.md244
-rw-r--r--tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.summary.SummaryDescription.md237
-rw-r--r--tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.test.TestCase.md521
-rw-r--r--tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.summary.SummaryDescription.RegisterExtension.md4
-rw-r--r--tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.summary.SummaryDescription.FromString.md4
-rw-r--r--tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.summary.TaggedRunMetadata.RegisterExtension.md4
-rw-r--r--tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.summary.TaggedRunMetadata.FromString.md4
-rw-r--r--tensorflow/g3doc/api_docs/python/summary.md481
-rw-r--r--tensorflow/g3doc/api_docs/python/test.md521
-rw-r--r--tensorflow/g3doc/get_started/os_setup.md98
-rw-r--r--tensorflow/g3doc/how_tos/style_guide.md2
-rw-r--r--tensorflow/go/example_inception_inference_test.go2
-rw-r--r--tensorflow/go/genop/main.go2
-rw-r--r--tensorflow/go/op/generate.go1
-rw-r--r--tensorflow/python/BUILD36
-rw-r--r--tensorflow/python/framework/errors_impl.py2
-rw-r--r--tensorflow/python/framework/function.py4
-rw-r--r--tensorflow/python/framework/op_def_library.py4
-rw-r--r--tensorflow/python/framework/op_def_library_test.py3
-rw-r--r--tensorflow/python/kernel_tests/constant_op_test.py6
-rw-r--r--tensorflow/python/kernel_tests/variables_test.py6
-rw-r--r--tensorflow/python/lib/io/file_io.py4
-rw-r--r--tensorflow/python/lib/io/file_io_test.py1
-rw-r--r--tensorflow/python/ops/array_grad.py1
-rw-r--r--tensorflow/python/ops/array_ops.py4
-rw-r--r--tensorflow/python/ops/control_flow_ops.py46
-rw-r--r--tensorflow/python/ops/variables.py5
-rw-r--r--tensorflow/python/training/supervisor.py2
-rw-r--r--tensorflow/python/training/sync_replicas_optimizer_test.py1
-rw-r--r--tensorflow/stream_executor/BUILD14
-rw-r--r--tensorflow/stream_executor/cuda/cuda_dnn.cc4
-rw-r--r--tensorflow/stream_executor/dso_loader.cc6
-rw-r--r--tensorflow/stream_executor/rng.cc2
-rw-r--r--tensorflow/tensorboard/README.md2
-rw-r--r--tensorflow/tensorboard/backend/BUILD2
-rw-r--r--tensorflow/tensorboard/bower/BUILD2
-rw-r--r--tensorflow/tensorflow.bzl5
-rw-r--r--tensorflow/tools/ci_build/Dockerfile.android7
-rw-r--r--tensorflow/tools/compatibility/README.md6
-rw-r--r--tensorflow/tools/dist_test/server/Dockerfile2
-rw-r--r--tensorflow/tools/dist_test/server/Dockerfile.test2
-rw-r--r--tensorflow/tools/docker/Dockerfile2
-rw-r--r--tensorflow/tools/docker/Dockerfile.devel2
-rw-r--r--tensorflow/tools/docker/Dockerfile.devel-gpu2
-rw-r--r--tensorflow/tools/docker/Dockerfile.gpu2
-rw-r--r--tensorflow/tools/pip_package/setup.py2
-rw-r--r--tensorflow/workspace.bzl24
-rw-r--r--third_party/curl.BUILD8
-rw-r--r--third_party/eigen3/BUILD4
-rw-r--r--third_party/gpus/cuda/BUILD.tpl12
-rw-r--r--third_party/gpus/cuda_configure.bzl2
-rw-r--r--third_party/mkl/build_defs.bzl2
-rwxr-xr-xthird_party/sycl/crosstool/computecpp.tpl4
97 files changed, 1895 insertions, 1196 deletions
diff --git a/.gitignore b/.gitignore
index e1fa12ea6a..07dd151380 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ node_modules
*.pyc
__pycache__
*.swp
+.vscode/ \ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 36f2f9808e..5ae5c0fbbc 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -21,7 +21,7 @@ If you have improvements to TensorFlow, send us your pull requests! For those
just getting started, Github has a [howto](https://help.github.com/articles/using-pull-requests/).
If you want to contribute but you're not sure where to start, take a look at the
-[issues with the "contributions welcome" label](https://github.com/tensorflow/tensorflow/labels/contributions%20welcome).
+[issues with the "contributions welcome" label](https://github.com/tensorflow/tensorflow/labels/stat%3Acontributions%20welcome).
These are issues that we believe are particularly well suited for outside
contributions, often because we probably won't get to them right now. If you
decide to start on an issue, leave a comment so that other people know that
diff --git a/README.md b/README.md
index 40e8a4b190..2dc3dcb3e6 100644
--- a/README.md
+++ b/README.md
@@ -33,10 +33,10 @@ and discussion.**
People who are a little more adventurous can also try our nightly binaries:
-* Linux CPU-only: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc1-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave)) / [Python 3.4](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc1-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/)) / [Python 3.5](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc1-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/))
-* Linux GPU: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc1-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/)) / [Python 3.4](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc1-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/)) / [Python 3.5](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc1-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/))
-* Mac CPU-only: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc1-py2-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/)) / [Python 3](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc1-py3-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/))
-* Mac GPU: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-mac/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc1-py2-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-mac/)) / [Python 3](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-mac/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc1-py3-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-mac/))
+* Linux CPU-only: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave)) / [Python 3.4](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/)) / [Python 3.5](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/))
+* Linux GPU: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/)) / [Python 3.4](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/)) / [Python 3.5](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/))
+* Mac CPU-only: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-py2-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/)) / [Python 3](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-py3-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/))
+* Mac GPU: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-mac/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-py2-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-mac/)) / [Python 3](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-mac/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-py3-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-mac/))
* [Android](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-android/TF_BUILD_CONTAINER_TYPE=ANDROID,TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=NO_PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=android-slave/lastSuccessfulBuild/artifact/bazel-out/local_linux/bin/tensorflow/examples/android/tensorflow_demo.apk) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-android/TF_BUILD_CONTAINER_TYPE=ANDROID,TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=NO_PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=android-slave/))
* Android: [demo APK](https://ci.tensorflow.org/view/Nightly/job/nightly-android/lastSuccessfulBuild/artifact/out/tensorflow_demo.apk), [native libs](http://ci.tensorflow.org/view/Nightly/job/nightly-android/lastSuccessfulBuild/artifact/out/native/)
([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-android/))
diff --git a/RELEASE.md b/RELEASE.md
index ab3ecbd774..e9f0361511 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -193,7 +193,7 @@ answered questions, and were part of inspiring discussions.
indexing now starts from 1 instead of 0, and `bus_id==0` is used where
previously `BUS_ANY` was used.
* `Env::FileExists` and `FileSystem::FileExists` now return a tensorflow::Status
- intead of a bool. Any callers to this function can be converted to a bool
+ instead of a bool. Any callers to this function can be converted to a bool
by adding .ok() to the call.
* The C API type `TF_SessionWithGraph` has been renamed to `TF_Session`,
indicating its preferred use in language bindings for TensorFlow.
@@ -212,7 +212,7 @@ answered questions, and were part of inspiring discussions.
* `SparseTensor.shape` has been renamed to `SparseTensor.dense_shape`. Same for
`SparseTensorValue.shape`.
* `Env::FileExists` and `FileSystem::FileExists` now return a
- `tensorflow::Status` intead of a bool. Any callers to this function can be
+ `tensorflow::Status` instead of a bool. Any callers to this function can be
converted to a bool by adding `.ok()` to the call.
* C API: Type `TF_SessionWithGraph` has been renamed to `TF_Session`, indicating
its preferred use in language bindings for TensorFlow. What was previously
diff --git a/WORKSPACE b/WORKSPACE
index 958a53c30e..43354da196 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -480,7 +480,7 @@ new_http_archive(
)
new_http_archive(
- name = "polymer_archive",
+ name = "polymer",
build_file = "bower.BUILD",
url = "https://github.com/polymer/polymer/archive/v1.7.0.tar.gz",
strip_prefix = "polymer-1.7.0",
diff --git a/configure b/configure
index 4f1dc2a910..5a9a7c0d30 100755
--- a/configure
+++ b/configure
@@ -418,7 +418,12 @@ while true; do
fi
if is_linux; then
- CUDNN_PATH_FROM_LDCONFIG="$(ldconfig -p | sed -n 's/.*libcudnn.so .* => \(.*\)/\1/p')"
+ if ! type ldconfig > /dev/null 2>&1; then
+ LDCONFIG_BIN=/sbin/ldconfig
+ else
+ LDCONFIG_BIN=ldconfig
+ fi
+ CUDNN_PATH_FROM_LDCONFIG="$($LDCONFIG_BIN -p | sed -n 's/.*libcudnn.so .* => \(.*\)/\1/p')"
if [ -e "${CUDNN_PATH_FROM_LDCONFIG}${TF_CUDNN_EXT}" ]; then
export TF_CUDNN_VERSION
export CUDNN_INSTALL_PATH="$(dirname ${CUDNN_PATH_FROM_LDCONFIG})"
diff --git a/tensorflow/BUILD b/tensorflow/BUILD
index b442f1a215..a6a7278b5f 100644
--- a/tensorflow/BUILD
+++ b/tensorflow/BUILD
@@ -104,6 +104,12 @@ config_setting(
visibility = ["//visibility:public"],
)
+config_setting(
+ name = "freebsd",
+ values = {"cpu": "freebsd"},
+ visibility = ["//visibility:public"],
+)
+
package_group(
name = "internal",
packages = ["//tensorflow/..."],
@@ -164,6 +170,7 @@ filegroup(
"//tensorflow/contrib/framework:all_files",
"//tensorflow/contrib/graph_editor:all_files",
"//tensorflow/contrib/grid_rnn:all_files",
+ "//tensorflow/contrib/hooks:all_files",
"//tensorflow/contrib/image:all_files",
"//tensorflow/contrib/imperative:all_files",
"//tensorflow/contrib/input_pipeline:all_files",
diff --git a/tensorflow/contrib/BUILD b/tensorflow/contrib/BUILD
index be635a3773..7d66ed12d4 100644
--- a/tensorflow/contrib/BUILD
+++ b/tensorflow/contrib/BUILD
@@ -25,6 +25,7 @@ py_library(
"//tensorflow/contrib/framework:framework_py",
"//tensorflow/contrib/graph_editor:graph_editor_py",
"//tensorflow/contrib/grid_rnn:grid_rnn_py",
+ "//tensorflow/contrib/hooks",
"//tensorflow/contrib/image:image_py",
"//tensorflow/contrib/imperative",
"//tensorflow/contrib/input_pipeline:input_pipeline_py",
diff --git a/tensorflow/contrib/cmake/tf_python.cmake b/tensorflow/contrib/cmake/tf_python.cmake
index 376a1c0062..bd9ba93608 100644
--- a/tensorflow/contrib/cmake/tf_python.cmake
+++ b/tensorflow/contrib/cmake/tf_python.cmake
@@ -264,6 +264,7 @@ add_python_module("tensorflow/contrib/grid_rnn")
add_python_module("tensorflow/contrib/grid_rnn/python")
add_python_module("tensorflow/contrib/grid_rnn/python/kernel_tests")
add_python_module("tensorflow/contrib/grid_rnn/python/ops")
+add_python_module("tensorflow/contrib/hooks")
add_python_module("tensorflow/contrib/image")
add_python_module("tensorflow/contrib/image/python")
add_python_module("tensorflow/contrib/image/python/ops")
diff --git a/tensorflow/contrib/graph_editor/reroute.py b/tensorflow/contrib/graph_editor/reroute.py
index c14bcac3be..386ce9eb06 100644
--- a/tensorflow/contrib/graph_editor/reroute.py
+++ b/tensorflow/contrib/graph_editor/reroute.py
@@ -448,7 +448,7 @@ def remove_control_inputs(op, cops):
def add_control_inputs(op, cops):
- """Add the control inputs cops to co.
+ """Add the control inputs cops to op.
Warning: this function is directly manipulating the internals of the tf.Graph.
@@ -464,8 +464,8 @@ def add_control_inputs(op, cops):
cops = _util.make_list_of_op(cops, allow_graph=False)
for cop in cops:
if cop in op.control_inputs:
- raise ValueError("{} is already a control_input of {}".format(op.name,
- cop.name))
+ raise ValueError("{} is already a control_input of {}".format(cop.name,
+ op.name))
# pylint: disable=protected-access
op._control_inputs += cops
op._recompute_node_def()
diff --git a/tensorflow/contrib/hooks/BUILD b/tensorflow/contrib/hooks/BUILD
new file mode 100644
index 0000000000..b6920ffd3d
--- /dev/null
+++ b/tensorflow/contrib/hooks/BUILD
@@ -0,0 +1,54 @@
+# Description:
+# Contains `SessionRunHook`s for use with `MonitoredSession` and the
+# wrappers around it.
+
+licenses(["notice"]) # Apache 2.0
+
+exports_files(["LICENSE"])
+
+package(default_visibility = ["//tensorflow:__subpackages__"])
+
+load("//tensorflow:tensorflow.bzl", "py_test")
+
+py_library(
+ name = "hooks",
+ srcs = [
+ "__init__.py",
+ "python/training/__init__.py",
+ "python/training/profiler_hook.py",
+ ],
+ srcs_version = "PY2AND3",
+ deps = [
+ "//tensorflow/contrib/framework:framework_py",
+ "//tensorflow/python:framework",
+ "//tensorflow/python:framework_for_generated_wrappers",
+ "//tensorflow/python:state_ops",
+ "//tensorflow/python:training",
+ "//tensorflow/python:variables",
+ ],
+)
+
+py_test(
+ name = "profiler_hook_test",
+ size = "small",
+ srcs = ["python/training/profiler_hook_test.py"],
+ srcs_version = "PY2AND3",
+ deps = [
+ ":hooks",
+ "//tensorflow/python:client_testlib",
+ "//tensorflow/python:framework_for_generated_wrappers",
+ "//tensorflow/python:framework_test_lib",
+ "//tensorflow/python:platform_test",
+ ],
+)
+
+filegroup(
+ name = "all_files",
+ srcs = glob(
+ ["**/*"],
+ exclude = [
+ "**/METADATA",
+ "**/OWNERS",
+ ],
+ ),
+)
diff --git a/tensorflow/contrib/hooks/README.md b/tensorflow/contrib/hooks/README.md
new file mode 100644
index 0000000000..c7f88bb111
--- /dev/null
+++ b/tensorflow/contrib/hooks/README.md
@@ -0,0 +1,30 @@
+# TensorFlow Experimental SessionRunHooks
+
+These hooks complement those in tensorflow/python/training. They are instances
+of `SessionRunHook` and are to be used with helpers like `MonitoredSession`
+and `learn.Estimator` that wrap `tensorflow.Session`.
+
+The hooks are called between invocations of `Session.run()` to perform custom
+behaviour.
+
+For example the `ProfilerHook` periodically collects `RunMetadata` after
+`Session.run()` and saves profiling information that can be viewed in a
+neat timeline through a Chromium-based web browser (via
+[about:tracing](chrome://tracing)) or the standalone [Catapult](https://github.com/catapult-project/catapult/blob/master/tracing/README.md) tool.
+
+```python
+from tensorflow.contrib.hooks import ProfilerHook
+
+hooks = [ProfilerHook(save_secs=30, output_dir="profiling")]
+with SingularMonitoredSession(hooks=hooks) as sess:
+ while not sess.should_stop():
+ sess.run(some_op)
+```
+
+Or similarly with contrib.learn:
+
+```python
+hooks = [ProfilerHook(save_steps=10, output_dir="profiling")]
+estimator = learn.Estimator(...)
+estimator.fit(input_fn, monitors=hooks)
+```
diff --git a/tensorflow/contrib/hooks/__init__.py b/tensorflow/contrib/hooks/__init__.py
new file mode 100644
index 0000000000..4b7319f843
--- /dev/null
+++ b/tensorflow/contrib/hooks/__init__.py
@@ -0,0 +1,32 @@
+# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+"""hooks: A module containing `SessionRunHook`s for use with `MonitoredSession`.
+
+@@ProfilerHook
+"""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+# pylint: disable=wildcard-import
+from tensorflow.contrib.hooks.python.training import *
+# pylint: enable=wildcard-import
+
+from tensorflow.python.util.all_util import remove_undocumented
+
+_allowed_symbols = ['ProfilerHook']
+
+remove_undocumented(__name__, _allowed_symbols)
diff --git a/tensorflow/contrib/hooks/python/__init__.py b/tensorflow/contrib/hooks/python/__init__.py
new file mode 100644
index 0000000000..8f9c49896e
--- /dev/null
+++ b/tensorflow/contrib/hooks/python/__init__.py
@@ -0,0 +1,24 @@
+# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+
+"""Experimental `SessionRunHooks` for use with `MonitoredSession`."""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+# pylint: disable=wildcard-import
+from tensorflow.contrib.hooks.python.training import *
+# pylint: enable=wildcard-import
diff --git a/tensorflow/contrib/hooks/python/training/__init__.py b/tensorflow/contrib/hooks/python/training/__init__.py
new file mode 100644
index 0000000000..cc4726497f
--- /dev/null
+++ b/tensorflow/contrib/hooks/python/training/__init__.py
@@ -0,0 +1,22 @@
+# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+"""hooks: A module containing `SessionRunHook`s for use with `MonitoredSession`.
+"""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+from tensorflow.contrib.hooks.python.training.profiler_hook import ProfilerHook
diff --git a/tensorflow/contrib/hooks/python/training/profiler_hook.py b/tensorflow/contrib/hooks/python/training/profiler_hook.py
new file mode 100644
index 0000000000..35aa25edfd
--- /dev/null
+++ b/tensorflow/contrib/hooks/python/training/profiler_hook.py
@@ -0,0 +1,104 @@
+# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+"""Additional `SessionRunHook` implementations to complement those in
+tensorflow/python/training.
+
+"""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import os.path
+
+from tensorflow.core.protobuf import config_pb2
+from tensorflow.python.client import timeline
+from tensorflow.python.platform import gfile
+from tensorflow.python.platform import tf_logging as logging
+from tensorflow.python.training.basic_session_run_hooks import SecondOrStepTimer
+from tensorflow.python.training.session_run_hook import SessionRunArgs
+from tensorflow.python.training import session_run_hook
+from tensorflow.python.training import training_util
+
+
+class ProfilerHook(session_run_hook.SessionRunHook):
+ """Captures CPU/GPU profiling information every N steps or seconds.
+
+ This produces files called "timeline-<step>.json", which are in Chrome
+ Trace format.
+
+ For more information see:
+ https://github.com/catapult-project/catapult/blob/master/tracing/README.md"""
+
+ def __init__(self,
+ save_steps=None,
+ save_secs=None,
+ output_dir="",
+ show_dataflow=True,
+ show_memory=False):
+ """Initializes a hook that takes periodic profiling snapshots.
+
+ Args:
+ save_steps: `int`, save profile traces every N steps. Exactly one of
+ `save_secs` and `save_steps` should be set.
+ save_secs: `int`, save profile traces every N seconds.
+ output_dir: `string`, the directory to save the profile traces to.
+ Defaults to the current directory.
+ show_dataflow: `bool`, if True, add flow events to the trace connecting
+ producers and consumers of tensors.
+ show_memory: `bool`, if True, add object snapshot events to the trace
+ showing the sizes and lifetimes of tensors.
+ """
+ self._output_file = os.path.join(output_dir, "timeline-{}.json")
+ self._show_dataflow = show_dataflow
+ self._show_memory = show_memory
+ self._timer = SecondOrStepTimer(every_secs=save_secs,
+ every_steps=save_steps)
+
+ def begin(self):
+ self._next_step = None
+ self._global_step_tensor = training_util.get_global_step()
+ if self._global_step_tensor is None:
+ raise RuntimeError(
+ "Global step should be created to use ProfilerHook.")
+
+ def before_run(self, run_context):
+ self._request_summary = (
+ self._next_step is None or
+ self._timer.should_trigger_for_step(self._next_step))
+ requests = {"global_step": self._global_step_tensor}
+ opts = (config_pb2.RunOptions(trace_level=config_pb2.RunOptions.FULL_TRACE)
+ if self._request_summary else None)
+
+ return SessionRunArgs(requests, options=opts)
+
+ def after_run(self, run_context, run_values):
+ global_step = run_values.results["global_step"]
+
+ if self._request_summary:
+ self._timer.update_last_triggered_step(global_step)
+ self._save(global_step,
+ self._output_file.format(global_step),
+ run_values.run_metadata.step_stats)
+
+ self._next_step = global_step + 1
+
+ def _save(self, step, save_path, step_stats):
+ logging.info("Saving timeline for %d into '%s'.", step, save_path)
+ with gfile.Open(save_path, "w") as f:
+ trace = timeline.Timeline(step_stats)
+ f.write(trace.generate_chrome_trace_format(
+ show_dataflow=self._show_dataflow,
+ show_memory=self._show_memory))
diff --git a/tensorflow/contrib/hooks/python/training/profiler_hook_test.py b/tensorflow/contrib/hooks/python/training/profiler_hook_test.py
new file mode 100644
index 0000000000..e7ecb5eb2f
--- /dev/null
+++ b/tensorflow/contrib/hooks/python/training/profiler_hook_test.py
@@ -0,0 +1,122 @@
+# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+"""Tests for profiler_hook."""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import os.path
+import shutil
+import tempfile
+
+from tensorflow.contrib.framework.python.ops import variables
+from tensorflow.contrib.hooks.python.training import ProfilerHook
+from tensorflow.python.framework import ops
+from tensorflow.python.ops import state_ops
+from tensorflow.python.platform import gfile
+from tensorflow.python.platform import test
+from tensorflow.python.training import monitored_session
+
+
+class ProfilerHookTest(test.TestCase):
+
+ def setUp(self):
+ super(ProfilerHookTest, self).setUp()
+ self.output_dir = tempfile.mkdtemp()
+ self.graph = ops.Graph()
+ self.filepattern = os.path.join(self.output_dir, "timeline-*.json")
+ with self.graph.as_default():
+ self.global_step = variables.get_or_create_global_step()
+ self.train_op = state_ops.assign_add(self.global_step, 1)
+
+ def tearDown(self):
+ super(ProfilerHookTest, self).tearDown()
+ shutil.rmtree(self.output_dir, ignore_errors=True)
+
+ def _count_timeline_files(self):
+ return len(gfile.Glob(self.filepattern))
+
+ def test_raise_in_both_secs_and_steps(self):
+ with self.assertRaises(ValueError):
+ ProfilerHook(save_secs=10, save_steps=20)
+
+ def test_raise_in_none_secs_and_steps(self):
+ with self.assertRaises(ValueError):
+ ProfilerHook(save_secs=None, save_steps=None)
+
+ def test_save_secs_saves_in_first_step(self):
+ with self.graph.as_default():
+ hook = ProfilerHook(save_secs=2, output_dir=self.output_dir)
+ with monitored_session.SingularMonitoredSession(hooks=[hook]) as sess:
+ sess.run(self.train_op)
+ self.assertEqual(1, self._count_timeline_files())
+
+ @test.mock.patch('time.time')
+ def test_save_secs_saves_periodically(self, mock_time):
+ # Pick a fixed start time.
+ current_time = 1484863632.320497
+
+ with self.graph.as_default():
+ mock_time.return_value = current_time
+ hook = ProfilerHook(save_secs=2, output_dir=self.output_dir)
+ with monitored_session.SingularMonitoredSession(hooks=[hook]) as sess:
+ sess.run(self.train_op) # Saved.
+ self.assertEqual(1, self._count_timeline_files())
+ sess.run(self.train_op) # Not saved.
+ self.assertEqual(1, self._count_timeline_files())
+ # Simulate 2.5 seconds of sleep.
+ mock_time.return_value = current_time + 2.5
+ sess.run(self.train_op) # Saved.
+
+ # Pretend some small amount of time has passed.
+ mock_time.return_value = current_time + 0.1
+ sess.run(self.train_op) # Not saved.
+ # Edge test just before we should save the timeline.
+ mock_time.return_value = current_time + 1.9
+ sess.run(self.train_op) # Not saved.
+ self.assertEqual(2, self._count_timeline_files())
+
+ mock_time.return_value = current_time + 4.5
+ sess.run(self.train_op) # Saved.
+ self.assertEqual(3, self._count_timeline_files())
+
+ def test_save_steps_saves_in_first_step(self):
+ with self.graph.as_default():
+ hook = ProfilerHook(save_secs=2, output_dir=self.output_dir)
+ with monitored_session.SingularMonitoredSession(hooks=[hook]) as sess:
+ sess.run(self.train_op) # Saved.
+ sess.run(self.train_op) # Not saved.
+ self.assertEqual(1, self._count_timeline_files())
+
+ def test_save_steps_saves_periodically(self):
+ with self.graph.as_default():
+ hook = ProfilerHook(save_steps=2, output_dir=self.output_dir)
+ with monitored_session.SingularMonitoredSession(hooks=[hook]) as sess:
+ self.assertEqual(0, self._count_timeline_files())
+ sess.run(self.train_op) # Saved.
+ self.assertEqual(1, self._count_timeline_files())
+ sess.run(self.train_op) # Not saved.
+ self.assertEqual(1, self._count_timeline_files())
+ sess.run(self.train_op) # Saved.
+ self.assertEqual(2, self._count_timeline_files())
+ sess.run(self.train_op) # Not saved.
+ self.assertEqual(2, self._count_timeline_files())
+ sess.run(self.train_op) # Saved.
+ self.assertEqual(3, self._count_timeline_files())
+
+
+if __name__ == '__main__':
+ test.main()
diff --git a/tensorflow/contrib/imperative/README.md b/tensorflow/contrib/imperative/README.md
new file mode 100644
index 0000000000..ea643a45d1
--- /dev/null
+++ b/tensorflow/contrib/imperative/README.md
@@ -0,0 +1,155 @@
+## Imperative programming in TensorFlow
+
+In the standard TensorFlow library, the specification of the computation is done
+statically in terms of a computation graph, and is separate from the execution
+of the graph. This model of programming is referred to as *lazy*, *deferred*,
+*dynamic*, or, *asynchronous*. This library brings imperative style programming (à
+la [NumPy](http://www.numpy.org)) to TensorFlow. Using this library, you can:
+
+* Write code in an imperative style: the results of the computation are available
+ right after the execution of a line of code.
+* Use TensorFlow operations on tensors, and get all the benefits of GPU
+ acceleration.
+* Include any Python control flow statements like `while` and `if` when
+ specifying the computation.
+* Perform automatic differentiation on your code with the
+ standard
+ [`tf.gradients`](https://www.tensorflow.org/api_docs/python/train/gradient_computation#gradients) function.
+
+### Getting started
+
+This library is a thin wrapper over the standard TensorFlow Python library. The
+source code is
+available
+[here](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/imperative). You
+can get started on Linux by installing the nightly PIP package linked off
+[the main page](https://github.com/tensorflow/tensorflow). Please
+consult [this](https://github.com/tensorflow/tensorflow#installation) document for other platforms and the PIP package including GPU
+support.
+
+
+### Write your first imperative TensorFlow program
+
+```shell
+$ python
+```
+
+```python
+>>> import tensorflow.contrib.imperative as tf
+>>> x = tf.constant([[7.], [6]])
+>>> y = tf.constant([[6., 7]])
+>>> tf.matmul(x, y)
+array([[ 42., 49.],
+ [ 36., 42.]], dtype=float32)
+```
+
+Note that this code is identical in terms of the programmer's mental model to
+the following NumPy code:
+
+```python
+>>> import numpy as np
+>>> x = np.array([[7.], [6]])
+>>> y = np.array([[6., 7]])
+>>> x.dot(y)
+array([[ 42., 49.],
+ [ 36., 42.]])
+```
+
+The library can be imported as `import tensorflow.contrib.imperative as tf`
+(contrast with importing standard TensorFlow, which is done as `import
+tensorflow as tf`). This import statement makes all of standard TensorFlow
+available in the `tf` symbol. However, it is not necessary to create a session
+object and set it up to run and fetch tensors.
+
+
+### Features
+
+The library provides the following additional features on top of standard
+TensorFlow:
+
+* Tensors are automatically fetched when used in contexts that expect their
+ value.
+
+ - Printing
+
+ ```python
+ x = tf.constant(10)
+ y = tf.constant(32)
+ print(x + y)
+ 42
+ ```
+
+ - Use in conditionals
+
+ ```python
+ x = tf.constant(30)
+ if x > 4:
+ print('Greater than 4')
+ Greater than 4
+
+ x = tf.random_normal([3])
+ y = x * 2
+ while tf.global_norm([y]) < 1000:
+ y = y * 2
+ print(y)
+ [ -213.2868042 -511.02456665 1026.66882324]
+ ```
+
+* Variables are automatically initialized, no need to run the
+ [`tf.global_variables_initializer()`](https://www.tensorflow.org/api_docs/python/state_ops/variable_helper_functions#global_variables_initializer) operation.
+
+ ```python
+ x = tf.Variable(np.random.normal(size=[2, 2]), dtype=tf.float32)
+ y = tf.constant([[1, 2.]])
+ z = tf.matmul(y, x)
+ print(z)
+ array([[-1.231673 , 3.14744973]], dtype=float32)
+ ```
+
+* Gradients work as expected using the standard `tf.gradients` function.
+
+ ```python
+ x = tf.Variable(np.random.rand(1, 3))
+ y = tf.exp(x)
+ dy = tf.gradients(y, x)
+ # dy/dx should be equal to y (= exp(x))
+ print(y, dy)
+ (array([[ 1.79997761, 2.00581881, 2.37302414]]), [array([[ 1.79997761, 2.00581881, 2.37302414]])])
+ ```
+
+### Caveats
+
+The library is implemented on top of standard TensorFlow. It still constructs a
+graph in the background and defers op execution. But when an op executes for the
+first time, its results are cached and the cached value is returned for future
+executions, thus providing imperative semantics. Because of this implementation
+choice, this library comes with the following caveats:
+
+* **Use inside Python loops:** A graph is constructed and kept around in
+ the background, both for just executing using the standard TensorFlow runtime,
+ and also for allowing automatic differentiation via `tf.gradients`. This means
+ that the graph keeps growing when TensorFlow functions are called inside a
+ Python loop. This library provides a `tf.new_step` method that clears the
+ graph as well as the cached tensors that have been kept around for gradient
+ computation. `tf.new_step` can be used as a context manager around, say, a
+ training loop to clear the graph after each training step.
+
+ ```python
+ x = tf.Variable(constant_op.constant(1.0))
+ for i in range(10):
+ # Create a new training step
+ with tf.new_step() as step:
+ # Perform computation and variable updates
+ step.run(tf.assign_sub(x, 0.1))
+ self.assertAllClose(tf.identity(x), 1.0 - (i + 1) * 0.1)
+ # The graph within this context is cleared at this point.
+ ```
+
+* **Speed:** Redundant graph construction and caching of tensor values adds
+ overheads that are not present in standard TensorFlow, where typically the
+ graph is constructed once and executed multiple times. This library is
+ intended as a vehicle to prototype the imperative programming model in
+ TensorFlow. The runtime overheads can be alleviated with various optimizations
+ to the runtime that would equally benefit the deferred execution mode as
+ well.
+
diff --git a/tensorflow/contrib/learn/python/learn/datasets/mnist.py b/tensorflow/contrib/learn/python/learn/datasets/mnist.py
index 59bdea7293..01262ff5f8 100644
--- a/tensorflow/contrib/learn/python/learn/datasets/mnist.py
+++ b/tensorflow/contrib/learn/python/learn/datasets/mnist.py
@@ -193,8 +193,8 @@ class DataSet(object):
start = 0
self._index_in_epoch = batch_size - rest_num_examples
end = self._index_in_epoch
- images_new_part = self.images[start:end]
- labels_new_part = self.labels[start:end]
+ images_new_part = self._images[start:end]
+ labels_new_part = self._labels[start:end]
return numpy.concatenate((images_rest_part, images_new_part), axis=0) , numpy.concatenate((labels_rest_part, labels_new_part), axis=0)
else:
self._index_in_epoch += batch_size
diff --git a/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py b/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py
index d1113678a9..f472034225 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py
@@ -171,7 +171,7 @@ def _dnn_linear_combined_model_fn(features, labels, mode, params, config=None):
dnn_feature_columns = params.get("dnn_feature_columns")
dnn_optimizer = params.get("dnn_optimizer") or "Adagrad"
dnn_hidden_units = params.get("dnn_hidden_units")
- dnn_activation_fn = params.get("dnn_activation_fn")
+ dnn_activation_fn = params.get("dnn_activation_fn") or nn.relu
dnn_dropout = params.get("dnn_dropout")
gradient_clip_norm = params.get("gradient_clip_norm")
input_layer_min_slice_size = (
@@ -346,7 +346,7 @@ class _DNNLinearCombinedEstimator(estimator.Estimator):
dnn_feature_columns=None,
dnn_optimizer=None,
dnn_hidden_units=None,
- dnn_activation_fn=nn.relu,
+ dnn_activation_fn=None,
dnn_dropout=None,
gradient_clip_norm=None,
config=None,
diff --git a/tensorflow/contrib/learn/python/learn/experiment.py b/tensorflow/contrib/learn/python/learn/experiment.py
index e64becd888..043ce349d1 100644
--- a/tensorflow/contrib/learn/python/learn/experiment.py
+++ b/tensorflow/contrib/learn/python/learn/experiment.py
@@ -407,7 +407,8 @@ class Experiment(object):
performing evaluation allows for the second.
Returns:
- The result of the `evaluate` call to the `Estimator`.
+ The result of the `evaluate` call to the `Estimator` as well as the
+ export results using the specified `ExportStrategy`.
"""
# The directory to which evaluation summaries are written are determined
# by adding a suffix to 'eval'; that suffix is the 'name' parameter to
diff --git a/tensorflow/contrib/makefile/README.md b/tensorflow/contrib/makefile/README.md
index 9f7686d92f..ac10dfc722 100644
--- a/tensorflow/contrib/makefile/README.md
+++ b/tensorflow/contrib/makefile/README.md
@@ -32,7 +32,7 @@ application that will let you check your application.
First, clone this TensorFlow repository.
You will need to download all dependencies as well. We have provided a script
-that does so, to be run (as with all commands) at the root of the repository:
+that does so, to be run (as with all commands) **at the root of the repository**:
```bash
tensorflow/contrib/makefile/download_dependencies.sh
@@ -142,6 +142,8 @@ xcode-select --install
If this is a new install, you will need to run XCode once to agree to the
license before continuing.
+(You will also need to have [Homebrew](http://brew.sh/) installed.)
+
Then install [automake](https://en.wikipedia.org/wiki/Automake)/[libtool](https://en.wikipedia.org/wiki/GNU_Libtool):
```bash
diff --git a/tensorflow/contrib/makefile/compile_android_protobuf.sh b/tensorflow/contrib/makefile/compile_android_protobuf.sh
index 286109b923..50d72d6093 100755
--- a/tensorflow/contrib/makefile/compile_android_protobuf.sh
+++ b/tensorflow/contrib/makefile/compile_android_protobuf.sh
@@ -165,7 +165,7 @@ CXXFLAGS="-frtti -fexceptions ${march_option} \
-I${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/include \
-I${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/${ARCHITECTURE}/include" \
LDFLAGS="-L${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/${ARCHITECTURE}" \
-LIBS="-lz -lgnustl_static"
+LIBS="-llog -lz -lgnustl_static"
if [ $? -ne 0 ]
then
diff --git a/tensorflow/contrib/pi_examples/label_image/label_image.cc b/tensorflow/contrib/pi_examples/label_image/label_image.cc
index 04ca134ff4..7817cd0c64 100644
--- a/tensorflow/contrib/pi_examples/label_image/label_image.cc
+++ b/tensorflow/contrib/pi_examples/label_image/label_image.cc
@@ -102,6 +102,7 @@ Status LoadJpegFile(string file_name, std::vector<tensorflow::uint8>* data,
cinfo.client_data = &jpeg_jmpbuf;
jerr.error_exit = CatchError;
if (setjmp(jpeg_jmpbuf)) {
+ fclose(infile);
return tensorflow::errors::Unknown("JPEG decoding failed");
}
diff --git a/tensorflow/contrib/rnn/BUILD b/tensorflow/contrib/rnn/BUILD
index 0f056dc1ca..dc6d56e0b4 100644
--- a/tensorflow/contrib/rnn/BUILD
+++ b/tensorflow/contrib/rnn/BUILD
@@ -115,7 +115,7 @@ cuda_py_tests(
cuda_py_tests(
name = "core_rnn_test",
- size = "medium",
+ size = "large",
srcs = ["python/kernel_tests/core_rnn_test.py"],
additional_deps = [
":rnn_py",
diff --git a/tensorflow/contrib/sparsemax/python/ops/sparsemax.py b/tensorflow/contrib/sparsemax/python/ops/sparsemax.py
index 07ac24add4..73a5cf1e92 100644
--- a/tensorflow/contrib/sparsemax/python/ops/sparsemax.py
+++ b/tensorflow/contrib/sparsemax/python/ops/sparsemax.py
@@ -18,7 +18,6 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
-from tensorflow.contrib.util import loader
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.ops import array_ops
diff --git a/tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py b/tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py
index 815461788a..7b85f998ea 100644
--- a/tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py
+++ b/tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py
@@ -1329,6 +1329,7 @@ def batch_sequences_with_states(input_key,
input_key=key,
input_sequences=sequences,
input_context=context,
+ input_length=tf.shape(sequences["input"])[0],
initial_states=initial_states,
num_unroll=num_unroll,
batch_size=batch_size,
diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD
index b070f384e0..fc039eaa39 100644
--- a/tensorflow/core/BUILD
+++ b/tensorflow/core/BUILD
@@ -1197,7 +1197,10 @@ cc_library(
],
copts = tf_copts(),
defines = tf_additional_lib_defines(),
- linkopts = ["-ldl"],
+ linkopts = select({
+ "//tensorflow:freebsd": [],
+ "//conditions:default": ["-ldl"],
+ }),
deps = tf_additional_lib_deps() + [
":lib_hash_crc32c_accelerate_internal",
":lib_proto_parsing",
@@ -1224,7 +1227,10 @@ cc_library(
],
hdrs = ["lib/gif/gif_io.h"],
copts = tf_copts(),
- linkopts = ["-ldl"],
+ linkopts = select({
+ "//tensorflow:freebsd": [],
+ "//conditions:default": ["-ldl"],
+ }),
deps = [
":lib",
"//tensorflow/core/platform/default/build_config:gif",
@@ -1243,7 +1249,10 @@ cc_library(
"lib/jpeg/jpeg_mem.h",
],
copts = tf_copts(),
- linkopts = ["-ldl"],
+ linkopts = select({
+ "//tensorflow:freebsd": [],
+ "//conditions:default": ["-ldl"],
+ }),
deps = [
":lib",
"//tensorflow/core/platform/default/build_config:jpeg",
@@ -1321,8 +1330,10 @@ tf_cuda_library(
"util/tensor_slice_util.h",
],
copts = tf_copts(),
- linkopts = [
- "-ldl",
+ linkopts = select({
+ "//tensorflow:freebsd": [],
+ "//conditions:default": ["-ldl"],
+ }) + [
"-lm",
],
deps = [
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc
index f1e435e50e..80fae4b9d8 100644
--- a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc
+++ b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc
@@ -304,7 +304,8 @@ std::unique_ptr<Master> GrpcServer::CreateMaster(MasterEnv* master_env) {
/* static */
Status GrpcServer::Create(const ServerDef& server_def, Env* env,
std::unique_ptr<ServerInterface>* out_server) {
- std::unique_ptr<GrpcServer> ret(new GrpcServer(server_def, Env::Default()));
+ std::unique_ptr<GrpcServer> ret(new GrpcServer(server_def,
+ env == nullptr ? Env::Default() : env));
TF_RETURN_IF_ERROR(ret->Init());
*out_server = std::move(ret);
return Status::OK();
diff --git a/tensorflow/core/kernels/segment_reduction_ops.cc b/tensorflow/core/kernels/segment_reduction_ops.cc
index 5bd4362801..7808e4ff1d 100644
--- a/tensorflow/core/kernels/segment_reduction_ops.cc
+++ b/tensorflow/core/kernels/segment_reduction_ops.cc
@@ -254,7 +254,7 @@ struct UnsortedSegmentMaxFunctor<CPUDevice, T, Index>
typename TTypes<Index>::ConstFlat segment_ids,
const Index data_size, const T* data,
typename TTypes<T, 2>::Tensor output) override {
- output.setConstant(std::numeric_limits<T>::min());
+ output.setConstant(std::numeric_limits<T>::lowest());
if (data_size == 0) {
return;
}
diff --git a/tensorflow/core/lib/hash/crc32c_accelerate.cc b/tensorflow/core/lib/hash/crc32c_accelerate.cc
index 07fa2faedd..b87550fba9 100644
--- a/tensorflow/core/lib/hash/crc32c_accelerate.cc
+++ b/tensorflow/core/lib/hash/crc32c_accelerate.cc
@@ -31,6 +31,12 @@ limitations under the License.
#endif
#endif /* __SSE4_2__ */
+// This version of Apple clang has a bug:
+// https://llvm.org/bugs/show_bug.cgi?id=25510
+#if defined(__APPLE__) && (__clang_major__ <= 8)
+#undef USE_SSE_CRC32C
+#endif
+
#ifdef USE_SSE_CRC32C
#include <nmmintrin.h>
#endif
diff --git a/tensorflow/core/ops/ops.pbtxt b/tensorflow/core/ops/ops.pbtxt
index 8fa3d0c872..fa27edbbd8 100644
--- a/tensorflow/core/ops/ops.pbtxt
+++ b/tensorflow/core/ops/ops.pbtxt
@@ -25374,6 +25374,59 @@ op {
description: "Read [the section on\nSegmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation\nof segments.\n\nComputes a tensor such that\n`(output[i] = sum_{j...} data[j...]` where the sum is over tuples `j...` such\nthat `segment_ids[j...] == i`. Unlike `SegmentSum`, `segment_ids`\nneed not be sorted and need not cover all values in the full\nrange of valid values.\n\nIf the sum is empty for a given segment ID `i`, `output[i] = 0`.\n\n`num_segments` should equal the number of distinct segment IDs.\n\n<div style=\"width:70%; margin:auto; margin-bottom:10px; margin-top:20px;\">\n<img style=\"width:100%\" src=\"../../images/UnsortedSegmentSum.png\" alt>\n</div>"
}
op {
+ name: "UnsortedSegmentSum"
+ input_arg {
+ name: "data"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "segment_ids"
+ description: "A tensor whose shape is a prefix of `data.shape`."
+ type_attr: "Tindices"
+ }
+ input_arg {
+ name: "num_segments"
+ type: DT_INT32
+ }
+ output_arg {
+ name: "output"
+ description: "Has same shape as data, except for the first `segment_ids.rank`\ndimensions, which are replaced with a single dimension which has size\n`num_segments`."
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT64
+ type: DT_INT32
+ type: DT_UINT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_QINT8
+ type: DT_QUINT8
+ type: DT_QINT32
+ type: DT_HALF
+ }
+ }
+ }
+ attr {
+ name: "Tindices"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ summary: "Computes the max along segments of a tensor."
+ description: "Read [the section on\nSegmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation\nof segments.\n\nComputes a tensor such that\n\\\\(output_i = \\sum_j data_j\\\\) where sum is over `j` such\nthat `segment_ids[j] == i`. Unlike `SegmentSum`, `segment_ids`\nneed not be sorted and need not cover all values in the full\n range of valid values.\n\nIf the sum is empty for a given segment ID `i`, `output[i] = 0`.\n\n`num_segments` should equal the number of distinct segment IDs.\n\n<div style=\"width:70%; margin:auto; margin-bottom:10px; margin-top:20px;\">\n<img style=\"width:100%\" src=\"../../images/UnsortedSegmentSum.png\" alt>\n</div>"
+}
+op {
name: "Unstage"
output_arg {
name: "values"
diff --git a/tensorflow/core/platform/posix/error.cc b/tensorflow/core/platform/posix/error.cc
index 94a3a6ab5d..df5c800879 100644
--- a/tensorflow/core/platform/posix/error.cc
+++ b/tensorflow/core/platform/posix/error.cc
@@ -131,7 +131,7 @@ error::Code ErrnoToCode(int err_number) {
case ENETUNREACH: // Network unreachable
case ENOLCK: // No locks available
case ENOLINK: // Link has been severed
-#if !(defined(__APPLE__) || defined(_WIN32))
+#if !(defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32))
case ENONET: // Machine is not on the network
#endif
code = error::UNAVAILABLE;
diff --git a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc
index 61b6fa0c84..927e2bc572 100644
--- a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc
+++ b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc
@@ -24,6 +24,7 @@ limitations under the License.
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
+#include <sys/types.h>
#include <unistd.h>
#include "tensorflow/core/lib/strings/stringprintf.h"
diff --git a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h
index c4fe2fc5b3..09c365dd9e 100644
--- a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h
+++ b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h
@@ -16,6 +16,8 @@ limitations under the License.
#ifndef TENSORFLOW_PLATFORM_PROFILEUTILS_ANDROID_ARMV7A_CPU_UTILS_HELPER_H__
#define TENSORFLOW_PLATFORM_PROFILEUTILS_ANDROID_ARMV7A_CPU_UTILS_HELPER_H__
+#include <sys/types.h>
+
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/profile_utils/i_cpu_utils_helper.h"
#include "tensorflow/core/platform/types.h"
diff --git a/tensorflow/core/public/version.h b/tensorflow/core/public/version.h
index 37e5dc81b2..a9d984993e 100644
--- a/tensorflow/core/public/version.h
+++ b/tensorflow/core/public/version.h
@@ -20,7 +20,7 @@ limitations under the License.
#define TF_MAJOR_VERSION 1
#define TF_MINOR_VERSION 0
-#define TF_PATCH_VERSION 0-rc1
+#define TF_PATCH_VERSION 0-rc2
// TF_VERSION_SUFFIX is non-empty for pre-releases (e.g. "-alpha", "-alpha.1",
// "-beta", "-rc", "-rc.1")
diff --git a/tensorflow/examples/learn/boston.py b/tensorflow/examples/learn/boston.py
index 5d5ddff564..2986ff9106 100644
--- a/tensorflow/examples/learn/boston.py
+++ b/tensorflow/examples/learn/boston.py
@@ -43,11 +43,12 @@ def main(unused_argv):
# Fit
regressor.fit(x_train, y_train, steps=5000, batch_size=1)
-
+
+ # Transform
+ x_transformed = scaler.transform(x_test)
+
# Predict and score
- y_predicted = list(
- regressor.predict(
- scaler.transform(x_test), as_iterable=True))
+ y_predicted = list(regressor.predict(x_transformed, as_iterable=True))
score = metrics.mean_squared_error(y_predicted, y_test)
print('MSE: {0:f}'.format(score))
diff --git a/tensorflow/examples/learn/iris_custom_model.py b/tensorflow/examples/learn/iris_custom_model.py
index 31fb88954b..fbc50716c9 100644
--- a/tensorflow/examples/learn/iris_custom_model.py
+++ b/tensorflow/examples/learn/iris_custom_model.py
@@ -43,7 +43,7 @@ def my_model(features, target):
# Compute logits (1 per class) and compute loss.
logits = layers.fully_connected(features, 3, activation_fn=None)
- loss = tf.contrib.losses.softmax_cross_entropy(logits, target)
+ loss = tf.losses.softmax_cross_entropy(target, logits)
# Create a tensor for training op.
train_op = tf.contrib.layers.optimize_loss(
diff --git a/tensorflow/examples/learn/mnist.py b/tensorflow/examples/learn/mnist.py
index 4b3f1835e2..6e5fe7891b 100644
--- a/tensorflow/examples/learn/mnist.py
+++ b/tensorflow/examples/learn/mnist.py
@@ -67,7 +67,7 @@ def conv_model(feature, target, mode):
# Compute logits (1 per class) and compute loss.
logits = layers.fully_connected(h_fc1, 10, activation_fn=None)
- loss = tf.contrib.losses.softmax_cross_entropy(logits, target)
+ loss = tf.losses.softmax_cross_entropy(target, logits)
# Create a tensor for training op.
train_op = layers.optimize_loss(
diff --git a/tensorflow/examples/learn/multiple_gpu.py b/tensorflow/examples/learn/multiple_gpu.py
index a395d94151..df58906b39 100644
--- a/tensorflow/examples/learn/multiple_gpu.py
+++ b/tensorflow/examples/learn/multiple_gpu.py
@@ -60,7 +60,7 @@ def my_model(features, target):
with tf.device('/gpu:2'):
# Compute logits (1 per class) and compute loss.
logits = layers.fully_connected(features, 3, activation_fn=None)
- loss = tf.contrib.losses.softmax_cross_entropy(logits, target)
+ loss = tf.losses.softmax_cross_entropy(target, logits)
# Create a tensor for training op.
train_op = tf.contrib.layers.optimize_loss(
diff --git a/tensorflow/examples/learn/resnet.py b/tensorflow/examples/learn/resnet.py
index 49d89ef660..f822903208 100755
--- a/tensorflow/examples/learn/resnet.py
+++ b/tensorflow/examples/learn/resnet.py
@@ -144,7 +144,7 @@ def res_net(x, y, activation=tf.nn.relu):
target = tf.one_hot(y, depth=10, dtype=tf.float32)
logits = tf.contrib.layers.fully_connected(net, 10, activation_fn=None)
- loss = tf.contrib.losses.softmax_cross_entropy(logits, target)
+ loss = tf.losses.softmax_cross_entropy(target, logits)
return tf.softmax(logits), loss
diff --git a/tensorflow/examples/learn/text_classification_character_cnn.py b/tensorflow/examples/learn/text_classification_character_cnn.py
index 143af4f664..0c96976146 100644
--- a/tensorflow/examples/learn/text_classification_character_cnn.py
+++ b/tensorflow/examples/learn/text_classification_character_cnn.py
@@ -49,7 +49,7 @@ def char_cnn_model(features, target):
"""Character level convolutional neural network model to predict classes."""
target = tf.one_hot(target, 15, 1, 0)
byte_list = tf.reshape(
- tf.one_hot(features, 256, 1, 0), [-1, MAX_DOCUMENT_LENGTH, 256, 1])
+ tf.one_hot(features, 256), [-1, MAX_DOCUMENT_LENGTH, 256, 1])
with tf.variable_scope('CNN_Layer1'):
# Apply Convolution filtering on input sequence.
conv1 = tf.contrib.layers.convolution2d(
@@ -73,7 +73,7 @@ def char_cnn_model(features, target):
# Apply regular WX + B and classification.
logits = tf.contrib.layers.fully_connected(pool2, 15, activation_fn=None)
- loss = tf.contrib.losses.softmax_cross_entropy(logits, target)
+ loss = tf.losses.softmax_cross_entropy(target, logits)
train_op = tf.contrib.layers.optimize_loss(
loss,
diff --git a/tensorflow/examples/tutorials/word2vec/word2vec_basic.py b/tensorflow/examples/tutorials/word2vec/word2vec_basic.py
index bc502edd8b..8dcd3bf37a 100644
--- a/tensorflow/examples/tutorials/word2vec/word2vec_basic.py
+++ b/tensorflow/examples/tutorials/word2vec/word2vec_basic.py
@@ -112,6 +112,8 @@ def generate_batch(batch_size, num_skips, skip_window):
labels[i * num_skips + j, 0] = buffer[target]
buffer.append(data[data_index])
data_index = (data_index + 1) % len(data)
+ # Backtrack a little bit to avoid skipping words in the end of a batch
+ data_index = (data_index + len(data) - span) % len(data)
return batch, labels
batch, labels = generate_batch(batch_size=8, num_skips=2, skip_window=1)
diff --git a/tensorflow/examples/udacity/1_notmnist.ipynb b/tensorflow/examples/udacity/1_notmnist.ipynb
index 4b0a20b1dd..521cbf3000 100644
--- a/tensorflow/examples/udacity/1_notmnist.ipynb
+++ b/tensorflow/examples/udacity/1_notmnist.ipynb
@@ -219,7 +219,7 @@
" print('Extracting data for %s. This may take a while. Please wait.' % root)\n",
" tar = tarfile.open(filename)\n",
" sys.stdout.flush()\n",
- " tar.extractall()\n",
+ " tar.extractall(data_root)\n",
" tar.close()\n",
" data_folders = [\n",
" os.path.join(root, d) for d in sorted(os.listdir(root))\n",
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.summary.TaggedRunMetadata.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.summary.TaggedRunMetadata.md
index 788d2066ad..8dc62c4c18 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.summary.TaggedRunMetadata.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.summary.TaggedRunMetadata.md
@@ -1,8 +1,252 @@
- - -
+#### `tf.summary.TaggedRunMetadata.ByteSize()` {#TaggedRunMetadata.ByteSize}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.Clear()` {#TaggedRunMetadata.Clear}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.ClearExtension(extension_handle)` {#TaggedRunMetadata.ClearExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.ClearField(field_name)` {#TaggedRunMetadata.ClearField}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.CopyFrom(other_msg)` {#TaggedRunMetadata.CopyFrom}
+
+Copies the content of the specified message into the current message.
+
+The method clears the current message and then merges the specified
+message using MergeFrom.
+
+##### Args:
+
+
+* <b>`other_msg`</b>: Message to copy into the current one.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.DiscardUnknownFields()` {#TaggedRunMetadata.DiscardUnknownFields}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.FindInitializationErrors()` {#TaggedRunMetadata.FindInitializationErrors}
+
+Finds required fields which are not initialized.
+
+##### Returns:
+
+ A list of strings. Each string is a path to an uninitialized field from
+ the top-level message, e.g. "foo.bar[5].baz".
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.FromString(s)` {#TaggedRunMetadata.FromString}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.HasExtension(extension_handle)` {#TaggedRunMetadata.HasExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.HasField(field_name)` {#TaggedRunMetadata.HasField}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.IsInitialized(errors=None)` {#TaggedRunMetadata.IsInitialized}
+
+Checks if all required fields of a message are set.
+
+##### Args:
+
+
+* <b>`errors`</b>: A list which, if provided, will be populated with the field
+ paths of all missing required fields.
+
+##### Returns:
+
+ True iff the specified message has all required fields set.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.ListFields()` {#TaggedRunMetadata.ListFields}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.MergeFrom(msg)` {#TaggedRunMetadata.MergeFrom}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.MergeFromString(serialized)` {#TaggedRunMetadata.MergeFromString}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.ParseFromString(serialized)` {#TaggedRunMetadata.ParseFromString}
+
+Parse serialized protocol buffer data into this message.
+
+Like MergeFromString(), except we clear the object first and
+do not return the value that MergeFromString returns.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.RegisterExtension(extension_handle)` {#TaggedRunMetadata.RegisterExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.SerializePartialToString()` {#TaggedRunMetadata.SerializePartialToString}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.SerializeToString()` {#TaggedRunMetadata.SerializeToString}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.SetInParent()` {#TaggedRunMetadata.SetInParent}
+
+Sets the _cached_byte_size_dirty bit to true,
+and propagates this to our listener iff this was a state change.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.WhichOneof(oneof_name)` {#TaggedRunMetadata.WhichOneof}
+
+Returns the name of the currently set field inside a oneof, or None.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__deepcopy__(memo=None)` {#TaggedRunMetadata.__deepcopy__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__eq__(other)` {#TaggedRunMetadata.__eq__}
+
+
+
+
+- - -
+
#### `tf.summary.TaggedRunMetadata.__getstate__()` {#TaggedRunMetadata.__getstate__}
Support the pickle protocol.
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__hash__()` {#TaggedRunMetadata.__hash__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__init__(**kwargs)` {#TaggedRunMetadata.__init__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__ne__(other_msg)` {#TaggedRunMetadata.__ne__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__repr__()` {#TaggedRunMetadata.__repr__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__setstate__(state)` {#TaggedRunMetadata.__setstate__}
+
+Support the pickle protocol.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__str__()` {#TaggedRunMetadata.__str__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__unicode__()` {#TaggedRunMetadata.__unicode__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.run_metadata` {#TaggedRunMetadata.run_metadata}
+
+Magic attribute generated for "run_metadata" proto field.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.tag` {#TaggedRunMetadata.tag}
+
+Magic attribute generated for "tag" proto field.
+
+
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.summary.SummaryDescription.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.summary.SummaryDescription.md
index 19532f7cc3..bce704ef4f 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.summary.SummaryDescription.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.summary.SummaryDescription.md
@@ -1,8 +1,245 @@
- - -
+#### `tf.summary.SummaryDescription.ByteSize()` {#SummaryDescription.ByteSize}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.Clear()` {#SummaryDescription.Clear}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.ClearExtension(extension_handle)` {#SummaryDescription.ClearExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.ClearField(field_name)` {#SummaryDescription.ClearField}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.CopyFrom(other_msg)` {#SummaryDescription.CopyFrom}
+
+Copies the content of the specified message into the current message.
+
+The method clears the current message and then merges the specified
+message using MergeFrom.
+
+##### Args:
+
+
+* <b>`other_msg`</b>: Message to copy into the current one.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.DiscardUnknownFields()` {#SummaryDescription.DiscardUnknownFields}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.FindInitializationErrors()` {#SummaryDescription.FindInitializationErrors}
+
+Finds required fields which are not initialized.
+
+##### Returns:
+
+ A list of strings. Each string is a path to an uninitialized field from
+ the top-level message, e.g. "foo.bar[5].baz".
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.FromString(s)` {#SummaryDescription.FromString}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.HasExtension(extension_handle)` {#SummaryDescription.HasExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.HasField(field_name)` {#SummaryDescription.HasField}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.IsInitialized(errors=None)` {#SummaryDescription.IsInitialized}
+
+Checks if all required fields of a message are set.
+
+##### Args:
+
+
+* <b>`errors`</b>: A list which, if provided, will be populated with the field
+ paths of all missing required fields.
+
+##### Returns:
+
+ True iff the specified message has all required fields set.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.ListFields()` {#SummaryDescription.ListFields}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.MergeFrom(msg)` {#SummaryDescription.MergeFrom}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.MergeFromString(serialized)` {#SummaryDescription.MergeFromString}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.ParseFromString(serialized)` {#SummaryDescription.ParseFromString}
+
+Parse serialized protocol buffer data into this message.
+
+Like MergeFromString(), except we clear the object first and
+do not return the value that MergeFromString returns.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.RegisterExtension(extension_handle)` {#SummaryDescription.RegisterExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.SerializePartialToString()` {#SummaryDescription.SerializePartialToString}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.SerializeToString()` {#SummaryDescription.SerializeToString}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.SetInParent()` {#SummaryDescription.SetInParent}
+
+Sets the _cached_byte_size_dirty bit to true,
+and propagates this to our listener iff this was a state change.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.WhichOneof(oneof_name)` {#SummaryDescription.WhichOneof}
+
+Returns the name of the currently set field inside a oneof, or None.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__deepcopy__(memo=None)` {#SummaryDescription.__deepcopy__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__eq__(other)` {#SummaryDescription.__eq__}
+
+
+
+
+- - -
+
#### `tf.summary.SummaryDescription.__getstate__()` {#SummaryDescription.__getstate__}
Support the pickle protocol.
+- - -
+
+#### `tf.summary.SummaryDescription.__hash__()` {#SummaryDescription.__hash__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__init__(**kwargs)` {#SummaryDescription.__init__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__ne__(other_msg)` {#SummaryDescription.__ne__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__repr__()` {#SummaryDescription.__repr__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__setstate__(state)` {#SummaryDescription.__setstate__}
+
+Support the pickle protocol.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__str__()` {#SummaryDescription.__str__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__unicode__()` {#SummaryDescription.__unicode__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.type_hint` {#SummaryDescription.type_hint}
+
+Magic attribute generated for "type_hint" proto field.
+
+
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.test.TestCase.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.test.TestCase.md
index 277b75565a..0e63e0d708 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.test.TestCase.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.test.TestCase.md
@@ -179,125 +179,6 @@ Checks that for all elements of farray1 and farray2
- - -
-#### `tf.test.TestCase.assertBetween(value, minv, maxv, msg=None)` {#TestCase.assertBetween}
-
-Asserts that value is between minv and maxv (inclusive).
-
-
-- - -
-
-#### `tf.test.TestCase.assertCommandFails(command, regexes, env=None, close_fds=True, msg=None)` {#TestCase.assertCommandFails}
-
-Asserts a shell command fails and the error matches a regex in a list.
-
-##### Args:
-
-
-* <b>`command`</b>: List or string representing the command to run.
-* <b>`regexes`</b>: the list of regular expression strings.
-* <b>`env`</b>: Dictionary of environment variable settings.
-* <b>`close_fds`</b>: Whether or not to close all open fd's in the child after
- forking.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertCommandSucceeds(command, regexes=('',), env=None, close_fds=True, msg=None)` {#TestCase.assertCommandSucceeds}
-
-Asserts that a shell command succeeds (i.e. exits with code 0).
-
-##### Args:
-
-
-* <b>`command`</b>: List or string representing the command to run.
-* <b>`regexes`</b>: List of regular expression byte strings that match success.
-* <b>`env`</b>: Dictionary of environment variable settings.
-* <b>`close_fds`</b>: Whether or not to close all open fd's in the child after
- forking.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertContainsExactSubsequence(container, subsequence, msg=None)` {#TestCase.assertContainsExactSubsequence}
-
-Assert that "container" contains "subsequence" as an exact subsequence.
-
-Asserts that "container" contains all the elements of "subsequence", in
-order, and without other elements interspersed. For example, [1, 2, 3] is an
-exact subsequence of [0, 0, 1, 2, 3, 0] but not of [0, 0, 1, 2, 0, 3, 0].
-
-##### Args:
-
-
-* <b>`container`</b>: the list we're testing for subsequence inclusion.
-* <b>`subsequence`</b>: the list we hope will be an exact subsequence of container.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertContainsInOrder(strings, target, msg=None)` {#TestCase.assertContainsInOrder}
-
-Asserts that the strings provided are found in the target in order.
-
-This may be useful for checking HTML output.
-
-##### Args:
-
-
-* <b>`strings`</b>: A list of strings, such as [ 'fox', 'dog' ]
-* <b>`target`</b>: A target string in which to look for the strings, such as
- 'The quick brown fox jumped over the lazy dog'.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertContainsSubsequence(container, subsequence, msg=None)` {#TestCase.assertContainsSubsequence}
-
-Assert that "container" contains "subsequence" as a subsequence.
-
-Asserts that "container" contains all the elements of "subsequence", in
-order, but possibly with other elements interspersed. For example, [1, 2, 3]
-is a subsequence of [0, 0, 1, 2, 0, 3, 0] but not of [0, 0, 1, 3, 0, 2, 0].
-
-##### Args:
-
-
-* <b>`container`</b>: the list we're testing for subsequence inclusion.
-* <b>`subsequence`</b>: the list we hope will be a subsequence of container.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertContainsSubset(expected_subset, actual_set, msg=None)` {#TestCase.assertContainsSubset}
-
-Checks whether actual iterable is a superset of expected iterable.
-
-
-- - -
-
-#### `tf.test.TestCase.assertCountEqual(*args, **kwargs)` {#TestCase.assertCountEqual}
-
-An unordered sequence specific comparison.
-
-Equivalent to assertItemsEqual(). This method is a compatibility layer
-for Python 3k, since 2to3 does not convert assertItemsEqual() calls into
-assertCountEqual() calls.
-
-##### Args:
-
-
-* <b>`expected_seq`</b>: A sequence containing elements we are expecting.
-* <b>`actual_seq`</b>: The sequence that we are testing.
-* <b>`msg`</b>: The message to be printed if the test fails.
-
-
-- - -
-
#### `tf.test.TestCase.assertDeviceEqual(device1, device2)` {#TestCase.assertDeviceEqual}
Asserts that the two given devices are the same.
@@ -318,49 +199,10 @@ Checks whether actual is a superset of expected.
- - -
-#### `tf.test.TestCase.assertDictEqual(a, b, msg=None)` {#TestCase.assertDictEqual}
+#### `tf.test.TestCase.assertDictEqual(d1, d2, msg=None)` {#TestCase.assertDictEqual}
-Raises AssertionError if a and b are not equal dictionaries.
-
-##### Args:
-
-
-* <b>`a`</b>: A dict, the expected value.
-* <b>`b`</b>: A dict, the actual value.
-* <b>`msg`</b>: An optional str, the associated message.
-
-##### Raises:
-
-
-* <b>`AssertionError`</b>: if the dictionaries are not equal.
-
-
-- - -
-
-#### `tf.test.TestCase.assertEmpty(container, msg=None)` {#TestCase.assertEmpty}
-
-Assert that an object has zero length.
-
-##### Args:
-
-
-* <b>`container`</b>: Anything that implements the collections.Sized interface.
-* <b>`msg`</b>: Optional message to report on failure.
-- - -
-
-#### `tf.test.TestCase.assertEndsWith(actual, expected_end, msg=None)` {#TestCase.assertEndsWith}
-
-Assert that actual.endswith(expected_end) is True.
-
-##### Args:
-
-
-* <b>`actual`</b>: str
-* <b>`expected_end`</b>: str
-* <b>`msg`</b>: Optional message to report on failure.
-
- - -
@@ -444,11 +286,10 @@ Included for symmetry with assertIsNone.
- - -
-#### `tf.test.TestCase.assertItemsEqual(*args, **kwargs)` {#TestCase.assertItemsEqual}
-
-An unordered sequence specific comparison.
+#### `tf.test.TestCase.assertItemsEqual(expected_seq, actual_seq, msg=None)` {#TestCase.assertItemsEqual}
-It asserts that actual_seq and expected_seq have the same element counts.
+An unordered sequence specific comparison. It asserts that
+actual_seq and expected_seq have the same element counts.
Equivalent to::
self.assertEqual(Counter(iter(actual_seq)),
@@ -461,30 +302,6 @@ Asserts that each element has the same count in both sequences.
- [0, 1, 1] and [1, 0, 1] compare equal.
- [0, 0, 1] and [0, 1] compare unequal.
-##### Args:
-
-
-* <b>`expected_seq`</b>: A sequence containing elements we are expecting.
-* <b>`actual_seq`</b>: The sequence that we are testing.
-* <b>`msg`</b>: The message to be printed if the test fails.
-
-
-- - -
-
-#### `tf.test.TestCase.assertJsonEqual(first, second, msg=None)` {#TestCase.assertJsonEqual}
-
-Asserts that the JSON objects defined in two strings are equal.
-
-A summary of the differences will be included in the failure message
-using assertSameStructure.
-
-##### Args:
-
-
-* <b>`first`</b>: A string contining JSON to decode and compare to second.
-* <b>`second`</b>: A string contining JSON to decode and compare to first.
-* <b>`msg`</b>: Additional text to include in the failure message.
-
- - -
@@ -556,13 +373,6 @@ if not.
- - -
-#### `tf.test.TestCase.assertNoCommonElements(expected_seq, actual_seq, msg=None)` {#TestCase.assertNoCommonElements}
-
-Checks whether actual iterable and expected iterable are disjoint.
-
-
-- - -
-
#### `tf.test.TestCase.assertNotAlmostEqual(first, second, places=None, msg=None, delta=None)` {#TestCase.assertNotAlmostEqual}
Fail if the two objects are equal as determined by their
@@ -593,33 +403,6 @@ Objects that are equal automatically fail.
- - -
-#### `tf.test.TestCase.assertNotEmpty(container, msg=None)` {#TestCase.assertNotEmpty}
-
-Assert that an object has non-zero length.
-
-##### Args:
-
-
-* <b>`container`</b>: Anything that implements the collections.Sized interface.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertNotEndsWith(actual, unexpected_end, msg=None)` {#TestCase.assertNotEndsWith}
-
-Assert that actual.endswith(unexpected_end) is False.
-
-##### Args:
-
-
-* <b>`actual`</b>: str
-* <b>`unexpected_end`</b>: str
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
#### `tf.test.TestCase.assertNotEqual(first, second, msg=None)` {#TestCase.assertNotEqual}
Fail if the two objects are equal as determined by the '!='
@@ -657,20 +440,6 @@ Fail the test if the text matches the regular expression.
- - -
-#### `tf.test.TestCase.assertNotStartsWith(actual, unexpected_start, msg=None)` {#TestCase.assertNotStartsWith}
-
-Assert that actual.startswith(unexpected_start) is False.
-
-##### Args:
-
-
-* <b>`actual`</b>: str
-* <b>`unexpected_start`</b>: str
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
#### `tf.test.TestCase.assertProtoEquals(expected_message_maybe_ascii, message)` {#TestCase.assertProtoEquals}
Asserts that message is same as parsed expected_message_ascii.
@@ -745,38 +514,6 @@ Asserts that the message in a raised exception matches a regexp.
- - -
-#### `tf.test.TestCase.assertRaisesWithLiteralMatch(expected_exception, expected_exception_message, callable_obj=None, *args, **kwargs)` {#TestCase.assertRaisesWithLiteralMatch}
-
-Asserts that the message in a raised exception equals the given string.
-
-Unlike assertRaisesRegexp, this method takes a literal string, not
-a regular expression.
-
-with self.assertRaisesWithLiteralMatch(ExType, 'message'):
- DoSomething()
-
-##### Args:
-
-
-* <b>`expected_exception`</b>: Exception class expected to be raised.
-* <b>`expected_exception_message`</b>: String message expected in the raised
- exception. For a raise exception e, expected_exception_message must
- equal str(e).
-* <b>`callable_obj`</b>: Function to be called, or None to return a context.
-* <b>`args`</b>: Extra args.
-* <b>`kwargs`</b>: Extra kwargs.
-
-##### Returns:
-
- A context manager if callable_obj is None. Otherwise, None.
-
-##### Raises:
-
- self.failureException if callable_obj does not raise a macthing exception.
-
-
-- - -
-
#### `tf.test.TestCase.assertRaisesWithPredicateMatch(exception_type, expected_err_re_or_predicate)` {#TestCase.assertRaisesWithPredicateMatch}
Returns a context manager to enclose code expected to raise an exception.
@@ -801,71 +538,6 @@ predicate search.
- - -
-#### `tf.test.TestCase.assertRaisesWithRegexpMatch(expected_exception, expected_regexp, callable_obj=None, *args, **kwargs)` {#TestCase.assertRaisesWithRegexpMatch}
-
-Asserts that the message in a raised exception matches the given regexp.
-
-This is just a wrapper around assertRaisesRegexp. Please use
-assertRaisesRegexp instead of assertRaisesWithRegexpMatch.
-
-##### Args:
-
-
-* <b>`expected_exception`</b>: Exception class expected to be raised.
-* <b>`expected_regexp`</b>: Regexp (re pattern object or string) expected to be
- found in error message.
-* <b>`callable_obj`</b>: Function to be called, or None to return a context.
-* <b>`args`</b>: Extra args.
-* <b>`kwargs`</b>: Extra keyword args.
-
-##### Returns:
-
- A context manager if callable_obj is None. Otherwise, None.
-
-##### Raises:
-
- self.failureException if callable_obj does not raise a macthing exception.
-
-
-- - -
-
-#### `tf.test.TestCase.assertRegexMatch(actual_str, regexes, message=None)` {#TestCase.assertRegexMatch}
-
-Asserts that at least one regex in regexes matches str.
-
- If possible you should use assertRegexpMatches, which is a simpler
- version of this method. assertRegexpMatches takes a single regular
- expression (a string or re compiled object) instead of a list.
-
- Notes:
- 1. This function uses substring matching, i.e. the matching
- succeeds if *any* substring of the error message matches *any*
- regex in the list. This is more convenient for the user than
- full-string matching.
-
- 2. If regexes is the empty list, the matching will always fail.
-
- 3. Use regexes=[''] for a regex that will always pass.
-
- 4. '.' matches any single character *except* the newline. To
- match any character, use '(.|
-)'.
-
- 5. '^' matches the beginning of each line, not just the beginning
- of the string. Similarly, '$' matches the end of each line.
-
- 6. An exception will be thrown if regexes contains an invalid
- regex.
-
- Args:
- actual_str: The string we try to match with the items in regexes.
- regexes: The regular expressions we want to match against str.
- See "Notes" above for detailed notes on how this is interpreted.
- message: The message to be printed if the test fails.
-
-
-- - -
-
#### `tf.test.TestCase.assertRegexpMatches(text, expected_regexp, msg=None)` {#TestCase.assertRegexpMatches}
Fail the test unless the text matches the regular expression.
@@ -873,79 +545,6 @@ Fail the test unless the text matches the regular expression.
- - -
-#### `tf.test.TestCase.assertSameElements(expected_seq, actual_seq, msg=None)` {#TestCase.assertSameElements}
-
-Assert that two sequences have the same elements (in any order).
-
-This method, unlike assertItemsEqual, doesn't care about any
-duplicates in the expected and actual sequences.
-
- >> assertSameElements([1, 1, 1, 0, 0, 0], [0, 1])
- # Doesn't raise an AssertionError
-
-If possible, you should use assertItemsEqual instead of
-assertSameElements.
-
-##### Args:
-
-
-* <b>`expected_seq`</b>: A sequence containing elements we are expecting.
-* <b>`actual_seq`</b>: The sequence that we are testing.
-* <b>`msg`</b>: The message to be printed if the test fails.
-
-
-- - -
-
-#### `tf.test.TestCase.assertSameStructure(a, b, aname='a', bname='b', msg=None)` {#TestCase.assertSameStructure}
-
-Asserts that two values contain the same structural content.
-
-The two arguments should be data trees consisting of trees of dicts and
-lists. They will be deeply compared by walking into the contents of dicts
-and lists; other items will be compared using the == operator.
-If the two structures differ in content, the failure message will indicate
-the location within the structures where the first difference is found.
-This may be helpful when comparing large structures.
-
-##### Args:
-
-
-* <b>`a`</b>: The first structure to compare.
-* <b>`b`</b>: The second structure to compare.
-* <b>`aname`</b>: Variable name to use for the first structure in assertion messages.
-* <b>`bname`</b>: Variable name to use for the second structure.
-* <b>`msg`</b>: Additional text to include in the failure message.
-
-
-- - -
-
-#### `tf.test.TestCase.assertSequenceAlmostEqual(expected_seq, actual_seq, places=None, msg=None, delta=None)` {#TestCase.assertSequenceAlmostEqual}
-
-An approximate equality assertion for ordered sequences.
-
-Fail if the two sequences are unequal as determined by their value
-differences rounded to the given number of decimal places (default 7) and
-comparing to zero, or by comparing that the difference between each value
-in the two sequences is more than the given delta.
-
-Note that decimal places (from zero) are usually not the same as significant
-digits (measured from the most signficant digit).
-
-If the two sequences compare equal then they will automatically compare
-almost equal.
-
-##### Args:
-
-
-* <b>`expected_seq`</b>: A sequence containing elements we are expecting.
-* <b>`actual_seq`</b>: The sequence that we are testing.
-* <b>`places`</b>: The number of decimal places to compare.
-* <b>`msg`</b>: The message to be printed if the test fails.
-* <b>`delta`</b>: The OK difference between compared values.
-
-
-- - -
-
#### `tf.test.TestCase.assertSequenceEqual(seq1, seq2, msg=None, seq_type=None)` {#TestCase.assertSequenceEqual}
An equality assertion for ordered sequences (like lists and tuples).
@@ -966,26 +565,6 @@ which can be indexed, has a length, and has an equality operator.
- - -
-#### `tf.test.TestCase.assertSequenceStartsWith(prefix, whole, msg=None)` {#TestCase.assertSequenceStartsWith}
-
-An equality assertion for the beginning of ordered sequences.
-
-If prefix is an empty sequence, it will raise an error unless whole is also
-an empty sequence.
-
-If prefix is not a sequence, it will raise an error if the first element of
-whole does not match.
-
-##### Args:
-
-
-* <b>`prefix`</b>: A sequence expected at the beginning of the whole parameter.
-* <b>`whole`</b>: The sequence in which to look for prefix.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
#### `tf.test.TestCase.assertSetEqual(set1, set2, msg=None)` {#TestCase.assertSetEqual}
A set-specific equality assertion.
@@ -1037,51 +616,6 @@ Assert that actual.startswith(expected_start) is True.
- - -
-#### `tf.test.TestCase.assertTotallyOrdered(*groups, **kwargs)` {#TestCase.assertTotallyOrdered}
-
-Asserts that total ordering has been implemented correctly.
-
-For example, say you have a class A that compares only on its attribute x.
-Comparators other than __lt__ are omitted for brevity.
-
-class A(object):
- def __init__(self, x, y):
- self.x = x
- self.y = y
-
- def __hash__(self):
- return hash(self.x)
-
- def __lt__(self, other):
- try:
- return self.x < other.x
- except AttributeError:
- return NotImplemented
-
-assertTotallyOrdered will check that instances can be ordered correctly.
-For example,
-
-self.assertTotallyOrdered(
- [None], # None should come before everything else.
- [1], # Integers sort earlier.
- [A(1, 'a')],
- [A(2, 'b')], # 2 is after 1.
- [A(3, 'c'), A(3, 'd')], # The second argument is irrelevant.
- [A(4, 'z')],
- ['foo']) # Strings sort last.
-
-##### Args:
-
-
-* <b>`*groups`</b>: A list of groups of elements. Each group of elements is a list
- of objects that are equal. The elements in each group must be less than
- the elements in the group after it. For example, these groups are
- totally ordered: [None], [1], [2, 2], [3].
-* <b>`**kwargs`</b>: optional msg keyword argument can be passed.
-
-
-- - -
-
#### `tf.test.TestCase.assertTrue(expr, msg=None)` {#TestCase.assertTrue}
Check that the expression is true.
@@ -1104,13 +638,6 @@ A tuple-specific equality assertion.
- - -
-#### `tf.test.TestCase.assertUrlEqual(a, b, msg=None)` {#TestCase.assertUrlEqual}
-
-Asserts that urls are equal, ignoring ordering of query params.
-
-
-- - -
-
#### `tf.test.TestCase.assert_(expr, msg=None)` {#TestCase.assert_}
Check that the expression is true.
@@ -1170,9 +697,9 @@ tearDown.
- - -
-#### `tf.test.TestCase.fail(msg=None, prefix=None)` {#TestCase.fail}
+#### `tf.test.TestCase.fail(msg=None)` {#TestCase.fail}
-Fail immediately with the given message, optionally prefixed.
+Fail immediately, with the given message.
- - -
@@ -1226,13 +753,6 @@ Fail immediately with the given message, optionally prefixed.
- - -
-#### `tf.test.TestCase.getRecordedProperties()` {#TestCase.getRecordedProperties}
-
-Return any properties that the user has recorded.
-
-
-- - -
-
#### `tf.test.TestCase.get_temp_dir()` {#TestCase.get_temp_dir}
Returns a unique temporary directory for the test to use.
@@ -1255,20 +775,6 @@ pollute each others environment.
- - -
-#### `tf.test.TestCase.recordProperty(property_name, property_value)` {#TestCase.recordProperty}
-
-Record an arbitrary property for later use.
-
-##### Args:
-
-
-* <b>`property_name`</b>: str, name of property to record; must be a valid XML
- attribute name
-* <b>`property_value`</b>: value of property; must be valid XML attribute value
-
-
-- - -
-
#### `tf.test.TestCase.run(result=None)` {#TestCase.run}
@@ -1292,18 +798,11 @@ Hook method for setting up class fixture before running tests in the class.
#### `tf.test.TestCase.shortDescription()` {#TestCase.shortDescription}
-Format both the test method name and the first line of its docstring.
-
-If no docstring is given, only returns the method name.
-
-This method overrides unittest.TestCase.shortDescription(), which
-only returns the first line of the docstring, obscuring the name
-of the test upon failure.
-
-##### Returns:
-
+Returns a one-line description of the test, or None if no
+description has been provided.
-* <b>`desc`</b>: A short description of a test method.
+The default implementation of this method returns the first line of
+the specified test method's docstring.
- - -
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.summary.SummaryDescription.RegisterExtension.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.summary.SummaryDescription.RegisterExtension.md
new file mode 100644
index 0000000000..3cfd7103d7
--- /dev/null
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.summary.SummaryDescription.RegisterExtension.md
@@ -0,0 +1,4 @@
+#### `tf.summary.SummaryDescription.RegisterExtension(extension_handle)` {#SummaryDescription.RegisterExtension}
+
+
+
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.summary.SummaryDescription.FromString.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.summary.SummaryDescription.FromString.md
new file mode 100644
index 0000000000..24a3b3f10c
--- /dev/null
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.summary.SummaryDescription.FromString.md
@@ -0,0 +1,4 @@
+#### `tf.summary.SummaryDescription.FromString(s)` {#SummaryDescription.FromString}
+
+
+
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.summary.TaggedRunMetadata.RegisterExtension.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.summary.TaggedRunMetadata.RegisterExtension.md
new file mode 100644
index 0000000000..f2d0c042d7
--- /dev/null
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.summary.TaggedRunMetadata.RegisterExtension.md
@@ -0,0 +1,4 @@
+#### `tf.summary.TaggedRunMetadata.RegisterExtension(extension_handle)` {#TaggedRunMetadata.RegisterExtension}
+
+
+
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.summary.TaggedRunMetadata.FromString.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.summary.TaggedRunMetadata.FromString.md
new file mode 100644
index 0000000000..613f4ebd73
--- /dev/null
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.summary.TaggedRunMetadata.FromString.md
@@ -0,0 +1,4 @@
+#### `tf.summary.TaggedRunMetadata.FromString(s)` {#TaggedRunMetadata.FromString}
+
+
+
diff --git a/tensorflow/g3doc/api_docs/python/summary.md b/tensorflow/g3doc/api_docs/python/summary.md
index 42c946c971..e7b3fe3511 100644
--- a/tensorflow/g3doc/api_docs/python/summary.md
+++ b/tensorflow/g3doc/api_docs/python/summary.md
@@ -502,11 +502,248 @@ metadata is stored in its NodeDef. This method retrieves the description.
- - -
+#### `tf.summary.SummaryDescription.ByteSize()` {#SummaryDescription.ByteSize}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.Clear()` {#SummaryDescription.Clear}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.ClearExtension(extension_handle)` {#SummaryDescription.ClearExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.ClearField(field_name)` {#SummaryDescription.ClearField}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.CopyFrom(other_msg)` {#SummaryDescription.CopyFrom}
+
+Copies the content of the specified message into the current message.
+
+The method clears the current message and then merges the specified
+message using MergeFrom.
+
+##### Args:
+
+
+* <b>`other_msg`</b>: Message to copy into the current one.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.DiscardUnknownFields()` {#SummaryDescription.DiscardUnknownFields}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.FindInitializationErrors()` {#SummaryDescription.FindInitializationErrors}
+
+Finds required fields which are not initialized.
+
+##### Returns:
+
+ A list of strings. Each string is a path to an uninitialized field from
+ the top-level message, e.g. "foo.bar[5].baz".
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.FromString(s)` {#SummaryDescription.FromString}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.HasExtension(extension_handle)` {#SummaryDescription.HasExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.HasField(field_name)` {#SummaryDescription.HasField}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.IsInitialized(errors=None)` {#SummaryDescription.IsInitialized}
+
+Checks if all required fields of a message are set.
+
+##### Args:
+
+
+* <b>`errors`</b>: A list which, if provided, will be populated with the field
+ paths of all missing required fields.
+
+##### Returns:
+
+ True iff the specified message has all required fields set.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.ListFields()` {#SummaryDescription.ListFields}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.MergeFrom(msg)` {#SummaryDescription.MergeFrom}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.MergeFromString(serialized)` {#SummaryDescription.MergeFromString}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.ParseFromString(serialized)` {#SummaryDescription.ParseFromString}
+
+Parse serialized protocol buffer data into this message.
+
+Like MergeFromString(), except we clear the object first and
+do not return the value that MergeFromString returns.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.RegisterExtension(extension_handle)` {#SummaryDescription.RegisterExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.SerializePartialToString()` {#SummaryDescription.SerializePartialToString}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.SerializeToString()` {#SummaryDescription.SerializeToString}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.SetInParent()` {#SummaryDescription.SetInParent}
+
+Sets the _cached_byte_size_dirty bit to true,
+and propagates this to our listener iff this was a state change.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.WhichOneof(oneof_name)` {#SummaryDescription.WhichOneof}
+
+Returns the name of the currently set field inside a oneof, or None.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__deepcopy__(memo=None)` {#SummaryDescription.__deepcopy__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__eq__(other)` {#SummaryDescription.__eq__}
+
+
+
+
+- - -
+
#### `tf.summary.SummaryDescription.__getstate__()` {#SummaryDescription.__getstate__}
Support the pickle protocol.
+- - -
+
+#### `tf.summary.SummaryDescription.__hash__()` {#SummaryDescription.__hash__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__init__(**kwargs)` {#SummaryDescription.__init__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__ne__(other_msg)` {#SummaryDescription.__ne__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__repr__()` {#SummaryDescription.__repr__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__setstate__(state)` {#SummaryDescription.__setstate__}
+
+Support the pickle protocol.
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__str__()` {#SummaryDescription.__str__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.__unicode__()` {#SummaryDescription.__unicode__}
+
+
+
+
+- - -
+
+#### `tf.summary.SummaryDescription.type_hint` {#SummaryDescription.type_hint}
+
+Magic attribute generated for "type_hint" proto field.
+
+
- - -
@@ -515,9 +752,253 @@ Support the pickle protocol.
- - -
+#### `tf.summary.TaggedRunMetadata.ByteSize()` {#TaggedRunMetadata.ByteSize}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.Clear()` {#TaggedRunMetadata.Clear}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.ClearExtension(extension_handle)` {#TaggedRunMetadata.ClearExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.ClearField(field_name)` {#TaggedRunMetadata.ClearField}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.CopyFrom(other_msg)` {#TaggedRunMetadata.CopyFrom}
+
+Copies the content of the specified message into the current message.
+
+The method clears the current message and then merges the specified
+message using MergeFrom.
+
+##### Args:
+
+
+* <b>`other_msg`</b>: Message to copy into the current one.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.DiscardUnknownFields()` {#TaggedRunMetadata.DiscardUnknownFields}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.FindInitializationErrors()` {#TaggedRunMetadata.FindInitializationErrors}
+
+Finds required fields which are not initialized.
+
+##### Returns:
+
+ A list of strings. Each string is a path to an uninitialized field from
+ the top-level message, e.g. "foo.bar[5].baz".
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.FromString(s)` {#TaggedRunMetadata.FromString}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.HasExtension(extension_handle)` {#TaggedRunMetadata.HasExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.HasField(field_name)` {#TaggedRunMetadata.HasField}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.IsInitialized(errors=None)` {#TaggedRunMetadata.IsInitialized}
+
+Checks if all required fields of a message are set.
+
+##### Args:
+
+
+* <b>`errors`</b>: A list which, if provided, will be populated with the field
+ paths of all missing required fields.
+
+##### Returns:
+
+ True iff the specified message has all required fields set.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.ListFields()` {#TaggedRunMetadata.ListFields}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.MergeFrom(msg)` {#TaggedRunMetadata.MergeFrom}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.MergeFromString(serialized)` {#TaggedRunMetadata.MergeFromString}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.ParseFromString(serialized)` {#TaggedRunMetadata.ParseFromString}
+
+Parse serialized protocol buffer data into this message.
+
+Like MergeFromString(), except we clear the object first and
+do not return the value that MergeFromString returns.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.RegisterExtension(extension_handle)` {#TaggedRunMetadata.RegisterExtension}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.SerializePartialToString()` {#TaggedRunMetadata.SerializePartialToString}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.SerializeToString()` {#TaggedRunMetadata.SerializeToString}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.SetInParent()` {#TaggedRunMetadata.SetInParent}
+
+Sets the _cached_byte_size_dirty bit to true,
+and propagates this to our listener iff this was a state change.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.WhichOneof(oneof_name)` {#TaggedRunMetadata.WhichOneof}
+
+Returns the name of the currently set field inside a oneof, or None.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__deepcopy__(memo=None)` {#TaggedRunMetadata.__deepcopy__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__eq__(other)` {#TaggedRunMetadata.__eq__}
+
+
+
+
+- - -
+
#### `tf.summary.TaggedRunMetadata.__getstate__()` {#TaggedRunMetadata.__getstate__}
Support the pickle protocol.
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__hash__()` {#TaggedRunMetadata.__hash__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__init__(**kwargs)` {#TaggedRunMetadata.__init__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__ne__(other_msg)` {#TaggedRunMetadata.__ne__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__repr__()` {#TaggedRunMetadata.__repr__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__setstate__(state)` {#TaggedRunMetadata.__setstate__}
+
+Support the pickle protocol.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__str__()` {#TaggedRunMetadata.__str__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.__unicode__()` {#TaggedRunMetadata.__unicode__}
+
+
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.run_metadata` {#TaggedRunMetadata.run_metadata}
+
+Magic attribute generated for "run_metadata" proto field.
+
+
+- - -
+
+#### `tf.summary.TaggedRunMetadata.tag` {#TaggedRunMetadata.tag}
+
+Magic attribute generated for "tag" proto field.
+
+
diff --git a/tensorflow/g3doc/api_docs/python/test.md b/tensorflow/g3doc/api_docs/python/test.md
index bd27fece09..189a368ad2 100644
--- a/tensorflow/g3doc/api_docs/python/test.md
+++ b/tensorflow/g3doc/api_docs/python/test.md
@@ -197,125 +197,6 @@ Checks that for all elements of farray1 and farray2
- - -
-#### `tf.test.TestCase.assertBetween(value, minv, maxv, msg=None)` {#TestCase.assertBetween}
-
-Asserts that value is between minv and maxv (inclusive).
-
-
-- - -
-
-#### `tf.test.TestCase.assertCommandFails(command, regexes, env=None, close_fds=True, msg=None)` {#TestCase.assertCommandFails}
-
-Asserts a shell command fails and the error matches a regex in a list.
-
-##### Args:
-
-
-* <b>`command`</b>: List or string representing the command to run.
-* <b>`regexes`</b>: the list of regular expression strings.
-* <b>`env`</b>: Dictionary of environment variable settings.
-* <b>`close_fds`</b>: Whether or not to close all open fd's in the child after
- forking.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertCommandSucceeds(command, regexes=('',), env=None, close_fds=True, msg=None)` {#TestCase.assertCommandSucceeds}
-
-Asserts that a shell command succeeds (i.e. exits with code 0).
-
-##### Args:
-
-
-* <b>`command`</b>: List or string representing the command to run.
-* <b>`regexes`</b>: List of regular expression byte strings that match success.
-* <b>`env`</b>: Dictionary of environment variable settings.
-* <b>`close_fds`</b>: Whether or not to close all open fd's in the child after
- forking.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertContainsExactSubsequence(container, subsequence, msg=None)` {#TestCase.assertContainsExactSubsequence}
-
-Assert that "container" contains "subsequence" as an exact subsequence.
-
-Asserts that "container" contains all the elements of "subsequence", in
-order, and without other elements interspersed. For example, [1, 2, 3] is an
-exact subsequence of [0, 0, 1, 2, 3, 0] but not of [0, 0, 1, 2, 0, 3, 0].
-
-##### Args:
-
-
-* <b>`container`</b>: the list we're testing for subsequence inclusion.
-* <b>`subsequence`</b>: the list we hope will be an exact subsequence of container.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertContainsInOrder(strings, target, msg=None)` {#TestCase.assertContainsInOrder}
-
-Asserts that the strings provided are found in the target in order.
-
-This may be useful for checking HTML output.
-
-##### Args:
-
-
-* <b>`strings`</b>: A list of strings, such as [ 'fox', 'dog' ]
-* <b>`target`</b>: A target string in which to look for the strings, such as
- 'The quick brown fox jumped over the lazy dog'.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertContainsSubsequence(container, subsequence, msg=None)` {#TestCase.assertContainsSubsequence}
-
-Assert that "container" contains "subsequence" as a subsequence.
-
-Asserts that "container" contains all the elements of "subsequence", in
-order, but possibly with other elements interspersed. For example, [1, 2, 3]
-is a subsequence of [0, 0, 1, 2, 0, 3, 0] but not of [0, 0, 1, 3, 0, 2, 0].
-
-##### Args:
-
-
-* <b>`container`</b>: the list we're testing for subsequence inclusion.
-* <b>`subsequence`</b>: the list we hope will be a subsequence of container.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertContainsSubset(expected_subset, actual_set, msg=None)` {#TestCase.assertContainsSubset}
-
-Checks whether actual iterable is a superset of expected iterable.
-
-
-- - -
-
-#### `tf.test.TestCase.assertCountEqual(*args, **kwargs)` {#TestCase.assertCountEqual}
-
-An unordered sequence specific comparison.
-
-Equivalent to assertItemsEqual(). This method is a compatibility layer
-for Python 3k, since 2to3 does not convert assertItemsEqual() calls into
-assertCountEqual() calls.
-
-##### Args:
-
-
-* <b>`expected_seq`</b>: A sequence containing elements we are expecting.
-* <b>`actual_seq`</b>: The sequence that we are testing.
-* <b>`msg`</b>: The message to be printed if the test fails.
-
-
-- - -
-
#### `tf.test.TestCase.assertDeviceEqual(device1, device2)` {#TestCase.assertDeviceEqual}
Asserts that the two given devices are the same.
@@ -336,49 +217,10 @@ Checks whether actual is a superset of expected.
- - -
-#### `tf.test.TestCase.assertDictEqual(a, b, msg=None)` {#TestCase.assertDictEqual}
+#### `tf.test.TestCase.assertDictEqual(d1, d2, msg=None)` {#TestCase.assertDictEqual}
-Raises AssertionError if a and b are not equal dictionaries.
-
-##### Args:
-
-
-* <b>`a`</b>: A dict, the expected value.
-* <b>`b`</b>: A dict, the actual value.
-* <b>`msg`</b>: An optional str, the associated message.
-
-##### Raises:
-
-
-* <b>`AssertionError`</b>: if the dictionaries are not equal.
-
-
-- - -
-
-#### `tf.test.TestCase.assertEmpty(container, msg=None)` {#TestCase.assertEmpty}
-
-Assert that an object has zero length.
-
-##### Args:
-
-
-* <b>`container`</b>: Anything that implements the collections.Sized interface.
-* <b>`msg`</b>: Optional message to report on failure.
-- - -
-
-#### `tf.test.TestCase.assertEndsWith(actual, expected_end, msg=None)` {#TestCase.assertEndsWith}
-
-Assert that actual.endswith(expected_end) is True.
-
-##### Args:
-
-
-* <b>`actual`</b>: str
-* <b>`expected_end`</b>: str
-* <b>`msg`</b>: Optional message to report on failure.
-
- - -
@@ -462,11 +304,10 @@ Included for symmetry with assertIsNone.
- - -
-#### `tf.test.TestCase.assertItemsEqual(*args, **kwargs)` {#TestCase.assertItemsEqual}
-
-An unordered sequence specific comparison.
+#### `tf.test.TestCase.assertItemsEqual(expected_seq, actual_seq, msg=None)` {#TestCase.assertItemsEqual}
-It asserts that actual_seq and expected_seq have the same element counts.
+An unordered sequence specific comparison. It asserts that
+actual_seq and expected_seq have the same element counts.
Equivalent to::
self.assertEqual(Counter(iter(actual_seq)),
@@ -479,30 +320,6 @@ Asserts that each element has the same count in both sequences.
- [0, 1, 1] and [1, 0, 1] compare equal.
- [0, 0, 1] and [0, 1] compare unequal.
-##### Args:
-
-
-* <b>`expected_seq`</b>: A sequence containing elements we are expecting.
-* <b>`actual_seq`</b>: The sequence that we are testing.
-* <b>`msg`</b>: The message to be printed if the test fails.
-
-
-- - -
-
-#### `tf.test.TestCase.assertJsonEqual(first, second, msg=None)` {#TestCase.assertJsonEqual}
-
-Asserts that the JSON objects defined in two strings are equal.
-
-A summary of the differences will be included in the failure message
-using assertSameStructure.
-
-##### Args:
-
-
-* <b>`first`</b>: A string contining JSON to decode and compare to second.
-* <b>`second`</b>: A string contining JSON to decode and compare to first.
-* <b>`msg`</b>: Additional text to include in the failure message.
-
- - -
@@ -574,13 +391,6 @@ if not.
- - -
-#### `tf.test.TestCase.assertNoCommonElements(expected_seq, actual_seq, msg=None)` {#TestCase.assertNoCommonElements}
-
-Checks whether actual iterable and expected iterable are disjoint.
-
-
-- - -
-
#### `tf.test.TestCase.assertNotAlmostEqual(first, second, places=None, msg=None, delta=None)` {#TestCase.assertNotAlmostEqual}
Fail if the two objects are equal as determined by their
@@ -611,33 +421,6 @@ Objects that are equal automatically fail.
- - -
-#### `tf.test.TestCase.assertNotEmpty(container, msg=None)` {#TestCase.assertNotEmpty}
-
-Assert that an object has non-zero length.
-
-##### Args:
-
-
-* <b>`container`</b>: Anything that implements the collections.Sized interface.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
-#### `tf.test.TestCase.assertNotEndsWith(actual, unexpected_end, msg=None)` {#TestCase.assertNotEndsWith}
-
-Assert that actual.endswith(unexpected_end) is False.
-
-##### Args:
-
-
-* <b>`actual`</b>: str
-* <b>`unexpected_end`</b>: str
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
#### `tf.test.TestCase.assertNotEqual(first, second, msg=None)` {#TestCase.assertNotEqual}
Fail if the two objects are equal as determined by the '!='
@@ -675,20 +458,6 @@ Fail the test if the text matches the regular expression.
- - -
-#### `tf.test.TestCase.assertNotStartsWith(actual, unexpected_start, msg=None)` {#TestCase.assertNotStartsWith}
-
-Assert that actual.startswith(unexpected_start) is False.
-
-##### Args:
-
-
-* <b>`actual`</b>: str
-* <b>`unexpected_start`</b>: str
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
#### `tf.test.TestCase.assertProtoEquals(expected_message_maybe_ascii, message)` {#TestCase.assertProtoEquals}
Asserts that message is same as parsed expected_message_ascii.
@@ -763,38 +532,6 @@ Asserts that the message in a raised exception matches a regexp.
- - -
-#### `tf.test.TestCase.assertRaisesWithLiteralMatch(expected_exception, expected_exception_message, callable_obj=None, *args, **kwargs)` {#TestCase.assertRaisesWithLiteralMatch}
-
-Asserts that the message in a raised exception equals the given string.
-
-Unlike assertRaisesRegexp, this method takes a literal string, not
-a regular expression.
-
-with self.assertRaisesWithLiteralMatch(ExType, 'message'):
- DoSomething()
-
-##### Args:
-
-
-* <b>`expected_exception`</b>: Exception class expected to be raised.
-* <b>`expected_exception_message`</b>: String message expected in the raised
- exception. For a raise exception e, expected_exception_message must
- equal str(e).
-* <b>`callable_obj`</b>: Function to be called, or None to return a context.
-* <b>`args`</b>: Extra args.
-* <b>`kwargs`</b>: Extra kwargs.
-
-##### Returns:
-
- A context manager if callable_obj is None. Otherwise, None.
-
-##### Raises:
-
- self.failureException if callable_obj does not raise a macthing exception.
-
-
-- - -
-
#### `tf.test.TestCase.assertRaisesWithPredicateMatch(exception_type, expected_err_re_or_predicate)` {#TestCase.assertRaisesWithPredicateMatch}
Returns a context manager to enclose code expected to raise an exception.
@@ -819,71 +556,6 @@ predicate search.
- - -
-#### `tf.test.TestCase.assertRaisesWithRegexpMatch(expected_exception, expected_regexp, callable_obj=None, *args, **kwargs)` {#TestCase.assertRaisesWithRegexpMatch}
-
-Asserts that the message in a raised exception matches the given regexp.
-
-This is just a wrapper around assertRaisesRegexp. Please use
-assertRaisesRegexp instead of assertRaisesWithRegexpMatch.
-
-##### Args:
-
-
-* <b>`expected_exception`</b>: Exception class expected to be raised.
-* <b>`expected_regexp`</b>: Regexp (re pattern object or string) expected to be
- found in error message.
-* <b>`callable_obj`</b>: Function to be called, or None to return a context.
-* <b>`args`</b>: Extra args.
-* <b>`kwargs`</b>: Extra keyword args.
-
-##### Returns:
-
- A context manager if callable_obj is None. Otherwise, None.
-
-##### Raises:
-
- self.failureException if callable_obj does not raise a macthing exception.
-
-
-- - -
-
-#### `tf.test.TestCase.assertRegexMatch(actual_str, regexes, message=None)` {#TestCase.assertRegexMatch}
-
-Asserts that at least one regex in regexes matches str.
-
- If possible you should use assertRegexpMatches, which is a simpler
- version of this method. assertRegexpMatches takes a single regular
- expression (a string or re compiled object) instead of a list.
-
- Notes:
- 1. This function uses substring matching, i.e. the matching
- succeeds if *any* substring of the error message matches *any*
- regex in the list. This is more convenient for the user than
- full-string matching.
-
- 2. If regexes is the empty list, the matching will always fail.
-
- 3. Use regexes=[''] for a regex that will always pass.
-
- 4. '.' matches any single character *except* the newline. To
- match any character, use '(.|
-)'.
-
- 5. '^' matches the beginning of each line, not just the beginning
- of the string. Similarly, '$' matches the end of each line.
-
- 6. An exception will be thrown if regexes contains an invalid
- regex.
-
- Args:
- actual_str: The string we try to match with the items in regexes.
- regexes: The regular expressions we want to match against str.
- See "Notes" above for detailed notes on how this is interpreted.
- message: The message to be printed if the test fails.
-
-
-- - -
-
#### `tf.test.TestCase.assertRegexpMatches(text, expected_regexp, msg=None)` {#TestCase.assertRegexpMatches}
Fail the test unless the text matches the regular expression.
@@ -891,79 +563,6 @@ Fail the test unless the text matches the regular expression.
- - -
-#### `tf.test.TestCase.assertSameElements(expected_seq, actual_seq, msg=None)` {#TestCase.assertSameElements}
-
-Assert that two sequences have the same elements (in any order).
-
-This method, unlike assertItemsEqual, doesn't care about any
-duplicates in the expected and actual sequences.
-
- >> assertSameElements([1, 1, 1, 0, 0, 0], [0, 1])
- # Doesn't raise an AssertionError
-
-If possible, you should use assertItemsEqual instead of
-assertSameElements.
-
-##### Args:
-
-
-* <b>`expected_seq`</b>: A sequence containing elements we are expecting.
-* <b>`actual_seq`</b>: The sequence that we are testing.
-* <b>`msg`</b>: The message to be printed if the test fails.
-
-
-- - -
-
-#### `tf.test.TestCase.assertSameStructure(a, b, aname='a', bname='b', msg=None)` {#TestCase.assertSameStructure}
-
-Asserts that two values contain the same structural content.
-
-The two arguments should be data trees consisting of trees of dicts and
-lists. They will be deeply compared by walking into the contents of dicts
-and lists; other items will be compared using the == operator.
-If the two structures differ in content, the failure message will indicate
-the location within the structures where the first difference is found.
-This may be helpful when comparing large structures.
-
-##### Args:
-
-
-* <b>`a`</b>: The first structure to compare.
-* <b>`b`</b>: The second structure to compare.
-* <b>`aname`</b>: Variable name to use for the first structure in assertion messages.
-* <b>`bname`</b>: Variable name to use for the second structure.
-* <b>`msg`</b>: Additional text to include in the failure message.
-
-
-- - -
-
-#### `tf.test.TestCase.assertSequenceAlmostEqual(expected_seq, actual_seq, places=None, msg=None, delta=None)` {#TestCase.assertSequenceAlmostEqual}
-
-An approximate equality assertion for ordered sequences.
-
-Fail if the two sequences are unequal as determined by their value
-differences rounded to the given number of decimal places (default 7) and
-comparing to zero, or by comparing that the difference between each value
-in the two sequences is more than the given delta.
-
-Note that decimal places (from zero) are usually not the same as significant
-digits (measured from the most signficant digit).
-
-If the two sequences compare equal then they will automatically compare
-almost equal.
-
-##### Args:
-
-
-* <b>`expected_seq`</b>: A sequence containing elements we are expecting.
-* <b>`actual_seq`</b>: The sequence that we are testing.
-* <b>`places`</b>: The number of decimal places to compare.
-* <b>`msg`</b>: The message to be printed if the test fails.
-* <b>`delta`</b>: The OK difference between compared values.
-
-
-- - -
-
#### `tf.test.TestCase.assertSequenceEqual(seq1, seq2, msg=None, seq_type=None)` {#TestCase.assertSequenceEqual}
An equality assertion for ordered sequences (like lists and tuples).
@@ -984,26 +583,6 @@ which can be indexed, has a length, and has an equality operator.
- - -
-#### `tf.test.TestCase.assertSequenceStartsWith(prefix, whole, msg=None)` {#TestCase.assertSequenceStartsWith}
-
-An equality assertion for the beginning of ordered sequences.
-
-If prefix is an empty sequence, it will raise an error unless whole is also
-an empty sequence.
-
-If prefix is not a sequence, it will raise an error if the first element of
-whole does not match.
-
-##### Args:
-
-
-* <b>`prefix`</b>: A sequence expected at the beginning of the whole parameter.
-* <b>`whole`</b>: The sequence in which to look for prefix.
-* <b>`msg`</b>: Optional message to report on failure.
-
-
-- - -
-
#### `tf.test.TestCase.assertSetEqual(set1, set2, msg=None)` {#TestCase.assertSetEqual}
A set-specific equality assertion.
@@ -1055,51 +634,6 @@ Assert that actual.startswith(expected_start) is True.
- - -
-#### `tf.test.TestCase.assertTotallyOrdered(*groups, **kwargs)` {#TestCase.assertTotallyOrdered}
-
-Asserts that total ordering has been implemented correctly.
-
-For example, say you have a class A that compares only on its attribute x.
-Comparators other than __lt__ are omitted for brevity.
-
-class A(object):
- def __init__(self, x, y):
- self.x = x
- self.y = y
-
- def __hash__(self):
- return hash(self.x)
-
- def __lt__(self, other):
- try:
- return self.x < other.x
- except AttributeError:
- return NotImplemented
-
-assertTotallyOrdered will check that instances can be ordered correctly.
-For example,
-
-self.assertTotallyOrdered(
- [None], # None should come before everything else.
- [1], # Integers sort earlier.
- [A(1, 'a')],
- [A(2, 'b')], # 2 is after 1.
- [A(3, 'c'), A(3, 'd')], # The second argument is irrelevant.
- [A(4, 'z')],
- ['foo']) # Strings sort last.
-
-##### Args:
-
-
-* <b>`*groups`</b>: A list of groups of elements. Each group of elements is a list
- of objects that are equal. The elements in each group must be less than
- the elements in the group after it. For example, these groups are
- totally ordered: [None], [1], [2, 2], [3].
-* <b>`**kwargs`</b>: optional msg keyword argument can be passed.
-
-
-- - -
-
#### `tf.test.TestCase.assertTrue(expr, msg=None)` {#TestCase.assertTrue}
Check that the expression is true.
@@ -1122,13 +656,6 @@ A tuple-specific equality assertion.
- - -
-#### `tf.test.TestCase.assertUrlEqual(a, b, msg=None)` {#TestCase.assertUrlEqual}
-
-Asserts that urls are equal, ignoring ordering of query params.
-
-
-- - -
-
#### `tf.test.TestCase.assert_(expr, msg=None)` {#TestCase.assert_}
Check that the expression is true.
@@ -1188,9 +715,9 @@ tearDown.
- - -
-#### `tf.test.TestCase.fail(msg=None, prefix=None)` {#TestCase.fail}
+#### `tf.test.TestCase.fail(msg=None)` {#TestCase.fail}
-Fail immediately with the given message, optionally prefixed.
+Fail immediately, with the given message.
- - -
@@ -1244,13 +771,6 @@ Fail immediately with the given message, optionally prefixed.
- - -
-#### `tf.test.TestCase.getRecordedProperties()` {#TestCase.getRecordedProperties}
-
-Return any properties that the user has recorded.
-
-
-- - -
-
#### `tf.test.TestCase.get_temp_dir()` {#TestCase.get_temp_dir}
Returns a unique temporary directory for the test to use.
@@ -1273,20 +793,6 @@ pollute each others environment.
- - -
-#### `tf.test.TestCase.recordProperty(property_name, property_value)` {#TestCase.recordProperty}
-
-Record an arbitrary property for later use.
-
-##### Args:
-
-
-* <b>`property_name`</b>: str, name of property to record; must be a valid XML
- attribute name
-* <b>`property_value`</b>: value of property; must be valid XML attribute value
-
-
-- - -
-
#### `tf.test.TestCase.run(result=None)` {#TestCase.run}
@@ -1310,18 +816,11 @@ Hook method for setting up class fixture before running tests in the class.
#### `tf.test.TestCase.shortDescription()` {#TestCase.shortDescription}
-Format both the test method name and the first line of its docstring.
-
-If no docstring is given, only returns the method name.
-
-This method overrides unittest.TestCase.shortDescription(), which
-only returns the first line of the docstring, obscuring the name
-of the test upon failure.
-
-##### Returns:
-
+Returns a one-line description of the test, or None if no
+description has been provided.
-* <b>`desc`</b>: A short description of a test method.
+The default implementation of this method returns the first line of
+the specified test method's docstring.
- - -
diff --git a/tensorflow/g3doc/get_started/os_setup.md b/tensorflow/g3doc/get_started/os_setup.md
index 7c968a5468..66c106d2c8 100644
--- a/tensorflow/g3doc/get_started/os_setup.md
+++ b/tensorflow/g3doc/get_started/os_setup.md
@@ -78,51 +78,51 @@ If the above commands do not work on your system, you can follow these instructi
```bash
# Ubuntu/Linux 64-bit, CPU only, Python 2.7
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp27-none-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp27-none-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp27-none-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp27-none-linux_x86_64.whl
# Mac OS X, CPU only, Python 2.7:
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc1-py2-none-any.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc2-py2-none-any.whl
# Mac OS X, GPU enabled, Python 2.7:
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc1-py2-none-any.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc2-py2-none-any.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.3
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp33-cp33m-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp33-cp33m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.3
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp33-cp33m-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp33-cp33m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.4
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp34-cp34m-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.4
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp34-cp34m-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.5
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp35-cp35m-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp35-cp35m-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.6
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp36-cp36m-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp36-cp36m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.6
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp36-cp36m-linux_x86_64.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp36-cp36m-linux_x86_64.whl
# Mac OS X, CPU only, Python 3.4 or 3.5:
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc1-py3-none-any.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc2-py3-none-any.whl
# Mac OS X, GPU enabled, Python 3.4 or 3.5:
-$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc1-py3-none-any.whl
+$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc2-py3-none-any.whl
```
Install TensorFlow:
@@ -164,14 +164,14 @@ Both distributions include pip. To install the CPU-only version of
TensorFlow, enter the following command at a command prompt:
```bat
-C:\> pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0rc1-cp35-cp35m-win_amd64.whl
+C:\> pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0rc2-cp35-cp35m-win_amd64.whl
```
To install the GPU version of TensorFlow, enter the following command
at a command prompt:
```bat
-C:\> pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.0rc1-cp35-cp35m-win_amd64.whl
+C:\> pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.0rc2-cp35-cp35m-win_amd64.whl
```
You can now [test your installation](#test-the-tensorflow-installation).
@@ -226,51 +226,51 @@ Now, install TensorFlow just as you would for a regular Pip installation. First
```bash
# Ubuntu/Linux 64-bit, CPU only, Python 2.7
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp27-none-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp27-none-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp27-none-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp27-none-linux_x86_64.whl
# Mac OS X, CPU only, Python 2.7:
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc1-py2-none-any.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc2-py2-none-any.whl
# Mac OS X, GPU enabled, Python 2.7:
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc1-py2-none-any.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc2-py2-none-any.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.3
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp33-cp33m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp33-cp33m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.3
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp33-cp33m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp33-cp33m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.4
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp34-cp34m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.4
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp34-cp34m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.5
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp35-cp35m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp35-cp35m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.6
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp36-cp36m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp36-cp36m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.6
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp36-cp36m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp36-cp36m-linux_x86_64.whl
# Mac OS X, CPU only, Python 3.4 or 3.5:
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc1-py3-none-any.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc2-py3-none-any.whl
# Mac OS X, GPU enabled, Python 3.4 or 3.5:
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc1-py3-none-any.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc2-py3-none-any.whl
```
Finally install TensorFlow:
@@ -392,51 +392,51 @@ select the correct binary to install:
```bash
# Ubuntu/Linux 64-bit, CPU only, Python 2.7
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp27-none-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp27-none-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp27-none-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp27-none-linux_x86_64.whl
# Mac OS X, CPU only, Python 2.7:
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc1-py2-none-any.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc2-py2-none-any.whl
# Mac OS X, GPU enabled, Python 2.7:
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc1-py2-none-any.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc2-py2-none-any.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.3
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp33-cp33m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp33-cp33m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.3
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp33-cp33m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp33-cp33m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.4
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp34-cp34m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.4
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp34-cp34m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.5
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp35-cp35m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp35-cp35m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.6
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc1-cp36-cp36m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc2-cp36-cp36m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.6
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc1-cp36-cp36m-linux_x86_64.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc2-cp36-cp36m-linux_x86_64.whl
# Mac OS X, CPU only, Python 3.4 or 3.5:
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc1-py3-none-any.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc2-py3-none-any.whl
# Mac OS X, GPU enabled, Python 3.4 or 3.5:
-(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc1-py3-none-any.whl
+(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc2-py3-none-any.whl
```
Finally install TensorFlow:
@@ -504,7 +504,7 @@ code.
code.
We also have tags with `latest` replaced by a released version (e.g.,
-`1.0.0-rc1-gpu`).
+`1.0.0-rc2-gpu`).
With Docker the installation is as follows:
@@ -909,7 +909,7 @@ $ bazel build --config opt --config=sycl //tensorflow/tools/pip_package:build_pi
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
# The name of the .whl file will depend on your platform.
-$ sudo pip install /tmp/tensorflow_pkg/tensorflow-1.0.0rc1-py2-none-any.whl
+$ sudo pip install /tmp/tensorflow_pkg/tensorflow-1.0.0rc2-py2-none-any.whl
```
## Optimizing CPU performance
@@ -1254,6 +1254,12 @@ installed, such as:
$ pip install --upgrade protobuf
```
+Or (if you have protobuf installed with Homebrew):
+
+```bash
+$ brew upgrade protobuf
+```
+
### Mac OS X: Segmentation Fault when import tensorflow
On Mac OS X, you might get the following error when importing tensorflow in python:
diff --git a/tensorflow/g3doc/how_tos/style_guide.md b/tensorflow/g3doc/how_tos/style_guide.md
index 34504d2239..ccbb611c3e 100644
--- a/tensorflow/g3doc/how_tos/style_guide.md
+++ b/tensorflow/g3doc/how_tos/style_guide.md
@@ -134,7 +134,7 @@ Example:
output_collections=['MY_OPS'], name='add_t1t2')
[2.3, 3.4]
"""
- with tf.op_scope([tensor_in, other_tensor_in], name, "my_op"):
+ with tf.name_scope(name, "my_op", [tensor_in, other_tensor_in]):
tensor_in = tf.convert_to_tensor(tensor_in)
other_tensor_in = tf.convert_to_tensor(other_tensor_in)
result = my_param * tensor_in + other_param * other_tensor_in
diff --git a/tensorflow/go/example_inception_inference_test.go b/tensorflow/go/example_inception_inference_test.go
index 51ad652e78..42d169ed9a 100644
--- a/tensorflow/go/example_inception_inference_test.go
+++ b/tensorflow/go/example_inception_inference_test.go
@@ -26,8 +26,8 @@ import (
"os"
"path/filepath"
- "github.com/tensorflow/tensorflow/tensorflow/go/op"
tf "github.com/tensorflow/tensorflow/tensorflow/go"
+ "github.com/tensorflow/tensorflow/tensorflow/go/op"
)
func Example() {
diff --git a/tensorflow/go/genop/main.go b/tensorflow/go/genop/main.go
index 70bd129aff..46163ef0ad 100644
--- a/tensorflow/go/genop/main.go
+++ b/tensorflow/go/genop/main.go
@@ -33,7 +33,7 @@ func main() {
var (
filename = flag.String("outfile", "", "File to write generated source code to.")
header = flag.String("header", "", "Path to a file whose contents will be copied into the generated file. Can be empty")
- buf bytes.Buffer
+ buf bytes.Buffer
)
flag.Parse()
if *filename == "" {
diff --git a/tensorflow/go/op/generate.go b/tensorflow/go/op/generate.go
index 5b4d842d28..ed35964969 100644
--- a/tensorflow/go/op/generate.go
+++ b/tensorflow/go/op/generate.go
@@ -16,4 +16,3 @@
//go:generate go run ../genop/main.go -outfile wrappers.go
package op
-
diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD
index 5353035b18..04e1afaf81 100644
--- a/tensorflow/python/BUILD
+++ b/tensorflow/python/BUILD
@@ -2636,7 +2636,6 @@ cuda_py_tests(
"training/proximal_gradient_descent_test.py",
"training/queue_runner_test.py",
"training/rmsprop_test.py",
- "training/saver_test.py",
"training/slot_creator_test.py",
"training/tensorboard_logging_test.py",
"training/training_ops_test.py",
@@ -2678,6 +2677,41 @@ cuda_py_tests(
],
)
+cuda_py_test(
+ name = "saver_test",
+ size = "medium",
+ srcs = [
+ "training/saver_test.py",
+ ],
+ additional_deps = [
+ ":array_ops",
+ ":client_testlib",
+ ":control_flow_ops",
+ ":data_flow_ops",
+ ":data_flow_ops_gen",
+ ":errors",
+ ":gradients",
+ ":math_ops",
+ ":nn_grad",
+ ":nn_ops",
+ ":partitioned_variables",
+ ":platform",
+ ":platform_test",
+ ":pywrap_tensorflow",
+ ":random_ops",
+ ":resource_variable_ops",
+ ":sparse_ops",
+ ":summary",
+ ":training",
+ ":util",
+ ":variable_scope",
+ ":variables",
+ "//third_party/py/numpy",
+ "@six_archive//:six",
+ "//tensorflow/core:protos_all_py",
+ ],
+)
+
py_test(
name = "saver_large_variable_test",
size = "small",
diff --git a/tensorflow/python/framework/errors_impl.py b/tensorflow/python/framework/errors_impl.py
index 04a6e4d7fb..32c96ec947 100644
--- a/tensorflow/python/framework/errors_impl.py
+++ b/tensorflow/python/framework/errors_impl.py
@@ -456,8 +456,8 @@ def _make_specific_exception(node_def, op, message, error_code):
@contextlib.contextmanager
def raise_exception_on_not_ok_status():
+ status = pywrap_tensorflow.TF_NewStatus()
try:
- status = pywrap_tensorflow.TF_NewStatus()
yield status
if pywrap_tensorflow.TF_GetCode(status) != 0:
raise _make_specific_exception(
diff --git a/tensorflow/python/framework/function.py b/tensorflow/python/framework/function.py
index 46da2646ec..7c0201f93e 100644
--- a/tensorflow/python/framework/function.py
+++ b/tensorflow/python/framework/function.py
@@ -769,6 +769,10 @@ class Defun(object):
default graph and adds the definition of the function into the
default graph. Because the addition of the function into the graph
is deferred, the decorator can be used anywhere in the program.
+
+ Definitions of functions are frozen in a graph as soon as the graph is used to
+ create a session. Therefore, nodes using the function must be created in the
+ graph before the corresponding session is created.
Example, but also see the [How To on functions](link_needed).
diff --git a/tensorflow/python/framework/op_def_library.py b/tensorflow/python/framework/op_def_library.py
index cb79954226..7f2b03e350 100644
--- a/tensorflow/python/framework/op_def_library.py
+++ b/tensorflow/python/framework/op_def_library.py
@@ -618,8 +618,8 @@ class OpDefLibrary(object):
if input_arg.is_ref:
if not all(x._is_ref_dtype for x in types): # pylint: disable=protected-access
raise TypeError(
- "Input '%s' of '%s' Op requires l-value input" %
- (input_name, op_type_name))
+ ("'%s' Op requires that input '%s' be a mutable tensor " +
+ "(e.g.: a tf.Variable)") % (op_type_name, input_name))
input_types.extend(types)
else:
input_types.extend(base_types)
diff --git a/tensorflow/python/framework/op_def_library_test.py b/tensorflow/python/framework/op_def_library_test.py
index 0fc7f0b353..715e863b78 100644
--- a/tensorflow/python/framework/op_def_library_test.py
+++ b/tensorflow/python/framework/op_def_library_test.py
@@ -1462,7 +1462,8 @@ class OpDefLibraryTest(test_util.TensorFlowTestCase):
with self.assertRaises(TypeError) as cm:
self._lib.apply_op("RefIn", a=2)
self.assertEqual(str(cm.exception),
- "Input 'a' of 'RefIn' Op requires l-value input")
+ "'RefIn' Op requires that input 'a' be a mutable tensor " +
+ "(e.g.: a tf.Variable)")
input_a = self._lib.apply_op("RefOut", T=dtypes.int32, name="t")
input_b = self._lib.apply_op("RefOut", T=dtypes.int32, name="u")
diff --git a/tensorflow/python/kernel_tests/constant_op_test.py b/tensorflow/python/kernel_tests/constant_op_test.py
index fe93a30668..128a6529f0 100644
--- a/tensorflow/python/kernel_tests/constant_op_test.py
+++ b/tensorflow/python/kernel_tests/constant_op_test.py
@@ -771,6 +771,12 @@ class PlaceholderWithDefaultTest(test.TestCase):
self.assertAllEqual(
[[3, 3], [3, 3]], a.eval(feed_dict={p: [[3, 3], [3, 3]]}))
+ def testGradient(self):
+ with self.test_session():
+ x = array_ops.placeholder(dtypes_lib.float32, [5, 7])
+ y = array_ops.placeholder_with_default(x, None)
+ err = gradient_checker.compute_gradient_error(x, [5, 7], y, [5, 7])
+ self.assertLess(err, 1e-3)
if __name__ == "__main__":
test.main()
diff --git a/tensorflow/python/kernel_tests/variables_test.py b/tensorflow/python/kernel_tests/variables_test.py
index b96d16e54b..11b350a99e 100644
--- a/tensorflow/python/kernel_tests/variables_test.py
+++ b/tensorflow/python/kernel_tests/variables_test.py
@@ -419,6 +419,12 @@ class VariablesTestCase(test.TestCase):
self.assertAllClose(np.ones((5, 5), np.float32), var.eval())
+ def testRepr(self):
+ var = variables.Variable(np.zeros((5, 5), np.float32), name='noop')
+ self.assertEqual(
+ "<tf.Variable 'noop:0' shape=(5, 5) dtype=float32_ref>",
+ repr(var))
+
class IsInitializedTest(test.TestCase):
diff --git a/tensorflow/python/lib/io/file_io.py b/tensorflow/python/lib/io/file_io.py
index ddd117e443..ace03e3d1b 100644
--- a/tensorflow/python/lib/io/file_io.py
+++ b/tensorflow/python/lib/io/file_io.py
@@ -146,9 +146,7 @@ class FileIO(object):
def tell(self):
"""Returns the current position in the file."""
- if not self._read_check_passed:
- raise errors.PermissionDeniedError(None, None,
- "File isn't open for reading")
+ self._preread_check()
return self._read_buf.Tell()
def __enter__(self):
diff --git a/tensorflow/python/lib/io/file_io_test.py b/tensorflow/python/lib/io/file_io_test.py
index 0063eebb59..72931217d9 100644
--- a/tensorflow/python/lib/io/file_io_test.py
+++ b/tensorflow/python/lib/io/file_io_test.py
@@ -354,6 +354,7 @@ class FileIoTest(test.TestCase):
file_path = os.path.join(self._base_dir, "temp_file")
with file_io.FileIO(file_path, mode="r+") as f:
f.write("testing1\ntesting2\ntesting3\n\ntesting5")
+ self.assertEqual(0, f.tell())
self.assertEqual("testing1\n", f.readline())
self.assertEqual(9, f.tell())
self.assertEqual("testing2\n", f.readline())
diff --git a/tensorflow/python/ops/array_grad.py b/tensorflow/python/ops/array_grad.py
index fa1dda29ad..8d66452b4b 100644
--- a/tensorflow/python/ops/array_grad.py
+++ b/tensorflow/python/ops/array_grad.py
@@ -382,6 +382,7 @@ def _CheckNumericsGrad(_, grad):
grad, "Not a number (NaN) or infinity (Inf) values detected in gradient.")
+@ops.RegisterGradient("PlaceholderWithDefault")
@ops.RegisterGradient("Identity")
def _IdGrad(_, grad):
return grad
diff --git a/tensorflow/python/ops/array_ops.py b/tensorflow/python/ops/array_ops.py
index 61cb5666a7..97f80a3f06 100644
--- a/tensorflow/python/ops/array_ops.py
+++ b/tensorflow/python/ops/array_ops.py
@@ -616,8 +616,8 @@ def strided_slice(input_,
tf.strided_slice(input, [1, 0, 0], [2, 1, 3], [1, 1, 1]) ==> [[[3, 3, 3]]]
tf.strided_slice(input, [1, 0, 0], [2, 2, 3], [1, 1, 1]) ==> [[[3, 3, 3],
[4, 4, 4]]]
- tf.strided_slice(input, [1, 1, 0], [2, -1, 3], [1, -1, 1]) ==>[[[4, 4, 4],
- [3, 3, 3]]]
+ tf.strided_slice(input, [1, -1, 0], [2, -3, 3], [1, -1, 1]) ==>[[[4, 4, 4],
+ [3, 3, 3]]]
```
Args:
diff --git a/tensorflow/python/ops/control_flow_ops.py b/tensorflow/python/ops/control_flow_ops.py
index 2f308b170b..243c4ed033 100644
--- a/tensorflow/python/ops/control_flow_ops.py
+++ b/tensorflow/python/ops/control_flow_ops.py
@@ -2572,35 +2572,35 @@ def while_loop(cond, body, loop_vars, shape_invariants=None,
Example:
- ```python
- i = tf.constant(0)
- c = lambda i: tf.less(i, 10)
- b = lambda i: tf.add(i, 1)
- r = tf.while_loop(c, b, [i])
- ```
+ ```python
+ i = tf.constant(0)
+ c = lambda i: tf.less(i, 10)
+ b = lambda i: tf.add(i, 1)
+ r = tf.while_loop(c, b, [i])
+ ```
Example with nesting and a namedtuple:
- ```python
- import collections
- Pair = collections.namedtuple('Pair', 'j, k')
- ijk_0 = (tf.constant(0), Pair(tf.constant(1), tf.constant(2)))
- c = lambda i, p: i < 10
- b = lambda i, p: (i + 1, Pair((p.j + p.k), (p.j - p.k)))
- ijk_final = tf.while_loop(c, b, ijk_0)
- ```
+ ```python
+ import collections
+ Pair = collections.namedtuple('Pair', 'j, k')
+ ijk_0 = (tf.constant(0), Pair(tf.constant(1), tf.constant(2)))
+ c = lambda i, p: i < 10
+ b = lambda i, p: (i + 1, Pair((p.j + p.k), (p.j - p.k)))
+ ijk_final = tf.while_loop(c, b, ijk_0)
+ ```
Example using shape_invariants:
- ```python
- i0 = tf.constant(0)
- m0 = tf.ones([2, 2])
- c = lambda i, m: i < 10
- b = lambda i, m: [i+1, tf.concat([m, m], axis=0)]
- tf.while_loop(
- c, b, loop_vars=[i0, m0],
- shape_invariants=[i0.get_shape(), tf.TensorShape([None, 2])])
- ```
+ ```python
+ i0 = tf.constant(0)
+ m0 = tf.ones([2, 2])
+ c = lambda i, m: i < 10
+ b = lambda i, m: [i+1, tf.concat([m, m], axis=0)]
+ tf.while_loop(
+ c, b, loop_vars=[i0, m0],
+ shape_invariants=[i0.get_shape(), tf.TensorShape([None, 2])])
+ ```
"""
with ops.name_scope(name, "while", loop_vars) as name:
diff --git a/tensorflow/python/ops/variables.py b/tensorflow/python/ops/variables.py
index dc73ad78a7..5a1a43b5d5 100644
--- a/tensorflow/python/ops/variables.py
+++ b/tensorflow/python/ops/variables.py
@@ -196,8 +196,9 @@ class Variable(object):
dtype=dtype,
expected_shape=expected_shape)
- def __str__(self):
- return str(self._snapshot)
+ def __repr__(self):
+ return "<tf.Variable '%s' shape=%s dtype=%s>" % (
+ self.name, self.get_shape(), self.dtype.name)
def _init_from_args(self,
initial_value=None,
diff --git a/tensorflow/python/training/supervisor.py b/tensorflow/python/training/supervisor.py
index 7b93391911..884c1b6182 100644
--- a/tensorflow/python/training/supervisor.py
+++ b/tensorflow/python/training/supervisor.py
@@ -1027,7 +1027,7 @@ class SVStepCounterThread(coordinator.LooperThread):
elapsed_time = current_time - self._last_time
self._last_time = current_time
# Reports the number of steps done per second
- steps_per_sec = added_steps / elapsed_time
+ steps_per_sec = added_steps / elapsed_time if elapsed_time != 0. else float("inf")
summary = Summary(value=[Summary.Value(tag=self._summary_tag,
simple_value=steps_per_sec)])
if self._sv.summary_writer:
diff --git a/tensorflow/python/training/sync_replicas_optimizer_test.py b/tensorflow/python/training/sync_replicas_optimizer_test.py
index 32cae70460..15f938df8c 100644
--- a/tensorflow/python/training/sync_replicas_optimizer_test.py
+++ b/tensorflow/python/training/sync_replicas_optimizer_test.py
@@ -267,6 +267,7 @@ class SyncReplicasOptimizerTest(test.TestCase):
# Starts worker 1.
thread_1.start()
thread_1.join()
+ thread_0.join()
# The global step should now be 2 and the gradients should have been
# applied again.
diff --git a/tensorflow/stream_executor/BUILD b/tensorflow/stream_executor/BUILD
index 651f7a3949..00faccced6 100644
--- a/tensorflow/stream_executor/BUILD
+++ b/tensorflow/stream_executor/BUILD
@@ -24,9 +24,10 @@ cc_library(
"lib/gtl/*.h",
"platform/**/*.h",
]),
- linkopts = [
- "-ldl",
- ],
+ linkopts = select({
+ "//tensorflow:freebsd": [],
+ "//conditions:default": ["-ldl"],
+ }),
visibility = ["//visibility:public"],
deps = [
"//tensorflow/core:lib",
@@ -45,9 +46,10 @@ cc_library(
exclude = ["cuda/cuda_platform_id.cc"],
),
),
- linkopts = [
- "-ldl",
- ],
+ linkopts = select({
+ "//tensorflow:freebsd": [],
+ "//conditions:default": ["-ldl"],
+ }),
visibility = ["//visibility:public"],
deps = [
":stream_executor",
diff --git a/tensorflow/stream_executor/cuda/cuda_dnn.cc b/tensorflow/stream_executor/cuda/cuda_dnn.cc
index 1095d08191..eff0b22dfe 100644
--- a/tensorflow/stream_executor/cuda/cuda_dnn.cc
+++ b/tensorflow/stream_executor/cuda/cuda_dnn.cc
@@ -922,7 +922,7 @@ class CudnnRnnParamsDescriptor : public CudnnDescriptorCommon<void> {
const CudnnRnnDescriptor& rnn_desc);
~CudnnRnnParamsDescriptor() {
cudnnStatus_t status = wrap::cudnnDestroyFilterDescriptor(parent_, handle_);
- CUDNN_RETURN_IF_FAIL(status, "Failed to destroy RNN filter desciptor");
+ CUDNN_RETURN_IF_FAIL(status, "Failed to destroy RNN filter descriptor");
}
cudnnFilterDescriptor_t handle() const {
if (!ok()) return nullptr;
@@ -1202,7 +1202,7 @@ class CudnnRnnSequenceTensorDescriptor
// Only the first one needs to be destroyed. All others are the same.
cudnnStatus_t status =
wrap::cudnnDestroyTensorDescriptor(parent_, handles_[0]);
- CUDNN_RETURN_IF_FAIL(status, "Failed to destroy sequence tensor desciptor");
+ CUDNN_RETURN_IF_FAIL(status, "Failed to destroy sequence tensor descriptor");
}
const cudnnTensorDescriptor_t* handles() const {
diff --git a/tensorflow/stream_executor/dso_loader.cc b/tensorflow/stream_executor/dso_loader.cc
index db1f8d9ba9..5210a81092 100644
--- a/tensorflow/stream_executor/dso_loader.cc
+++ b/tensorflow/stream_executor/dso_loader.cc
@@ -123,9 +123,13 @@ static mutex& GetRpathMutex() {
port::Status s =
port::Env::Default()->LoadLibrary(path_string.c_str(), dso_handle);
if (!s.ok()) {
+#if !defined(PLATFORM_WINDOWS)
+ char* ld_library_path = getenv("LD_LIBRARY_PATH");
+#endif
LOG(INFO) << "Couldn't open CUDA library " << path
#if !defined(PLATFORM_WINDOWS)
- << ". LD_LIBRARY_PATH: " << getenv("LD_LIBRARY_PATH")
+ << ". LD_LIBRARY_PATH: "
+ << (ld_library_path != nullptr ? ld_library_path : "")
#endif
;
return port::Status(port::error::FAILED_PRECONDITION,
diff --git a/tensorflow/stream_executor/rng.cc b/tensorflow/stream_executor/rng.cc
index 08f91584bf..1c05005067 100644
--- a/tensorflow/stream_executor/rng.cc
+++ b/tensorflow/stream_executor/rng.cc
@@ -41,7 +41,7 @@ bool RngSupport::CheckSeed(const uint8 *seed, uint64 seed_bytes) {
return true;
}
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
const int RngSupport::kMinSeedBytes;
const int RngSupport::kMaxSeedBytes;
#endif
diff --git a/tensorflow/tensorboard/README.md b/tensorflow/tensorboard/README.md
index fa0a245b41..b9addd4b68 100644
--- a/tensorflow/tensorboard/README.md
+++ b/tensorflow/tensorboard/README.md
@@ -16,7 +16,7 @@ Before running TensorBoard, make sure you have generated summary data in a log
directory by creating a summary writer:
``` python
-# sess.graph_def is the graph definition; that enables the Graph Visualizer.
+# sess.graph contains the graph definition; that enables the Graph Visualizer.
file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph)
```
diff --git a/tensorflow/tensorboard/backend/BUILD b/tensorflow/tensorboard/backend/BUILD
index 11128ab941..1c318055ed 100644
--- a/tensorflow/tensorboard/backend/BUILD
+++ b/tensorflow/tensorboard/backend/BUILD
@@ -26,7 +26,7 @@ py_library(
py_test(
name = "application_test",
- size = "small",
+ size = "medium",
srcs = ["application_test.py"],
srcs_version = "PY2AND3",
deps = [
diff --git a/tensorflow/tensorboard/bower/BUILD b/tensorflow/tensorboard/bower/BUILD
index 22a9d8187b..2c2921d988 100644
--- a/tensorflow/tensorboard/bower/BUILD
+++ b/tensorflow/tensorboard/bower/BUILD
@@ -65,7 +65,7 @@ filegroup(
"@paper_toolbar//:paper_toolbar",
"@paper_tooltip//:paper_tooltip",
"@plottable//:plottable",
- "@polymer_archive//:polymer",
+ "@polymer//:polymer",
"@promise_polyfill//:promise_polyfill",
"@three_js_orbitcontrols_js//file",
"@three_js_three_min_js//file",
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl
index 31a2ee65f9..33c4ff5c3d 100644
--- a/tensorflow/tensorflow.bzl
+++ b/tensorflow/tensorflow.bzl
@@ -110,8 +110,9 @@ def tf_copts():
"-Wno-sign-compare",
"-fno-exceptions",] +
if_cuda(["-DGOOGLE_CUDA=1"]) +
+ if_mkl(["-DINTEL_MKL=1"]) +
if_android_arm(["-mfpu=neon"]) +
- if_x86(["-msse4.1"]) +
+ if_x86(["-msse3"]) +
select({
"//tensorflow:android": [
"-std=c++11",
@@ -481,7 +482,7 @@ def tf_cuda_library(deps=None, cuda_deps=None, copts=None, **kwargs):
"//tensorflow/core:cuda",
"@local_config_cuda//cuda:cuda_headers"
]),
- copts = copts + if_cuda(["-DGOOGLE_CUDA=1"]),
+ copts = copts + if_cuda(["-DGOOGLE_CUDA=1"]) + if_mkl(["-DINTEL_MKL=1"]),
**kwargs)
def tf_kernel_library(name, prefix=None, srcs=None, gpu_srcs=None, hdrs=None,
diff --git a/tensorflow/tools/ci_build/Dockerfile.android b/tensorflow/tools/ci_build/Dockerfile.android
index 9a482be786..031f8e8255 100644
--- a/tensorflow/tools/ci_build/Dockerfile.android
+++ b/tensorflow/tools/ci_build/Dockerfile.android
@@ -44,14 +44,13 @@ RUN cd ${ANDROID_DEV_HOME} && \
echo y | android update sdk --no-ui -a --filter tools,platform-tools,android-${ANDROID_API_LEVEL},build-tools-${ANDROID_BUILD_TOOLS_VERSION}
# Install Android NDK.
-ENV ANDROID_NDK_FILENAME android-ndk-r10e-linux-x86_64.bin
-ENV ANDROID_NDK_URL http://dl.google.com/android/ndk/${ANDROID_NDK_FILENAME}
+ENV ANDROID_NDK_FILENAME android-ndk-r12b-linux-x86_64.zip
+ENV ANDROID_NDK_URL https://dl.google.com/android/repository/${ANDROID_NDK_FILENAME}
ENV ANDROID_NDK_HOME ${ANDROID_DEV_HOME}/ndk
ENV PATH ${PATH}:${ANDROID_NDK_HOME}
RUN cd ${ANDROID_DEV_HOME} && \
wget -q ${ANDROID_NDK_URL} && \
- chmod +x ${ANDROID_NDK_FILENAME} && \
- ./${ANDROID_NDK_FILENAME} -o${ANDROID_DEV_HOME} && \
+ unzip ${ANDROID_NDK_FILENAME} -d ${ANDROID_DEV_HOME} && \
rm ${ANDROID_NDK_FILENAME} && \
bash -c "ln -s ${ANDROID_DEV_HOME}/android-ndk-* ${ANDROID_NDK_HOME}"
diff --git a/tensorflow/tools/compatibility/README.md b/tensorflow/tools/compatibility/README.md
index 77e27531a9..9dba070a4f 100644
--- a/tensorflow/tools/compatibility/README.md
+++ b/tensorflow/tools/compatibility/README.md
@@ -11,7 +11,7 @@ It will print a list of errors it finds that it can't fix. You can also run
it on a directory tree:
```
-tf_upgrade.py --intree coolcode -outtree coolcode-upgraded
+tf_upgrade.py --intree coolcode --outtree coolcode-upgraded
```
In either case, it will also dump out a report e.g. which will detail changes
@@ -32,8 +32,8 @@ Renamed keyword argument from `squeeze_dims` to `axis`
## Caveats
- Don't update parts of your code manually before running this script. In
-particular, functions that have had reordered arguments like `tf.concat`,
-`tf.split` will cause the script to incorrectly add keyword arguments that
+particular, functions that have had reordered arguments like `tf.concat`
+or `tf.split` will cause the script to incorrectly add keyword arguments that
mismap arguments.
- This script wouldn't actually reorder arguments. Instead, the script will add
diff --git a/tensorflow/tools/dist_test/server/Dockerfile b/tensorflow/tools/dist_test/server/Dockerfile
index 4b13b814e3..fabc8a7105 100644
--- a/tensorflow/tools/dist_test/server/Dockerfile
+++ b/tensorflow/tools/dist_test/server/Dockerfile
@@ -17,7 +17,7 @@
#
# To build the image, use ../build_server.sh
-FROM ubuntu:14.04
+FROM ubuntu:16.04
MAINTAINER Shanqing Cai <cais@google.com>
diff --git a/tensorflow/tools/dist_test/server/Dockerfile.test b/tensorflow/tools/dist_test/server/Dockerfile.test
index e2feb2227b..3cd3d5206d 100644
--- a/tensorflow/tools/dist_test/server/Dockerfile.test
+++ b/tensorflow/tools/dist_test/server/Dockerfile.test
@@ -17,7 +17,7 @@
#
# To build the image, use ../build_server.sh --test
-FROM ubuntu:14.04
+FROM ubuntu:16.04
MAINTAINER Shanqing Cai <cais@google.com>
diff --git a/tensorflow/tools/docker/Dockerfile b/tensorflow/tools/docker/Dockerfile
index 4f00696be5..b61eb5db37 100644
--- a/tensorflow/tools/docker/Dockerfile
+++ b/tensorflow/tools/docker/Dockerfile
@@ -1,4 +1,4 @@
-FROM ubuntu:14.04
+FROM ubuntu:16.04
MAINTAINER Craig Citro <craigcitro@google.com>
diff --git a/tensorflow/tools/docker/Dockerfile.devel b/tensorflow/tools/docker/Dockerfile.devel
index 8cd6ee6f33..edcb75c0e0 100644
--- a/tensorflow/tools/docker/Dockerfile.devel
+++ b/tensorflow/tools/docker/Dockerfile.devel
@@ -1,4 +1,4 @@
-FROM ubuntu:14.04
+FROM ubuntu:16.04
MAINTAINER Craig Citro <craigcitro@google.com>
diff --git a/tensorflow/tools/docker/Dockerfile.devel-gpu b/tensorflow/tools/docker/Dockerfile.devel-gpu
index a3ccf91917..48e3730969 100644
--- a/tensorflow/tools/docker/Dockerfile.devel-gpu
+++ b/tensorflow/tools/docker/Dockerfile.devel-gpu
@@ -1,4 +1,4 @@
-FROM nvidia/cuda:8.0-cudnn5-devel
+FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04
MAINTAINER Craig Citro <craigcitro@google.com>
diff --git a/tensorflow/tools/docker/Dockerfile.gpu b/tensorflow/tools/docker/Dockerfile.gpu
index 77113c1d82..b2b39501cd 100644
--- a/tensorflow/tools/docker/Dockerfile.gpu
+++ b/tensorflow/tools/docker/Dockerfile.gpu
@@ -1,4 +1,4 @@
-FROM nvidia/cuda:8.0-cudnn5-devel
+FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04
MAINTAINER Craig Citro <craigcitro@google.com>
diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py
index 893afb1b48..b07915aaf5 100644
--- a/tensorflow/tools/pip_package/setup.py
+++ b/tensorflow/tools/pip_package/setup.py
@@ -29,7 +29,7 @@ from setuptools.dist import Distribution
# This version string is semver compatible, but incompatible with pip.
# For pip, we will remove all '-' characters from this string, and use the
# result for pip.
-_VERSION = '1.0.0-rc1'
+_VERSION = '1.0.0-rc2'
REQUIRED_PACKAGES = [
'numpy >= 1.11.0',
diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
index 38620aa3d1..8a96541f81 100644
--- a/tensorflow/workspace.bzl
+++ b/tensorflow/workspace.bzl
@@ -36,11 +36,17 @@ def check_version(bazel_version):
native.bazel_version, bazel_version))
pass
+def _repos_are_siblings():
+ return Label("@foo//bar").workspace_root.startswith("../")
+
# Temporary workaround to support including TensorFlow as a submodule until this
# use-case is supported in the next Bazel release.
def _temp_workaround_http_archive_impl(repo_ctx):
repo_ctx.template("BUILD", repo_ctx.attr.build_file,
- {"%ws%": repo_ctx.attr.repository}, False)
+ {
+ "%prefix%" : ".." if _repos_are_siblings() else "external",
+ "%ws%": repo_ctx.attr.repository
+ }, False)
repo_ctx.download_and_extract(repo_ctx.attr.urls, "", repo_ctx.attr.sha256,
"", repo_ctx.attr.strip_prefix)
@@ -214,11 +220,11 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
native.http_archive(
name = "protobuf",
urls = [
- "http://bazel-mirror.storage.googleapis.com/github.com/google/protobuf/archive/008b5a228b37c054f46ba478ccafa5e855cb16db.tar.gz",
- "https://github.com/google/protobuf/archive/008b5a228b37c054f46ba478ccafa5e855cb16db.tar.gz",
+ "http://bazel-mirror.storage.googleapis.com/github.com/google/protobuf/archive/ef927cc428db7bf41d3a593a16a8f1a0fe6306c5.tar.gz",
+ "https://github.com/google/protobuf/archive/ef927cc428db7bf41d3a593a16a8f1a0fe6306c5.tar.gz",
],
- sha256 = "2737ad055eb8a9bc63ed068e32c4ea280b62d8236578cb4d4120eb5543f759ab",
- strip_prefix = "protobuf-008b5a228b37c054f46ba478ccafa5e855cb16db",
+ sha256 = "8813a4ab27f7c61565d0db17d69236b4ec0b1404371efc728f15079b85e457ca",
+ strip_prefix = "protobuf-ef927cc428db7bf41d3a593a16a8f1a0fe6306c5",
)
native.new_http_archive(
@@ -270,7 +276,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
build_file = str(Label("//third_party:swig.BUILD")),
)
- native.new_http_archive(
+ temp_workaround_http_archive(
name = "curl",
sha256 = "ff3e80c1ca6a068428726cd7dd19037a47cc538ce58ef61c59587191039b2ca6",
urls = [
@@ -401,9 +407,9 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
native.new_http_archive(
name = "nccl_archive",
- url = "https://github.com/NVIDIA/nccl/archive/2a974f5ca2aa12b178046b2206b43f1fd69d9fae.tar.gz",
- sha256 = "d6aa1a3f20ae85358890d9a96f49c51a75baa1d3af3598501f29ff9ef8a3107d",
- strip_prefix = "nccl-2a974f5ca2aa12b178046b2206b43f1fd69d9fae",
+ url = "https://github.com/nvidia/nccl/archive/024d1e267845f2ed06f3e2e42476d50f04a00ee6.tar.gz",
+ sha256 = "6787f0eed88d52ee8e32956fa4947d92c139da469f1d8e311c307f27d641118e",
+ strip_prefix = "nccl-024d1e267845f2ed06f3e2e42476d50f04a00ee6",
build_file = str(Label("//third_party:nccl.BUILD")),
)
diff --git a/third_party/curl.BUILD b/third_party/curl.BUILD
index c1c0f69dc0..dde8e6cdb7 100644
--- a/third_party/curl.BUILD
+++ b/third_party/curl.BUILD
@@ -232,7 +232,7 @@ cc_library(
],
copts = select({
":windows": [
- "/Iexternal/curl/lib",
+ "/I%prefix%/curl/lib",
"/DHAVE_CONFIG_H",
"/DCURL_DISABLE_FTP",
"/DCURL_DISABLE_NTLM",
@@ -245,7 +245,7 @@ cc_library(
"/D_USING_V110_SDK71_",
],
"//conditions:default": [
- "-Iexternal/curl/lib",
+ "-I%prefix%/curl/lib",
"-D_GNU_SOURCE",
"-DHAVE_CONFIG_H",
"-DCURL_DISABLE_FTP",
@@ -387,12 +387,12 @@ cc_binary(
],
copts = select({
":windows": [
- "/Iexternal/curl/lib",
+ "/I%prefix%/curl/lib",
"/DHAVE_CONFIG_H",
"/DCURL_DISABLE_LIBCURL_OPTION",
],
"//conditions:default": [
- "-Iexternal/curl/lib",
+ "-I%prefix%/curl/lib",
"-D_GNU_SOURCE",
"-DHAVE_CONFIG_H",
"-DCURL_DISABLE_LIBCURL_OPTION",
diff --git a/third_party/eigen3/BUILD b/third_party/eigen3/BUILD
index 19d7a71639..f38a26717e 100644
--- a/third_party/eigen3/BUILD
+++ b/third_party/eigen3/BUILD
@@ -11,6 +11,10 @@ licenses([
exports_files(["LICENSE"])
+# INTEL_MKL start
+load("//tensorflow:tensorflow.bzl", "if_mkl")
+
+# INTEL_MKL end
load("//tensorflow:tensorflow.bzl", "if_mkl")
cc_library(
diff --git a/third_party/gpus/cuda/BUILD.tpl b/third_party/gpus/cuda/BUILD.tpl
index 8754105619..e101f9fbd8 100644
--- a/third_party/gpus/cuda/BUILD.tpl
+++ b/third_party/gpus/cuda/BUILD.tpl
@@ -33,6 +33,12 @@ config_setting(
visibility = ["//visibility:public"],
)
+config_setting(
+ name = "freebsd",
+ values = {"cpu": "freebsd"},
+ visibility = ["//visibility:public"],
+)
+
cc_library(
name = "cuda_headers",
hdrs = glob([
@@ -49,8 +55,10 @@ cc_library(
name = "cudart_static",
srcs = ["lib/%{cudart_static_lib}"],
includes = ["include/"],
- linkopts = [
- "-ldl",
+ linkopts = select({
+ ":freebsd": [],
+ "//conditions:default": ["-ldl"],
+ }) + [
"-lpthread",
%{cudart_static_linkopt}
],
diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl
index 15e1dfc521..01e070f2be 100644
--- a/third_party/gpus/cuda_configure.bzl
+++ b/third_party/gpus/cuda_configure.bzl
@@ -368,7 +368,7 @@ def _lib_name(lib, cpu_value, version="", static=False):
Returns:
The platform-specific name of the library.
"""
- if cpu_value == "Linux":
+ if cpu_value in ("Linux", "FreeBSD"):
if static:
return "lib%s.a" % lib
else:
diff --git a/third_party/mkl/build_defs.bzl b/third_party/mkl/build_defs.bzl
index e094f2fef7..9a28b312c2 100644
--- a/third_party/mkl/build_defs.bzl
+++ b/third_party/mkl/build_defs.bzl
@@ -2,8 +2,10 @@
def if_mkl(if_true, if_false = []):
"""Shorthand for select()'ing on whether we're building with MKL.
+
Returns a select statement which evaluates to if_true if we're building
with MKL enabled. Otherwise, the select statement evaluates to if_false.
+
"""
return select({
"//third_party/mkl:using_mkl": if_true,
diff --git a/third_party/sycl/crosstool/computecpp.tpl b/third_party/sycl/crosstool/computecpp.tpl
index 532d7779f9..a5e6b9fe93 100755
--- a/third_party/sycl/crosstool/computecpp.tpl
+++ b/third_party/sycl/crosstool/computecpp.tpl
@@ -43,9 +43,9 @@ def main():
bc_out = filename + '.sycl'
# strip asan for the device
- computecpp_device_compiler_flags = [flag for flag in compiler_flags if not flag.startswith(('-fsanitize'))]
computecpp_device_compiler_flags = ['-sycl-compress-name', '-DTENSORFLOW_USE_SYCL', '-Wno-unused-variable', '-I', COMPUTECPP_INCLUDE, '-isystem',
- COMPUTECPP_INCLUDE, '-std=c++11', '-sycl', '-emit-llvm', '-no-serial-memop', '-Xclang', '-cl-denorms-are-zero', '-Xclang', '-cl-fp32-correctly-rounded-divide-sqrt'] + computecpp_device_compiler_flags
+ COMPUTECPP_INCLUDE, '-std=c++11', '-sycl', '-emit-llvm', '-no-serial-memop', '-Xclang', '-cl-denorms-are-zero', '-Xclang', '-cl-fp32-correctly-rounded-divide-sqrt']
+ computecpp_device_compiler_flags += [flag for flag in compiler_flags if not flag.startswith(('-fsanitize'))]
x = subprocess.call([COMPUTECPP_DRIVER] + computecpp_device_compiler_flags )
if(x == 0):