platform/upstream/tensorflow.git
6 years agoMake requested review changes
Sami Kama [Tue, 17 Apr 2018 22:55:27 +0000 (15:55 -0700)]
Make requested review changes

6 years agoFixes for review requests
Sami Kama [Tue, 17 Apr 2018 00:36:07 +0000 (17:36 -0700)]
Fixes for review requests

6 years agoFix testing
Sami Kama [Fri, 13 Apr 2018 22:18:48 +0000 (15:18 -0700)]
Fix testing

6 years agoAdding py_test for TF-TRT integration
Sami Kama [Fri, 13 Apr 2018 22:01:07 +0000 (15:01 -0700)]
Adding py_test for TF-TRT integration

6 years agoMerge pull request #18444 from samikama/trt_static_impl
gracehoney [Fri, 13 Apr 2018 17:07:38 +0000 (10:07 -0700)]
Merge pull request #18444 from samikama/trt_static_impl

Fix TensorRT static linkage problem

6 years agoMerge pull request #17313 from jin/patch-1
andrehentz [Fri, 13 Apr 2018 13:37:03 +0000 (06:37 -0700)]
Merge pull request #17313 from jin/patch-1

Include cstring in logging.cc for use of strrchr()

6 years agoupdated installation instructions for Tensowflow-TensorRT integration (#18135)
jjsjann123 [Fri, 13 Apr 2018 11:21:15 +0000 (04:21 -0700)]
updated installation instructions for Tensowflow-TensorRT integration (#18135)

* updated installation instructions for Tensowflow-TensorRT integration

* Minor format changes to clean it up.

* Adding the python symlink command for devel packages too.

* Forcing the symlink creation.

* Updating the sed command for docker parameterized build.

6 years agoReplace tuple<int,int,int> for version info with a class in DnnSupportr::GetVersion...
Sami Kama [Fri, 13 Apr 2018 01:07:50 +0000 (18:07 -0700)]
Replace tuple<int,int,int> for version info with a class in DnnSupportr::GetVersion() (#18434)

* Replace tuple<int,int,int> for version info with a class

* Removed clang-format modifications on non-edited code

* Update dnn.h

Update the comment as per request of reviewer

6 years agoFix buildifier issues
Sami Kama [Thu, 12 Apr 2018 22:33:09 +0000 (15:33 -0700)]
Fix buildifier issues

6 years agoRemove if_static import
Sami Kama [Thu, 12 Apr 2018 22:17:03 +0000 (15:17 -0700)]
Remove if_static import

6 years agoMerge libraries back
Sami Kama [Thu, 12 Apr 2018 22:04:35 +0000 (15:04 -0700)]
Merge libraries back

6 years agocrf_decode fails when sequence_length is 0 (#17755)
Russell Klopfer [Thu, 12 Apr 2018 20:01:25 +0000 (16:01 -0400)]
crf_decode fails when sequence_length is 0 (#17755)

* updating documentation

* crf_decode fails when sequence_length is 0

* fixing line length

* more pylint fixes

6 years agoAdd tensor support for num_spectrogram_bins in linear_to_mel_weight_matrix (#17404)
Yong Tang [Thu, 12 Apr 2018 20:01:05 +0000 (13:01 -0700)]
Add tensor support for num_spectrogram_bins in linear_to_mel_weight_matrix (#17404)

* Add tensor support for num_spectrogram_bins in linear_to_mel_weight_matrix

This fix tries to address the issue raised in 16553 where it was not possible
to provide num_spectrogram_bins as a tensor or placeholder for
linear_to_mel_weight_matrix.

The reason comes from the implementation of `_validate_arguments`
which requires num_spectrogram_bins to be a python.

However, the validation here is not necessary as `num_spectrogram_bins`
will be passed to `math_ops.linspace`, which performs the validation
anyway. The validation in `math_ops.linspace` is done in shape function
and in kernel's `Compute()`. For that it makes sense to remove the
validation of `num_spectrogram_bins` in `_validate_arguments` so that
the issue raised in 16553 could be addressed.
This fix adds a test case to cover the changes. Also, the
error case of `num_spectrogram_bins < 0` has already been covered in the
existing test case:
https://github.com/tensorflow/tensorflow/blob/013a6c7b3112573ba4d932c8a22bfaf45f648c77/tensorflow/contrib/signal/python/kernel_tests/mel_ops_test.py#L149-L165

This fix fixes 16553.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case for tensor support of num_spectrogram_bins in mel_ops.linear_to_mel_weight_matrix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add comment for removing validation of num_spectrogram_bins

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update docstring

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update test case for num_spectrogram_bins

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Remove unused constant_op import to pass sanity check

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdate nn.py (#17247)
Seyed Majid Azimi [Thu, 12 Apr 2018 20:00:33 +0000 (22:00 +0200)]
Update nn.py (#17247)

adding missing quantized_relu which was missing before.

6 years agoAllow for devices which have F16, no F64, no Complex (#17473)
David Norman [Thu, 12 Apr 2018 20:00:12 +0000 (21:00 +0100)]
Allow for devices which have F16, no F64, no Complex (#17473)

6 years agoLink to gcc_s and gcc if compiler is GCC version 5 (#17849)
Yihong Wang [Thu, 12 Apr 2018 19:59:48 +0000 (12:59 -0700)]
Link to gcc_s and gcc if compiler is GCC version 5 (#17849)

When using cmake and GCC 5.4 to build tensorflow in Ubuntu 16.04,
the following error message would show up when loading
_pywrap_tensorflow_internal.so:
```
_pywrap_tensorflow_internal.so: undefined symbol: __cpu_model
```

The root cause is the same to this issue:
https://github.com/tensorflow/tensorflow/issues/9593

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
6 years agoLatest nngraph cannot build with Hexagon SDK 3.0 (#17963)
Quanlong [Thu, 12 Apr 2018 19:59:26 +0000 (03:59 +0800)]
Latest nngraph cannot build with Hexagon SDK 3.0 (#17963)

* fix: latest nngraph cannot build with Hexagon SDK 3.0

* Fix typo

6 years agogive some writing updates to tensorflow/contrib/slim/README.md (#18259)
Shaoning Zeng [Thu, 12 Apr 2018 19:58:59 +0000 (03:58 +0800)]
give some writing updates to tensorflow/contrib/slim/README.md (#18259)

* add missed right bracket in ### Scopes

* change one , to . in ### Scopes

* refine one sentence

6 years agoChange --output_png to --output_image (#18273)
Wai Hon Law [Thu, 12 Apr 2018 19:58:44 +0000 (12:58 -0700)]
Change --output_png to --output_image (#18273)

The argument is incorrect.

When running the given command, we get
```
E tensorflow/examples/wav_to_spectrogram/main.cc:54] Unknown argument
--output_png=/tmp/spectrogram.png
```

TESTED:Rerun the updated command and verify that the flag is correct.
```
bazel run tensorflow/examples/wav_to_spectrogram:wav_to_spectrogram --
--input_wav=/tmp/speech_dataset/happy/ab00c4b2_nohash_0.wav
--output_image=/tmp/spectrogram.png
```

6 years agocontrib/autograph: minor spelling tweaks (#18284)
brett koonce [Thu, 12 Apr 2018 19:58:36 +0000 (12:58 -0700)]
contrib/autograph: minor spelling tweaks (#18284)

6 years agoremove the misleading n_class information (#18305)
Yan Facai (颜发才) [Thu, 12 Apr 2018 19:58:22 +0000 (03:58 +0800)]
remove the misleading n_class information (#18305)

* DOC: modify the misleading n_class info

* DOC: add suggested fix

6 years agoFix WARNING in BatchNormalization (#18315)
Yong Tang [Thu, 12 Apr 2018 19:58:04 +0000 (12:58 -0700)]
Fix WARNING in BatchNormalization (#18315)

The keep_dims for reduce_mean has been deprecated and replaced
with keepdims. This casues the following WARNING in BatchNormalization:
```
normalization.py:584: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
```

This fix fixes the warning in BatchNormalization.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agocontrib: minor spelling tweaks (#18330)
brett koonce [Thu, 12 Apr 2018 19:57:48 +0000 (12:57 -0700)]
contrib: minor spelling tweaks (#18330)

* contrib: minor spelling tweaks

* Fix lint error

6 years agoReorder section `Using SavedModel with Estimators` (#18412)
Rholais Lii [Thu, 12 Apr 2018 19:57:39 +0000 (03:57 +0800)]
Reorder section `Using SavedModel with Estimators` (#18412)

Outputs should be specified before performing an export.

6 years ago[MSVC] Remove -D__VERSION__ flag and implement tf_compiler_version properly (#18445)
Loo Rong Jie [Thu, 12 Apr 2018 19:57:26 +0000 (03:57 +0800)]
[MSVC] Remove -D__VERSION__ flag and implement tf_compiler_version properly (#18445)

6 years agoReplace all COMPILER_MSVC to _MSC_VER and _WIN32 accordingly (#18448)
Loo Rong Jie [Thu, 12 Apr 2018 19:36:52 +0000 (03:36 +0800)]
Replace all COMPILER_MSVC to _MSC_VER and _WIN32 accordingly (#18448)

* Replace all COMPILER_MSVC to _MSC_VER and _WIN32 accordingly

* One more ARRAYSIZE to TF_ARRAYSIZE

* Delete non-existing include

6 years agoMake changes as per reviewer request
Sami Kama [Thu, 12 Apr 2018 18:40:02 +0000 (11:40 -0700)]
Make changes as per reviewer request

6 years agoMerge pull request #17123 from hovhannesgithub/div-sub-broadcasting
andrehentz [Thu, 12 Apr 2018 18:05:30 +0000 (11:05 -0700)]
Merge pull request #17123 from hovhannesgithub/div-sub-broadcasting

Add broadcasting functionality for Div and Sub ops.

6 years agoFixe merge issue
Hovhannes Harutyunyan [Thu, 12 Apr 2018 06:54:41 +0000 (10:54 +0400)]
Fixe merge issue

6 years agoMerge branch 'master' into div-sub-broadcasting
Hovhannes Harutyunyan [Thu, 12 Apr 2018 06:10:09 +0000 (10:10 +0400)]
Merge branch 'master' into div-sub-broadcasting

6 years agoRemove redefined BroadcastDiv function
Hovhannes Harutyunyan [Thu, 12 Apr 2018 06:04:40 +0000 (10:04 +0400)]
Remove redefined BroadcastDiv function

6 years agoFix double linkage of static variables
Sami Kama [Thu, 12 Apr 2018 03:19:27 +0000 (20:19 -0700)]
Fix double linkage of static variables

6 years agoCorrect argument doc for BasicLSTMCell.call (#16554)
Yanbo Liang [Thu, 12 Apr 2018 01:42:50 +0000 (18:42 -0700)]
Correct argument doc for BasicLSTMCell.call (#16554)

* Correct argument doc for BasicLSTMCell.call

* change self._num_units to num_units.

6 years agofix tf.GIT_VERSION always 'unknown' on windows cmake build (#16730)
fo40225 [Thu, 12 Apr 2018 01:41:48 +0000 (09:41 +0800)]
fix tf.GIT_VERSION always 'unknown' on windows cmake build (#16730)

6 years agoEnhancement with deprecated_argument_lookup (#17527)
Yong Tang [Thu, 12 Apr 2018 01:34:20 +0000 (18:34 -0700)]
Enhancement with deprecated_argument_lookup (#17527)

* Enhancement with deprecated_argument_lookup

The tf.losses.cosine_distance deprecated dim and switched
to axis. This fix adds the enhancement of using
deprecated_argument_lookup, which is used in all other
arguments deprecations.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add missing import

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoReplace wrong variable (#17738)
Seungwoo Choi (Biggie) [Thu, 12 Apr 2018 01:33:41 +0000 (10:33 +0900)]
Replace wrong variable (#17738)

6 years agoAdd comment to examples to prevent resource leaks (#17820)
Michal Turek [Thu, 12 Apr 2018 01:32:10 +0000 (03:32 +0200)]
Add comment to examples to prevent resource leaks (#17820)

Issue #17374

6 years agoAdd parallel implementation of CTC greedy decoder (#17982)
tamimaddari82 [Thu, 12 Apr 2018 01:28:18 +0000 (09:28 +0800)]
Add parallel implementation of CTC greedy decoder (#17982)

6 years agocontrib/image: minor spelling tweaks (#18162)
brett koonce [Thu, 12 Apr 2018 01:27:16 +0000 (18:27 -0700)]
contrib/image: minor spelling tweaks (#18162)

6 years agoCheck input dimension for contrib.layers.conv2d/conv3d (#18251)
Yong Tang [Thu, 12 Apr 2018 01:26:12 +0000 (18:26 -0700)]
Check input dimension for contrib.layers.conv2d/conv3d (#18251)

* Check input dimension for contrib.layers.conv2d/conv3d

This fix tries to fix the issue raised in 14583 where
the input dimension was not checked for contrib.layers.conv2d/conv3d
and contrib.slim.conv2d/conv3d.

The issue was that conv2d/conv3d were just aliases of
convolution. This fix wrap the conv2d/conv3d with the input
dimension check so that incorrect usage will return ValueError.

This fix fixes 14583.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case for conv2d/conv3d shape check

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix impacted tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update convolution instead of adding _convolution,

based on review feedback

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add convolution1d and additional update

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoadded missing shapefn to several operators (#18298)
jinghuangintel [Thu, 12 Apr 2018 01:20:55 +0000 (18:20 -0700)]
added missing shapefn to several operators (#18298)

6 years agoFix typo in error message (#18319)
Ivan Zhang [Thu, 12 Apr 2018 01:18:01 +0000 (21:18 -0400)]
Fix typo in error message (#18319)

6 years agoDisable int64 test for backends which don't support it (#18344)
David Norman [Thu, 12 Apr 2018 01:09:31 +0000 (02:09 +0100)]
Disable int64 test for backends which don't support it (#18344)

6 years agoFix broken links in /extend/language_bindings (#18346)
ImSheridan [Thu, 12 Apr 2018 01:09:17 +0000 (09:09 +0800)]
Fix broken links in /extend/language_bindings (#18346)

6 years agounified flip_* and random_flip_* functions (#18364)
ngc92 [Thu, 12 Apr 2018 01:08:42 +0000 (03:08 +0200)]
unified flip_* and random_flip_* functions (#18364)

6 years agoReplace print with logging (#18392)
Vadim Markovtsev [Thu, 12 Apr 2018 01:08:00 +0000 (03:08 +0200)]
Replace print with logging (#18392)

6 years agoFixing non-mkl builds (#18401)
Mahmoud Abuzaina [Thu, 12 Apr 2018 01:04:26 +0000 (18:04 -0700)]
Fixing non-mkl builds (#18401)

6 years agoAdd negative axis support for tf.manip.roll (#18409)
Yong Tang [Thu, 12 Apr 2018 01:01:38 +0000 (18:01 -0700)]
Add negative axis support for tf.manip.roll (#18409)

* Add negative axis support for tf.manip.roll

This fix tries to support negative axis for tf.manip.roll.
The tf.manip.roll is supposed to be compatible with numpy.roll
which does support negative axis.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case for negative axis support for tf.manip.roll

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add axis check so that negative axis is within the range

Negative axis should be 0 <= axis + dims < dims

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add additional test cases

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix pylint issue

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd deprecated_args decoration to expand_dims (#18419)
Yong Tang [Thu, 12 Apr 2018 00:51:41 +0000 (17:51 -0700)]
Add deprecated_args decoration to expand_dims (#18419)

* Add deprecated_args decoration to expand_dims

This fix adds deprecated_args decoration to expand_dims
as `dims` has been deprecated and in favor of `axis`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enhance deprecated args with deprecation.deprecated_argument_lookup

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoImporve shape function of RandomUniformInt (#18420)
Yong Tang [Thu, 12 Apr 2018 00:50:45 +0000 (17:50 -0700)]
Imporve shape function of RandomUniformInt (#18420)

* Imporve shape function of RandomUniformInt

The input of `minval` and `maxval` of `RandomUniformInt`
should be scalar though it is not checked in the shape
function. This fix improves the shape function with the
rank check, and adds test case for it.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case for maxval and minval for RandomUniformInt

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdate docs of reduce_max/reduce_min for real numeric type (#18422)
Yong Tang [Thu, 12 Apr 2018 00:49:47 +0000 (17:49 -0700)]
Update docs of reduce_max/reduce_min for real numeric type (#18422)

Both reduce_max and reduce_min only work for real numeric type
as complex numbers do not apply. This fix update the docs
with `numeric type` -> `real numeric type`.

Note that the current kernel registration in
reduction_ops_max.cc and reduction_ops_min.cc
use `TF_CALL_REAL_NUMBER_TYPES` so it is good.
The op registraton for Max and Min inside math_ops.cc should be `.Attr("T: realnumbertype")` instead of `numbertype`.
However, such a change will break API compatibility so leave it alone.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years ago[INTEL MKL] Skip special nodes inserted by TF and MKL (#18077)
bhavani-subramanian [Wed, 11 Apr 2018 22:10:38 +0000 (15:10 -0700)]
[INTEL MKL] Skip special nodes inserted by TF and MKL (#18077)

* Skip special nodes inserted by TF. This fixes TFDO-178 JIIRA issue.

* Added a comment about skipping nodes with an /_ in them.

* Stripped trailing whitespace.

* Wrapped code such that it is executed only when INTEL_MKL is defined.

6 years agoMerge pull request #18340 from JChord/master
Billy Lamberta [Wed, 11 Apr 2018 21:34:32 +0000 (14:34 -0700)]
Merge pull request #18340 from JChord/master

Docs: Fix 'Unable to find source java class'

6 years agoUpdate tf.contrib.metrics with deprecations (#18335)
Yong Tang [Wed, 11 Apr 2018 20:35:51 +0000 (13:35 -0700)]
Update tf.contrib.metrics with deprecations (#18335)

* Update tf.contrib.metrics with deprecations

This fix updates tf.contrib.metrics.streaming_mean_absolution(relative/squared)_error
with deprecation notices as they have been replaces with tf.metrics.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update streaming_mean_relative_error

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update deprecation notice for streaming_root_mean_squared_error

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix the deprecation message.

* Fix pylint `Line too long (81/80)` issue

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdating tensorboard link in Readme.md (#18161)
Rajendra arora [Wed, 11 Apr 2018 19:49:31 +0000 (01:19 +0530)]
Updating tensorboard link in Readme.md (#18161)

6 years agoMerge pull request #18430 from lamberta/fix-docs-using-tpu
Billy Lamberta [Wed, 11 Apr 2018 19:07:59 +0000 (12:07 -0700)]
Merge pull request #18430 from lamberta/fix-docs-using-tpu

Docs: Clarify using_tpu.md

6 years agoTidy up doc for rebuild project
Billy Lamberta [Wed, 11 Apr 2018 19:05:39 +0000 (12:05 -0700)]
Tidy up doc for rebuild project

6 years agoMerge pull request #18426 from qlzh727/branch_192461382
Qianli Scott Zhu [Wed, 11 Apr 2018 18:27:12 +0000 (11:27 -0700)]
Merge pull request #18426 from qlzh727/branch_192461382

Branch 192461382

6 years agoDocs: Clarify using_tpu.md
Billy Lamberta [Wed, 11 Apr 2018 17:57:30 +0000 (10:57 -0700)]
Docs: Clarify using_tpu.md

6 years agoMerge commit for internal changes
Scott Zhu [Wed, 11 Apr 2018 16:54:10 +0000 (09:54 -0700)]
Merge commit for internal changes

6 years agoFixing dependencies.
Nupur Garg [Wed, 11 Apr 2018 16:34:51 +0000 (09:34 -0700)]
Fixing dependencies.

PiperOrigin-RevId: 192461382

6 years agoFix Windows GPU TensorFlow Bazel builds.
Michael Case [Wed, 11 Apr 2018 16:34:44 +0000 (09:34 -0700)]
Fix Windows GPU TensorFlow Bazel builds.

The configure.py script will error out on Windows GPU builds due
to NCCL attempted to be configured (and is currently Linux only).

PiperOrigin-RevId: 192461362

6 years agoTemporarily remove prelu from generated_examples_zip_test
A. Unique TensorFlower [Wed, 11 Apr 2018 15:30:18 +0000 (08:30 -0700)]
Temporarily remove prelu from generated_examples_zip_test

PiperOrigin-RevId: 192453411

6 years agoRemove unused former source of tensorflow.org/tutorials/image_retraining.
A. Unique TensorFlower [Wed, 11 Apr 2018 15:11:50 +0000 (08:11 -0700)]
Remove unused former source of tensorflow.org/tutorials/image_retraining.

The source of https://tensorflow.org/tutorials/image_retraining has moved from
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/docs_src/tutorials
to https://github.com/tensorflow/hub/tree/master/docs/tutorials
because of its use of TensorFlow Hub.

This change replaces the now-defunct version with a pointer to the new
location, in order to avoid dead code.

PiperOrigin-RevId: 192451570

6 years agoFixing propagation of minmax info on constant gather ops.
A. Unique TensorFlower [Wed, 11 Apr 2018 14:47:26 +0000 (07:47 -0700)]
Fixing propagation of minmax info on constant gather ops.

PiperOrigin-RevId: 192448922

6 years ago[TF:XLA] Mark oom_test as optonly, it's really slow when compiled without optimization.
Benjamin Kramer [Wed, 11 Apr 2018 09:16:25 +0000 (02:16 -0700)]
[TF:XLA] Mark oom_test as optonly, it's really slow when compiled without optimization.

PiperOrigin-RevId: 192420481

6 years agoCreate FileWriter <-> tf.contrib.summary compatibility layer
Nick Felt [Wed, 11 Apr 2018 06:44:12 +0000 (23:44 -0700)]
Create FileWriter <-> tf.contrib.summary compatibility layer

This provides an implementation of FileWriter, activated by passing in a `session` parameter to the constructor, that is backed by session.run'ing graph ops that manipulate a tf.contrib.summary.create_file_writer() instance. Because tf.contrib.summary.SummaryWriters are backed by shared resources in the graph, this makes it possible to have a FileWriter and a tf.contrib.summary.SummaryWriter that both write to the same events file.

This change includes some related smaller changes:
- Factors out training_utils.py into a separate target to avoid a cyclic dep
- Moves contrib/summary/summary_ops.py to python/ops/summary_ops_v2.py
- Adds SummaryWriter.init(), .flush(), and .close() op-returning methods
- Changes create_file_writer() `name` arg to default to logdir prefixed by `logdir:` so shared resources are scoped by logdir by default
- Fixes a bug with tf.contrib.summary.flush() `writer` arg
- Makes create_file_writer()'s max_queue arg behave as documented
- Adds more testing for existing tf.contrib.summary API

PiperOrigin-RevId: 192408079

6 years ago[XLA] Fix the size of data buffer for sparse literals.
A. Unique TensorFlower [Wed, 11 Apr 2018 05:44:36 +0000 (22:44 -0700)]
[XLA] Fix the size of data buffer for sparse literals.

PiperOrigin-RevId: 192404543

6 years ago[XLA] Redesign: implement ComputeHost.
A. Unique TensorFlower [Wed, 11 Apr 2018 05:29:13 +0000 (22:29 -0700)]
[XLA] Redesign: implement ComputeHost.

Also support convert from/to proto for ComputeHost.

PiperOrigin-RevId: 192403660

6 years ago[XLA] Redesgin: implement and test Gather, Conditional.
A. Unique TensorFlower [Wed, 11 Apr 2018 04:42:14 +0000 (21:42 -0700)]
[XLA] Redesgin: implement and test Gather, Conditional.

Also support convert from/to proto for Gather.

PiperOrigin-RevId: 192400659

6 years ago[XLA] Redesign: implment and test CrossReplicaSum.
A. Unique TensorFlower [Wed, 11 Apr 2018 03:48:57 +0000 (20:48 -0700)]
[XLA] Redesign: implment and test CrossReplicaSum.

PiperOrigin-RevId: 192397189

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Wed, 11 Apr 2018 02:44:00 +0000 (19:44 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 192392702

6 years ago[StreamExecutor] Merge StreamExecutor's and XLA's StatusOr classes.
Justin Lebar [Wed, 11 Apr 2018 02:34:54 +0000 (19:34 -0700)]
[StreamExecutor] Merge StreamExecutor's and XLA's StatusOr classes.

StatusOr is a...complicated class to write.  It's really not good to
have two copies of it.  They've diverged (the XLA one is more
sophisticated), and this may be causing upstream build problems with
gcc6.

PiperOrigin-RevId: 192392111

6 years ago[XLA] Redesign: implement and test BatchNormXXX.
A. Unique TensorFlower [Wed, 11 Apr 2018 02:31:05 +0000 (19:31 -0700)]
[XLA] Redesign: implement and test BatchNormXXX.

PiperOrigin-RevId: 192391748

6 years agoexperimental C API: Fix compilation failure in Windows.
Asim Shankar [Wed, 11 Apr 2018 02:20:58 +0000 (19:20 -0700)]
experimental C API: Fix compilation failure in Windows.

The functions added in
https://github.com/tensorflow/tensorflow/commit/be917027e37c5e8f21f6ba07f24bdbf072cf6dfd
are temporary, and their existence breaks compilation in MSVC because of
https://docs.microsoft.com/en-us/cpp/c-language/maximum-string-length
and
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2026

So just disabling it in Windows for now.

PiperOrigin-RevId: 192391164

6 years agoCheckpointable: remove colocation constraints from restore ops
Allen Lavoie [Wed, 11 Apr 2018 02:01:33 +0000 (19:01 -0700)]
Checkpointable: remove colocation constraints from restore ops

Mystery solved thanks to log_device_placement.

PiperOrigin-RevId: 192389574

6 years agoRemove BN workaround for resource variable gradients bug that was recently fixed.
Francois Chollet [Wed, 11 Apr 2018 01:50:58 +0000 (18:50 -0700)]
Remove BN workaround for resource variable gradients bug that was recently fixed.

PiperOrigin-RevId: 192388867

6 years agoAdd missing TF_ATTRIBUTE_WEAK for MSVC (#18303)
Loo Rong Jie [Wed, 11 Apr 2018 01:51:10 +0000 (09:51 +0800)]
Add missing TF_ATTRIBUTE_WEAK for MSVC (#18303)

6 years agoMerge changes from github.
Michael Case [Wed, 11 Apr 2018 01:44:13 +0000 (18:44 -0700)]
Merge changes from github.

PiperOrigin-RevId: 192388250

6 years agoFix for users who were passing `Dimension` type as `units` arg in `Dense`.
Francois Chollet [Wed, 11 Apr 2018 01:41:37 +0000 (18:41 -0700)]
Fix for users who were passing `Dimension` type as `units` arg in `Dense`.

PiperOrigin-RevId: 192387984

6 years agoFix incorrect math equation renderings in random_fourier_features.py (#18367)
Yong Tang [Wed, 11 Apr 2018 01:38:06 +0000 (18:38 -0700)]
Fix incorrect math equation renderings in random_fourier_features.py (#18367)

* Fix incorrect math equation renderings in random_fourier_features.py

This fix fixes incorrect math equation renderings for markdown
in random_fourier_features.py. The issue is that
"```" backtick should not be added when mathjax quote is used ("\\(" or "$$").

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Additional fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* MathJax fixes

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix pylint errors

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix code block rendering issue in adding_an_op.md (#18368)
Yong Tang [Wed, 11 Apr 2018 01:37:35 +0000 (18:37 -0700)]
Fix code block rendering issue in adding_an_op.md (#18368)

* Fix code block rendering issue in adding_an_op.md

In adding_an_op.md, html code was used in markdown for code blocks.
However, this does not work very well as some of the code blocks
includes incorrect rendering.

This fix converts html into "```c++" (backticks) so that the rendering
could be fixed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix additional html code

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix lang-cpp issue

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Further clean up

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agotypo and readability fixes in CPU section (#18370)
Maciej [Wed, 11 Apr 2018 01:37:03 +0000 (20:37 -0500)]
typo and readability fixes in CPU section (#18370)

Fixed a typo in the Tuning MKL section, and modified punctuation for intra_op_parallelism_threads section for easier readability.

6 years agoTFTS: De-flake the LSTM test
Allen Lavoie [Wed, 11 Apr 2018 01:04:20 +0000 (18:04 -0700)]
TFTS: De-flake the LSTM test

Disabling the value-based check for now. Hopefully the shapes are deterministic.

PiperOrigin-RevId: 192383553

6 years agoForward the status from LookupResource to GetInputTensorFromVariable rather than...
Allen Lavoie [Wed, 11 Apr 2018 00:57:19 +0000 (17:57 -0700)]
Forward the status from LookupResource to GetInputTensorFromVariable rather than returning a generic error status

PiperOrigin-RevId: 192382499

6 years ago[XLA] Redesign: implement Conj.
A. Unique TensorFlower [Wed, 11 Apr 2018 00:49:51 +0000 (17:49 -0700)]
[XLA] Redesign: implement Conj.

PiperOrigin-RevId: 192381481

6 years ago[XLA] Redesign: implement SliceInDim.
A. Unique TensorFlower [Wed, 11 Apr 2018 00:47:13 +0000 (17:47 -0700)]
[XLA] Redesign: implement SliceInDim.

PiperOrigin-RevId: 192381080

6 years ago[XLA] Redesign: implement ReduceAll.
A. Unique TensorFlower [Wed, 11 Apr 2018 00:44:48 +0000 (17:44 -0700)]
[XLA] Redesign: implement ReduceAll.

PiperOrigin-RevId: 192380688

6 years ago[XLA] Redesign: implement and test SelectAndScatter.
A. Unique TensorFlower [Wed, 11 Apr 2018 00:41:56 +0000 (17:41 -0700)]
[XLA] Redesign: implement and test SelectAndScatter.

PiperOrigin-RevId: 192380121

6 years agoUpdate LogToSTDErr for TF Lite usage
Austin Anderson [Wed, 11 Apr 2018 00:37:53 +0000 (17:37 -0700)]
Update LogToSTDErr for TF Lite usage

PiperOrigin-RevId: 192379483

6 years agoAdd types to error message in case of mismatch. NFC.
Jacques Pienaar [Tue, 10 Apr 2018 23:47:08 +0000 (16:47 -0700)]
Add types to error message in case of mismatch. NFC.

PiperOrigin-RevId: 192370979

6 years agoAdd a thread-safe producer-consumer queue.
Michael Kuperstein [Tue, 10 Apr 2018 23:45:19 +0000 (16:45 -0700)]
Add a thread-safe producer-consumer queue.

PiperOrigin-RevId: 192370670

6 years agoFix issue with gradients of resource variables in cond.
Alexandre Passos [Tue, 10 Apr 2018 23:35:58 +0000 (16:35 -0700)]
Fix issue with gradients of resource variables in cond.

PiperOrigin-RevId: 192369091

6 years ago[XLA] Redesign: implement and test ReduceWindow.
A. Unique TensorFlower [Tue, 10 Apr 2018 23:32:05 +0000 (16:32 -0700)]
[XLA] Redesign: implement and test ReduceWindow.

PiperOrigin-RevId: 192368401

6 years agoMerge pull request #18407 from av8ramit/fix_sed_cmd
Amit Patankar [Tue, 10 Apr 2018 23:36:13 +0000 (16:36 -0700)]
Merge pull request #18407 from av8ramit/fix_sed_cmd

Updating the sed command for docker parameterized build.

6 years agoUpdate programmers guide
A. Unique TensorFlower [Tue, 10 Apr 2018 23:31:46 +0000 (16:31 -0700)]
Update programmers guide

PiperOrigin-RevId: 192368335

6 years agoSupporting FakeQuant num_bits and getting the fake quant op matching tensorflow.
A. Unique TensorFlower [Tue, 10 Apr 2018 23:26:05 +0000 (16:26 -0700)]
Supporting FakeQuant num_bits and getting the fake quant op matching tensorflow.

PiperOrigin-RevId: 192367307

6 years ago[XLA] GRPC service definition.
Chris Leary [Tue, 10 Apr 2018 23:12:19 +0000 (16:12 -0700)]
[XLA] GRPC service definition.

PiperOrigin-RevId: 192364932

6 years agoFix `nn` module RNN namespace issues.
Francois Chollet [Tue, 10 Apr 2018 23:11:38 +0000 (16:11 -0700)]
Fix `nn` module RNN namespace issues.

PiperOrigin-RevId: 192364808

6 years agoUpdating the sed command for docker parameterized build.
Amit Patankar [Tue, 10 Apr 2018 23:10:13 +0000 (16:10 -0700)]
Updating the sed command for docker parameterized build.