Skip to content

Commit 3269423

Browse files
caisqtensorflower-gardener
authored andcommitted
Merge changes from github.
Change: 153925676
1 parent 3c0900a commit 3269423

File tree

115 files changed

+7578
-2236
lines changed

Some content is hidden

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

115 files changed

+7578
-2236
lines changed

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ and discussion.**
3434

3535
People who are a little more adventurous can also try our nightly binaries:
3636

37-
* 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.1.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.1.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.1.0rc1-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/))
38-
* 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.1.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.1.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.1.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/))
39-
* 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.1.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.1.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/))
40-
* 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.1.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.1.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/))
41-
* Windows CPU-only: [Python 3.5 64-bit](https://ci.tensorflow.org/view/Nightly/job/nightly-win/DEVICE=cpu,OS=windows/lastSuccessfulBuild/artifact/cmake_build/tf_python/dist/tensorflow-1.1.0rc1-cp35-cp35m-win_amd64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-win/DEVICE=cpu,OS=windows/))
42-
* Windows GPU: [Python 3.5 64-bit](https://ci.tensorflow.org/view/Nightly/job/nightly-win/DEVICE=gpu,OS=windows/lastSuccessfulBuild/artifact/cmake_build/tf_python/dist/tensorflow_gpu-1.1.0rc1-cp35-cp35m-win_amd64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-win/DEVICE=gpu,OS=windows/))
37+
38+
* 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.1.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.1.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.1.0rc2-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/))
39+
* 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.1.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.1.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.1.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/))
40+
* 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.1.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.1.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/))
41+
* 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.1.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.1.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/))
42+
* Windows CPU-only: [Python 3.5 64-bit](https://ci.tensorflow.org/view/Nightly/job/nightly-win/DEVICE=cpu,OS=windows/lastSuccessfulBuild/artifact/cmake_build/tf_python/dist/tensorflow-1.1.0rc2-cp35-cp35m-win_amd64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-win/DEVICE=cpu,OS=windows/))
43+
* Windows GPU: [Python 3.5 64-bit](https://ci.tensorflow.org/view/Nightly/job/nightly-win/DEVICE=gpu,OS=windows/lastSuccessfulBuild/artifact/cmake_build/tf_python/dist/tensorflow_gpu-1.1.0rc2-cp35-cp35m-win_amd64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-win/DEVICE=gpu,OS=windows/))
4344
* 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/)
4445
([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-android/))
4546

@@ -62,7 +63,7 @@ $ python
6263

6364
## For more information
6465

65-
* [TensorFlow website](http://tensorflow.org)
66+
* [TensorFlow website](https://tensorflow.org)
6667
* [TensorFlow whitepaper](http://download.tensorflow.org/paper/whitepaper2015.pdf)
6768
* [TensorFlow Model Zoo](https://github.com/tensorflow/models)
6869
* [TensorFlow MOOC on Udacity](https://www.udacity.com/course/deep-learning--ud730)

RELEASE.md

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
* New navigation bar in Curses-based UI
3737
* NodeStepper (command `invoke_stepper`) now uses intermediate tensor dumps. It also uses `TensorHandles` as direct feeds during successive `cont` calls for improved performance and reduced memory consumption.
3838
* Initial release of installation guides for Java, C, and Go.
39+
* Added Text Dashboard to TensorBoard.
3940

4041
## Deprecations
4142

@@ -91,6 +92,8 @@
9192
* Command history now persists across runs.
9293
* Bug fix in graph validation related to `tf.while_loops`.
9394
* Java Maven fixes for bugs with Windows installation.
95+
* Backport fixes and improvements from external keras.
96+
* Keras config file handling fix.
9497

9598
## Thanks to our Contributors
9699

configure

+20-2
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ write_action_env_to_bazelrc "PYTHON_BIN_PATH" "$PYTHON_BIN_PATH"
9494
if false; then # Disable building with MKL for now
9595
while [ "$TF_NEED_MKL" == "" ]; do
9696
fromuser=""
97-
read -p "Do you wish to build TensorFlow with MKL support? [y/N] " INPUT
97+
read -p "Do you wish to build TensorFlow with MKL support (experimental)? [y/N] " INPUT
9898
fromuser="1"
9999
case $INPUT in
100-
[Yy]* ) echo "MKL support will be enabled for TensorFlow"; TF_NEED_MKL=1;;
100+
[Yy]* ) echo "MKL support (experimental) (will be enabled for TensorFlow"; TF_NEED_MKL=1;;
101101
[Nn]* ) echo "No MKL support will be enabled for TensorFlow"; TF_NEED_MKL=0;;
102102
"" ) echo "No MKL support will be enabled for TensorFlow"; TF_NEED_MKL=0;;
103103
* ) echo "Invalid selection: " $INPUT;;
@@ -244,6 +244,24 @@ if [[ "$TF_ENABLE_XLA" == "1" ]]; then
244244
write_to_bazelrc 'build --define with_xla_support=true'
245245
fi
246246

247+
# Verbs configuration
248+
while [ "$TF_NEED_VERBS" == "" ]; do
249+
read -p "Do you wish to build TensorFlow with "\
250+
"VERBS support? [y/N] " INPUT
251+
case $INPUT in
252+
[Yy]* ) echo "VERBS support will be enabled for "\
253+
"TensorFlow"; TF_NEED_VERBS=1;;
254+
[Nn]* ) echo "No VERBS support will be enabled for "\
255+
"TensorFlow"; TF_NEED_VERBS=0;;
256+
"" ) echo "No VERBS support will be enabled for "\
257+
"TensorFlow"; TF_NEED_VERBS=0;;
258+
* ) echo "Invalid selection: " $INPUT;;
259+
esac
260+
done
261+
262+
if [[ "$TF_NEED_VERBS" == "1" ]]; then
263+
write_to_bazelrc 'build --define with_verbs_support=true'
264+
fi
247265

248266
# Invoke python_config and set up symlinks to python includes
249267
./util/python/python_config.sh "$PYTHON_BIN_PATH"

tensorflow/BUILD

+23-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ config_setting(
8484
visibility = ["//visibility:public"],
8585
)
8686

87+
config_setting(
88+
name = "linux_ppc64le",
89+
values = {"cpu": "ppc"},
90+
visibility = ["//visibility:public"],
91+
)
92+
8793
config_setting(
8894
name = "debug",
8995
values = {
@@ -108,14 +114,23 @@ config_setting(
108114

109115
# TODO(jhseu): Enable on other platforms other than Linux.
110116
config_setting(
111-
name = "with_jemalloc",
117+
name = "with_jemalloc_linux_x86_64",
112118
values = {
113119
"cpu": "k8",
114120
"define": "with_jemalloc=true",
115121
},
116122
visibility = ["//visibility:public"],
117123
)
118124

125+
config_setting(
126+
name = "with_jemalloc_linux_ppc64le",
127+
values = {
128+
"cpu": "ppc",
129+
"define": "with_jemalloc=true",
130+
},
131+
visibility = ["//visibility:public"],
132+
)
133+
119134
config_setting(
120135
name = "with_gcp_support",
121136
values = {"define": "with_gcp_support=true"},
@@ -134,6 +149,12 @@ config_setting(
134149
visibility = ["//visibility:public"],
135150
)
136151

152+
config_setting(
153+
name = "with_verbs_support",
154+
values = {"define": "with_verbs_support=true"},
155+
visibility = ["//visibility:public"],
156+
)
157+
137158
package_group(
138159
name = "internal",
139160
packages = ["//tensorflow/..."],
@@ -249,6 +270,7 @@ filegroup(
249270
"//tensorflow/contrib/tfprof/python/tools/tfprof:all_files",
250271
"//tensorflow/contrib/training:all_files",
251272
"//tensorflow/contrib/util:all_files",
273+
"//tensorflow/contrib/verbs:all_files",
252274
"//tensorflow/contrib/xla_tf_graph:all_files",
253275
"//tensorflow/core:all_files",
254276
"//tensorflow/core/debug:all_files",

tensorflow/compiler/aot/tfcompile.bzl

+1
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,6 @@ def target_llvm_triple():
282282
"//tensorflow:android_arm": "armv7-none-android",
283283
"//tensorflow:android_arm64": "aarch64-none-android",
284284
"//tensorflow:android_x86": "i686-none-android",
285+
"//tensorflow:linux_ppc64le": "ppc64le-ibm-linux-gnu",
285286
"//conditions:default": "x86_64-pc-linux",
286287
})

tensorflow/contrib/ffmpeg/default/ffmpeg_lib.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ template <typename UInt>
142142
string LittleEndianData(UInt data) {
143143
static_assert(std::is_unsigned<UInt>::value, "UInt must be unsigned");
144144
string str;
145-
for (int i = 0; i < sizeof(UInt); ++i) {
145+
for (size_t i = 0; i < sizeof(UInt); ++i) {
146146
const unsigned char bits = static_cast<unsigned char>(data & 0xFFU);
147147
char ch;
148148
::memcpy(&ch, &bits, sizeof(bits));

tensorflow/contrib/learn/python/learn/datasets/mnist.py

+21-10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
from tensorflow.contrib.learn.python.learn.datasets import base
2828
from tensorflow.python.framework import dtypes
29+
from tensorflow.python.framework import random_seed
2930

3031
# CVDF mirror of http://yann.lecun.com/exdb/mnist/
3132
SOURCE_URL = 'https://storage.googleapis.com/cvdf-datasets/mnist/'
@@ -109,12 +110,16 @@ def __init__(self,
109110
fake_data=False,
110111
one_hot=False,
111112
dtype=dtypes.float32,
112-
reshape=True):
113+
reshape=True,
114+
seed=None):
113115
"""Construct a DataSet.
114116
one_hot arg is used only if fake_data is true. `dtype` can be either
115117
`uint8` to leave the input as `[0, 255]`, or `float32` to rescale into
116-
`[0, 1]`.
118+
`[0, 1]`. Seed arg provides for convenient deterministic testing.
117119
"""
120+
seed1, seed2 = random_seed.get_seed(seed)
121+
# If op level seed is not set, use whatever graph level seed is returned
122+
numpy.random.seed(seed1 if seed is None else seed2)
118123
dtype = dtypes.as_dtype(dtype).base_dtype
119124
if dtype not in (dtypes.uint8, dtypes.float32):
120125
raise TypeError('Invalid image dtype %r, expected uint8 or float32' %
@@ -208,11 +213,13 @@ def read_data_sets(train_dir,
208213
one_hot=False,
209214
dtype=dtypes.float32,
210215
reshape=True,
211-
validation_size=5000):
216+
validation_size=5000,
217+
seed=None):
212218
if fake_data:
213219

214220
def fake():
215-
return DataSet([], [], fake_data=True, one_hot=one_hot, dtype=dtype)
221+
return DataSet(
222+
[], [], fake_data=True, one_hot=one_hot, dtype=dtype, seed=seed)
216223

217224
train = fake()
218225
validation = fake()
@@ -254,12 +261,16 @@ def fake():
254261
train_images = train_images[validation_size:]
255262
train_labels = train_labels[validation_size:]
256263

257-
train = DataSet(train_images, train_labels, dtype=dtype, reshape=reshape)
258-
validation = DataSet(validation_images,
259-
validation_labels,
260-
dtype=dtype,
261-
reshape=reshape)
262-
test = DataSet(test_images, test_labels, dtype=dtype, reshape=reshape)
264+
train = DataSet(
265+
train_images, train_labels, dtype=dtype, reshape=reshape, seed=seed)
266+
validation = DataSet(
267+
validation_images,
268+
validation_labels,
269+
dtype=dtype,
270+
reshape=reshape,
271+
seed=seed)
272+
test = DataSet(
273+
test_images, test_labels, dtype=dtype, reshape=reshape, seed=seed)
263274

264275
return base.Datasets(train=train, validation=validation, test=test)
265276

tensorflow/contrib/learn/python/learn/estimators/estimator_test.py

-14
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
from tensorflow.python.ops import array_ops
5353
from tensorflow.python.ops import check_ops
5454
from tensorflow.python.ops import control_flow_ops
55-
from tensorflow.python.ops import data_flow_ops
5655
from tensorflow.python.ops import math_ops
5756
from tensorflow.python.ops import parsing_ops
5857
from tensorflow.python.ops import variables as variables_lib
@@ -63,7 +62,6 @@
6362
from tensorflow.python.training import basic_session_run_hooks
6463
from tensorflow.python.training import input as input_lib
6564
from tensorflow.python.training import monitored_session
66-
from tensorflow.python.training import queue_runner_impl
6765
from tensorflow.python.training import saver as saver_lib
6866
from tensorflow.python.training import session_run_hook
6967
from tensorflow.python.util import compat
@@ -82,18 +80,6 @@ def boston_input_fn(num_epochs=None):
8280
return features, labels
8381

8482

85-
def boston_input_fn_with_queue(num_epochs=None):
86-
features, labels = boston_input_fn(num_epochs=num_epochs)
87-
88-
# Create a minimal queue runner.
89-
fake_queue = data_flow_ops.FIFOQueue(30, dtypes.int32)
90-
queue_runner = queue_runner_impl.QueueRunner(fake_queue,
91-
[constant_op.constant(0)])
92-
queue_runner_impl.add_queue_runner(queue_runner)
93-
94-
return features, labels
95-
96-
9783
def iris_input_fn():
9884
iris = base.load_iris()
9985
features = array_ops.reshape(

tensorflow/contrib/makefile/compile_linux_protobuf.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ then
3838
exit 1
3939
fi
4040

41-
./configure --prefix="${GENDIR}"
41+
./configure --prefix="${GENDIR}" --with-pic
4242
if [ $? -ne 0 ]
4343
then
4444
echo "./configure command failed."

tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def testLSTMBlockCell(self):
6868
m3 = array_ops.zeros([1, 2])
6969
g, ((out_m0, out_m1),
7070
(out_m2, out_m3)) = core_rnn_cell_impl.MultiRNNCell(
71-
[lstm_ops.LSTMBlockCell(2)] * 2, state_is_tuple=True)(x, (
72-
(m0, m1), (m2, m3)))
71+
[lstm_ops.LSTMBlockCell(2) for _ in range(2)],
72+
state_is_tuple=True)(x, ((m0, m1), (m2, m3)))
7373
sess.run([variables.global_variables_initializer()])
7474
res = sess.run([g, out_m0, out_m1, out_m2, out_m3], {
7575
x.name: np.array([[1., 1.]]),

tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def __init__(self,
473473
if probability_fn is None:
474474
probability_fn = nn_ops.softmax
475475
else:
476-
if not callable(cell_input_fn):
476+
if not callable(probability_fn):
477477
raise TypeError(
478478
"probability_fn must be callable, saw type: %s"
479479
% type(probability_fn).__name__)

tensorflow/contrib/slim/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ vgg = tf.contrib.slim.nets.vgg
447447
images, labels = ...
448448

449449
# Create the model.
450-
predictions = vgg.vgg16(images)
450+
predictions = vgg.vgg_16(images)
451451

452452
# Define the loss functions and get the total loss.
453453
loss = slim.losses.softmax_cross_entropy(predictions, labels)

0 commit comments

Comments
 (0)