platform/upstream/tensorflow.git
6 years agoMerge pull request #18650 from imsheridan/add_shape_check_TextLineDataset
Martin Wicke [Thu, 19 Apr 2018 16:10:53 +0000 (09:10 -0700)]
Merge pull request #18650 from imsheridan/add_shape_check_TextLineDataset

Add shape check to TextLineDataset op

6 years agoMerge pull request #18657 from yongtang/04152018-raw_input
Martin Wicke [Thu, 19 Apr 2018 16:09:14 +0000 (09:09 -0700)]
Merge pull request #18657 from yongtang/04152018-raw_input

Replace raw_input/input with six.moves.input

6 years agoMerge pull request #18659 from yongtang/04182018-py_func_uint16
Martin Wicke [Thu, 19 Apr 2018 16:05:06 +0000 (09:05 -0700)]
Merge pull request #18659 from yongtang/04182018-py_func_uint16

Add uint16 support for py_func

6 years agoMerge pull request #18674 from yongtang/18669-CudnnLSTM
Martin Wicke [Thu, 19 Apr 2018 15:56:08 +0000 (08:56 -0700)]
Merge pull request #18674 from yongtang/18669-CudnnLSTM

Fix issue for float16 data type with reuse in CudnnLSTM

6 years agoMerge pull request #18611 from yongtang/04162018-roll-shape
Martin Wicke [Wed, 18 Apr 2018 22:13:05 +0000 (15:13 -0700)]
Merge pull request #18611 from yongtang/04162018-roll-shape

Improve shape function check for `tf.roll`

6 years agoUpdate dtypes for the test cases
Yong Tang [Wed, 18 Apr 2018 01:38:31 +0000 (01:38 +0000)]
Update dtypes for the test cases

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd string_strip to remove leading and trailing whitespaces (#18418)
Yong Tang [Wed, 18 Apr 2018 20:49:18 +0000 (13:49 -0700)]
Add string_strip to remove leading and trailing whitespaces (#18418)

* Add string_strip to remove leading and trailing whitespaces

This fix tries to address the issue raised in 18384 to add
an op tf.string_strip so that the leading and trailing whitespaces
could be removed.

This fix fixes 18384.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add StringStrip op to string_ops.cc

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Sanitize with clang-format

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

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update API defs with tensorflow/core/api_def/update_api_def.sh

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix python test error

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

```
bazel-bin/tensorflow/tools/api/tests/api_compatibility_test
           --update_goldens True
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoConfigurable Custom graph optimizers for grappler (#18479)
Sami Kama [Wed, 18 Apr 2018 20:30:10 +0000 (13:30 -0700)]
Configurable Custom graph optimizers for grappler (#18479)

* Adding a new field for configurable custom optimizers

* Pass configuration structure to custom optimizers

* Reviewer requests

* Style fixes

* Fix tests

6 years agoFix pylint `Line too long (102/80)`
Yong Tang [Wed, 18 Apr 2018 19:41:46 +0000 (19:41 +0000)]
Fix pylint `Line too long (102/80)`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdate comment in the test
Yong Tang [Wed, 18 Apr 2018 19:49:26 +0000 (19:49 +0000)]
Update comment in the test

`checked is done in kernel.` -> `checked in kernel.`

for review feedback.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix issue for float16 data type with reuse in CudnnLSTM
Yong Tang [Wed, 18 Apr 2018 19:38:30 +0000 (19:38 +0000)]
Fix issue for float16 data type with reuse in CudnnLSTM

This fix tries to address the issue raised in 18699 where
for float16 data type, the reuse in CudnnLSTM throws a ValueError.

This fix fixes the issue by passing the data type. This fix
fixes 18699.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix `Line too long (82/80) (line-too-long)` issue
Yong Tang [Wed, 18 Apr 2018 01:44:30 +0000 (01:44 +0000)]
Fix `Line too long (82/80) (line-too-long)` issue

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoRemove unneeded assignment
Yong Tang [Wed, 18 Apr 2018 01:43:24 +0000 (01:43 +0000)]
Remove unneeded assignment

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoPylint fix for the import
Yong Tang [Wed, 18 Apr 2018 01:42:02 +0000 (01:42 +0000)]
Pylint fix for the import

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoReplace raw_input/input with six.moves.input
Yong Tang [Wed, 11 Apr 2018 22:20:09 +0000 (22:20 +0000)]
Replace raw_input/input with six.moves.input

This fix is an enhancement to replace raw_input/input
in python 2 and 3 with six.moves.input.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoRemove unneeded for loop for bool data types in tests
Yong Tang [Wed, 18 Apr 2018 01:32:37 +0000 (01:32 +0000)]
Remove unneeded for loop for bool data types in tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd test case for py_func with bool types
Yong Tang [Wed, 18 Apr 2018 01:28:56 +0000 (01:28 +0000)]
Add test case for py_func with bool types

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdate complex test case
Yong Tang [Wed, 18 Apr 2018 01:27:51 +0000 (01:27 +0000)]
Update complex test case

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoPylint fix
Yong Tang [Wed, 18 Apr 2018 01:25:32 +0000 (01:25 +0000)]
Pylint fix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd test cases for complex (complex64/complex128) type with py_func
Yong Tang [Wed, 18 Apr 2018 01:24:30 +0000 (01:24 +0000)]
Add test cases for complex (complex64/complex128) type with py_func

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix line too long issue with pylint
Yong Tang [Wed, 18 Apr 2018 01:22:53 +0000 (01:22 +0000)]
Fix line too long issue with pylint

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd test cases for real data types with py_func.
Yong Tang [Wed, 18 Apr 2018 01:21:36 +0000 (01:21 +0000)]
Add test cases for real data types with py_func.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd uint16 support for py_func
Yong Tang [Wed, 18 Apr 2018 01:17:06 +0000 (01:17 +0000)]
Add uint16 support for py_func

In tf most of the numeric data types are supported though uint16 support
is not:
```
$ python
>>> import tensorflow as tf
>>> def sum_func(x, y):
...   return x + y
...
>>> x = tf.constant(1, dtype=tf.uint16)
>>> y = tf.constant(2, dtype=tf.uint16)
>>> z = tf.py_func(sum_func, [x, y], tf.uint16)
>>> tf.Session().run(z)
...
...
tensorflow.python.framework.errors_impl.UnimplementedError: Unsupported numpy type 4
 [[Node: PyFunc = PyFunc[Tin=[DT_UINT16, DT_UINT16], Tout=[DT_UINT16], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/device:CPU:0"](Const, Const_1)]]
...
```

The reason is that there is no conversion between numpy uint16 and tf.uint16.

This fix adds the support so that py_func could process tf.uint16 data types.

This fix also adds test cases for different data types with py_func to
increase the test coverage.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge pull request #18664 from yongtang/04182018-init_ops.py
Yifei Feng [Wed, 18 Apr 2018 17:35:12 +0000 (10:35 -0700)]
Merge pull request #18664 from yongtang/04182018-init_ops.py

Fix build failure in `//tensorflow/python/kernel_tests:init_ops_test`

6 years agoFix build failure in `bazel test -s --config=opt --cache_test_results=no //tensorflow...
Yong Tang [Wed, 18 Apr 2018 16:20:01 +0000 (16:20 +0000)]
Fix build failure in `bazel test -s --config=opt --cache_test_results=no //tensorflow/python/kernel_tests:init_ops_test`

With the most recent master the following test fails:
```
bazel test -s --config=opt --cache_test_results=no //tensorflow/python/kernel_tests:init_ops_test
...
...
...
    eye = linalg_ops.eye(n, dtype=self.dtype)
NameError: global name 'linalg_ops' is not defined
```

This fix fixes the test failure.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoadd checks for compression_type and buffer_size also
imsheridan [Wed, 18 Apr 2018 16:05:05 +0000 (00:05 +0800)]
add checks for compression_type and buffer_size also

6 years agoMerge pull request #17032 from yongtang/02152018-keep_dims-monte_carlo_test
Martin Wicke [Wed, 18 Apr 2018 15:30:02 +0000 (08:30 -0700)]
Merge pull request #17032 from yongtang/02152018-keep_dims-monte_carlo_test

Fix warnings in tf.contrib.bayesflow.monte_carlo.expectation

6 years agoAdd shape check to TextLineDataset op
imsheridan [Wed, 18 Apr 2018 12:12:14 +0000 (20:12 +0800)]
Add shape check to TextLineDataset op

6 years agoMerge pull request #18509 from samikama/py_test
gracehoney [Wed, 18 Apr 2018 02:03:28 +0000 (19:03 -0700)]
Merge pull request #18509 from samikama/py_test

Add testing for TF-TRT

6 years agoMerge pull request #17740 from fumihwh/support-matrix-2-norm
annarev [Wed, 18 Apr 2018 01:26:41 +0000 (18:26 -0700)]
Merge pull request #17740 from fumihwh/support-matrix-2-norm

implement matrix 2-norm

6 years agoMerge pull request #18577 from sbsends/master
Yifei Feng [Wed, 18 Apr 2018 00:54:57 +0000 (17:54 -0700)]
Merge pull request #18577 from sbsends/master

Added support for saved_model_cli input files stored on GCS/AWS.

6 years agofix build break cmake windows 32bit (#18295)
fo40225 [Tue, 17 Apr 2018 23:45:40 +0000 (07:45 +0800)]
fix build break cmake windows 32bit (#18295)

* fix build break cmake windows 32bit

* Fix lint errors

6 years agoFix the default value doc string of global_step in contrib.slim (#18313)
ImSheridan [Tue, 17 Apr 2018 23:45:19 +0000 (07:45 +0800)]
Fix the default value doc string of global_step in contrib.slim (#18313)

6 years agoReplace raw_input/input with six.moves.input for python 2/3 (#18461)
Yong Tang [Tue, 17 Apr 2018 23:44:53 +0000 (16:44 -0700)]
Replace raw_input/input with six.moves.input for python 2/3 (#18461)

In python 3 input is the equivalent of raw_input in python 2.
This fix is an enhancement to replace raw_input/input with
six.moves.input, which is compatible with both python 2 and python 3.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix shape validation error with tf.nn.conv3d_transpose (#18465)
Yong Tang [Tue, 17 Apr 2018 23:44:21 +0000 (16:44 -0700)]
Fix shape validation error with tf.nn.conv3d_transpose (#18465)

* Fix shape validation error with tf.nn.conv3d_transpose

This fix tries to address the issue raised in 18460.
In `tf.nn.conv3d_transpose` when list or np array is passed,
the validate of the output shape with filter shape uses
`output_shape[4]` (channel). This will not work with
`data_format='NCDHW'`.

This fix fixes the issue by replace `output_shape[4]` with `output_shape[axis]`.

This fix also adds a test case. Before this fix, the test case will fail.

This fix fixes 18460.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case for output and filter shape check in conv3d_transpose

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Also fix the error message

6 years agoFixed the bug in mkl_input_conversion_op when reorder is not needed (#18498)
shengfuintel [Tue, 17 Apr 2018 23:44:10 +0000 (16:44 -0700)]
Fixed the bug in mkl_input_conversion_op when reorder is not needed (#18498)

6 years ago[INTEL MK] Updating MKL CPU CI build and test. (#18513)
AG Ramesh [Tue, 17 Apr 2018 23:43:53 +0000 (16:43 -0700)]
[INTEL MK] Updating MKL CPU CI build and test. (#18513)

* Setting  KMP_BLOCKTIME to 0

* Adding comments

6 years agoFix py_test import
gracehoney [Tue, 17 Apr 2018 23:34:22 +0000 (16:34 -0700)]
Fix py_test import

6 years agoMerge pull request #18618 from yongtang/04172018-duplicate-random_ops
Martin Wicke [Tue, 17 Apr 2018 23:26:41 +0000 (16:26 -0700)]
Merge pull request #18618 from yongtang/04172018-duplicate-random_ops

Remove duplicate imports in all python source

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 ago[tf.data] Fix a device placement issue in `prefetch_to_device()`. (#18607)
Derek Murray [Tue, 17 Apr 2018 21:59:58 +0000 (14:59 -0700)]
[tf.data] Fix a device placement issue in `prefetch_to_device()`. (#18607)

* [tf.data] Fix a device placement issue in `prefetch_to_device()`.

Previously, the `iterator_get_device()` op was being infeasibly colocated with
both the iterator and placed on the prefetch target device. Move the
construction of that op outside the `with device():` block to fix this.

Also enable the relevant test to run as a CUDA test.

* Import the cuda_py_test rule.

6 years agoMerge pull request #18615 from yongtang/04162018-TFRecordDataset-shape
Martin Wicke [Tue, 17 Apr 2018 21:59:50 +0000 (14:59 -0700)]
Merge pull request #18615 from yongtang/04162018-TFRecordDataset-shape

Add shape check to TFRecordDataset

6 years agoMerge pull request #18613 from yifeif/branch_193234819
Yifei Feng [Tue, 17 Apr 2018 21:54:02 +0000 (14:54 -0700)]
Merge pull request #18613 from yifeif/branch_193234819

Branch 193234819

6 years agoClean up remaining issues.
Yong Tang [Tue, 17 Apr 2018 21:36:21 +0000 (21:36 +0000)]
Clean up remaining issues.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix duplicate import in kmeans_test.py
Yong Tang [Tue, 17 Apr 2018 21:36:05 +0000 (21:36 +0000)]
Fix duplicate import in kmeans_test.py

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoRemove duplicate imports in several places
Yong Tang [Tue, 17 Apr 2018 21:33:27 +0000 (21:33 +0000)]
Remove duplicate imports in several places

Wrote a script to scan throught the python files in the repo,
and found the remaining duplicate imports in some python files like:
```
 from tensorflow.python.ops import random_ops
-from tensorflow.python.ops import random_ops
 from tensorflow.python.util.deprecation import deprecated
```
This fix removed all of them for duplicate imports.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge pull request #18504 from akshaym/eager-custom-ops
Akshay Modi [Tue, 17 Apr 2018 21:40:32 +0000 (14:40 -0700)]
Merge pull request #18504 from akshaym/eager-custom-ops

Use eager compatible wrappers in load_library for custom ops

6 years agoMerge pull request #18614 from yongtang/04172018-duplicate-import
Martin Wicke [Tue, 17 Apr 2018 21:14:41 +0000 (14:14 -0700)]
Merge pull request #18614 from yongtang/04172018-duplicate-import

Remove duplicate import in compat.py

6 years agoMerge pull request #18561 from yongtang/18529-doc-cast
Martin Wicke [Tue, 17 Apr 2018 20:34:33 +0000 (13:34 -0700)]
Merge pull request #18561 from yongtang/18529-doc-cast

Update docs for tf.cast with supported types

6 years agoMerge pull request #18563 from yongtang/04162018-gemmlowp
Martin Wicke [Tue, 17 Apr 2018 20:33:05 +0000 (13:33 -0700)]
Merge pull request #18563 from yongtang/04162018-gemmlowp

Update gemmlowp version for cmake build

6 years agoMerge pull request #17562 from giuscri/typo
Martin Wicke [Tue, 17 Apr 2018 20:18:06 +0000 (13:18 -0700)]
Merge pull request #17562 from giuscri/typo

Fix markdown error in layers tutorial.

6 years agoMerge pull request #17512 from imsheridan/fix_broken_link_graph
Martin Wicke [Tue, 17 Apr 2018 20:17:41 +0000 (13:17 -0700)]
Merge pull request #17512 from imsheridan/fix_broken_link_graph

Fix broken link of distributed in graphs.md

6 years agoUpdate clip_ops_test.py
Yifei Feng [Tue, 17 Apr 2018 20:05:09 +0000 (13:05 -0700)]
Update clip_ops_test.py

6 years agoMerge pull request #17395 from facaiy/ENH/adamax_optimizer
annarev [Tue, 17 Apr 2018 19:54:30 +0000 (12:54 -0700)]
Merge pull request #17395 from facaiy/ENH/adamax_optimizer

add AdaMax optimizer

6 years agoDuplicate imports in histogram_ops.py
Yong Tang [Tue, 17 Apr 2018 19:48:42 +0000 (19:48 +0000)]
Duplicate imports in histogram_ops.py

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoRemove duplicate import in compat.py
Yong Tang [Tue, 17 Apr 2018 19:47:25 +0000 (19:47 +0000)]
Remove duplicate import in compat.py

Noticed there are a couple of places in compat.py that
have duplicate import:
```
from tensorflow.python.util.tf_export import tf_export
from tensorflow.python.util.tf_export import tf_export
```

This fix remove duplicate imports.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoPylint issue fix
Yong Tang [Tue, 17 Apr 2018 01:17:11 +0000 (01:17 +0000)]
Pylint issue fix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge commit for internal changes
Yifei Feng [Tue, 17 Apr 2018 19:18:44 +0000 (12:18 -0700)]
Merge commit for internal changes

6 years agoComplement cmake script to compile tensorflow with mkl and mkldnn on Windows (#16936)
Tang, Wenyi [Tue, 17 Apr 2018 19:17:48 +0000 (03:17 +0800)]
Complement cmake script to compile tensorflow with mkl and mkldnn on Windows (#16936)

* Add build batch for windows

* Automaticaly find python, cuda, mkl runtimes in PATH

* auto select cmake generator

* Add external library mkldnn. Add options for mkl and mkldnn

* fix syntax error in make.bat

* Fix errorlevel syntex bug in make.bat

* Add /arch:avx2 flags to enable avx2 on windows

* Revert to keep `tensprflow_WIN_CPU_SIMD_OPTIONS` unchanged, add an option `tensorflow_ENABLE_MKL_SUPPORT` to include MKL compilation. Still specify SIMD flags by setting `tensorflow_WIN_CPU_SIMD_OPTIONS` to such as '/arch:AVX2'

* Fix a mistake of CUDA path in make.bat

* resolve conflict in mkl_cpu_allocator.h

* Improve error detection

* Use where /Q to detect cmd environment

* fix "ELSE IF" the syntax error in make.bat

* update README.md, wrap windows based codes by #ifdef _WIN32

* unistd.h is not needed in mkl_cpu_allocator.h any more in master branch

* Remove inline of kMaxLimitStr, which causes compile error in VS2015

* Add static_cast in  to fix compile error

* remove make.bat

* Removed make.bat description part

6 years agoAutomated g4 rollback of changelist 193168327
Yifei Feng [Tue, 17 Apr 2018 19:07:33 +0000 (12:07 -0700)]
Automated g4 rollback of changelist 193168327

PiperOrigin-RevId: 193234819

6 years agoMoving gradient registration for CudnnRNN op from contrib to core.
Pavithra Vijay [Tue, 17 Apr 2018 19:06:50 +0000 (12:06 -0700)]
Moving gradient registration for CudnnRNN op from contrib to core.

PiperOrigin-RevId: 193234663

6 years agoFixes and cleanup to support more complex quantized models and adds PropagateFakeQuan...
A. Unique TensorFlower [Tue, 17 Apr 2018 18:53:29 +0000 (11:53 -0700)]
Fixes and cleanup to support more complex quantized models and adds PropagateFakeQuantNumBits.

PiperOrigin-RevId: 193232630

6 years agoMerge pull request #18601 from yongtang/18598-tf.compat.as_str
Martin Wicke [Tue, 17 Apr 2018 18:54:48 +0000 (11:54 -0700)]
Merge pull request #18601 from yongtang/18598-tf.compat.as_str

Fix tf.compat.as_str returns bytes issue in Python 3

6 years agoMerge pull request #18581 from ManHyuk/fix_typo
Martin Wicke [Tue, 17 Apr 2018 18:52:39 +0000 (11:52 -0700)]
Merge pull request #18581 from ManHyuk/fix_typo

Fix typo

6 years agoReplace decode_image with decode_jpeg to avoid ValueError in datasets programmers...
Mingxing Tan [Tue, 17 Apr 2018 18:48:43 +0000 (11:48 -0700)]
Replace decode_image with decode_jpeg to avoid ValueError in datasets programmers guide.

PiperOrigin-RevId: 193231717

6 years agoFixes a comment in tf.contrib.seq2seq.monotonic_attention().
A. Unique TensorFlower [Tue, 17 Apr 2018 18:05:57 +0000 (11:05 -0700)]
Fixes a comment in tf.contrib.seq2seq.monotonic_attention().

PiperOrigin-RevId: 193224285

6 years agoEnable consumption of GIT_TAG_OVERRIDE env var in release build script. (#18579)
Yifei Feng [Tue, 17 Apr 2018 17:53:07 +0000 (10:53 -0700)]
Enable consumption of GIT_TAG_OVERRIDE env var in release build script. (#18579)

Enable consumption of GIT_TAG_OVERRIDE env var in release build script.

6 years agoAvoid ToString() in Eager's TFE_Execute.
Akshay Modi [Tue, 17 Apr 2018 17:32:47 +0000 (10:32 -0700)]
Avoid ToString() in Eager's TFE_Execute.

Also use InlinedVector instead of std::vector for non-async path

Before:
Benchmark              Time(ns)        CPU(ns)     Iterations
-------------------------------------------------------------
BM_Execute/0               1895           1898         360200  Execute
BM_Execute/1               1193           1942         358322  ExecuteAsync
BM_ExecuteFunction/0       5812           5825         100000  ExecuteFunction
BM_ExecuteFunction/1       5015           5374         100000  ExecuteFunctionAsync

After:
Benchmark              Time(ns)        CPU(ns)     Iterations
-------------------------------------------------------------
BM_Execute/0               1604           1607         428262  Execute
BM_Execute/1               1150           1765         404821  ExecuteAsync
BM_ExecuteFunction/0       5615           5626         100000  ExecuteFunction
BM_ExecuteFunction/1       5111           5476         100000  ExecuteFunctionAsync
PiperOrigin-RevId: 193218331

6 years agoChange the contract of dynamic_builtin to reject all functions it can't process.
A. Unique TensorFlower [Tue, 17 Apr 2018 17:13:09 +0000 (10:13 -0700)]
Change the contract of dynamic_builtin to reject all functions it can't process.

PiperOrigin-RevId: 193215246

6 years agoPylint fix
Yong Tang [Tue, 17 Apr 2018 16:15:20 +0000 (16:15 +0000)]
Pylint fix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoEstimate IdentityN as Identity.
Max Galkin [Tue, 17 Apr 2018 16:19:06 +0000 (09:19 -0700)]
Estimate IdentityN as Identity.

PiperOrigin-RevId: 193207469

6 years agoRemoved unnneded tf_export
Yong Tang [Tue, 17 Apr 2018 16:14:50 +0000 (16:14 +0000)]
Removed unnneded tf_export

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix tf.compat.as_str returns bytes issue in Python 3
Yong Tang [Tue, 17 Apr 2018 16:10:27 +0000 (16:10 +0000)]
Fix tf.compat.as_str returns bytes issue in Python 3

This fix tries to address the issue raised in 18598 where
tf.compat.as_str returns bytes (vs. str) in Python 3.
The issue was that `tf_export` decorator:
```
@tf_export('compat.as_bytes', 'compat.as_str')
```
could not be assigned to `as_bytes` or `as_text`
based on python 2 or 3.
This fix invokes tf_export explicitly based on `_six.PY2`
(for python 2/3) so that `as_str` calls `as_bytes` or `as_text`
conditionally.

This fix fixes 18598.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix incorrect rejection of xrange.
A. Unique TensorFlower [Tue, 17 Apr 2018 16:02:14 +0000 (09:02 -0700)]
Fix incorrect rejection of xrange.

PiperOrigin-RevId: 193205016

6 years agoAdd uint32/uint64 support to Gather op.
A. Unique TensorFlower [Tue, 17 Apr 2018 14:41:09 +0000 (07:41 -0700)]
Add uint32/uint64 support to Gather op.

PiperOrigin-RevId: 193195939

6 years agoFix the type info analysis to correctly process loops. Simplify the implementation...
A. Unique TensorFlower [Tue, 17 Apr 2018 14:07:16 +0000 (07:07 -0700)]
Fix the type info analysis to correctly process loops. Simplify the implementation by reusing some of the transformer base functions. Allow set_element_type to use literals. Add additional tests.

PiperOrigin-RevId: 193192409

6 years agoAutomated g4 rollback of changelist 192842670
A. Unique TensorFlower [Tue, 17 Apr 2018 09:23:10 +0000 (02:23 -0700)]
Automated g4 rollback of changelist 192842670

PiperOrigin-RevId: 193168327

6 years agochange the year of copyright
Wenhao Hu [Tue, 17 Apr 2018 08:22:06 +0000 (17:22 +0900)]
change the year of copyright

6 years agoloose test to 1e-5
wenhao.hu [Tue, 17 Apr 2018 07:03:24 +0000 (16:03 +0900)]
loose test to 1e-5

6 years agofix non-whitelited pylint errors
wenhao.hu [Tue, 17 Apr 2018 06:49:44 +0000 (15:49 +0900)]
fix non-whitelited pylint errors

6 years ago[tf.data] Add an API for randomly sampling from multiple datasets.
Derek Murray [Tue, 17 Apr 2018 06:07:24 +0000 (23:07 -0700)]
[tf.data] Add an API for randomly sampling from multiple datasets.

Fixes #15999.

PiperOrigin-RevId: 193152683

6 years agofix init_ops.py
wenhao.hu [Tue, 17 Apr 2018 05:01:06 +0000 (14:01 +0900)]
fix init_ops.py

6 years agoMake ParallelInterleaveDataset saveable.
Saurabh Saxena [Tue, 17 Apr 2018 03:28:02 +0000 (20:28 -0700)]
Make ParallelInterleaveDataset saveable.

PiperOrigin-RevId: 193142302

6 years agoSupply a dtype to super constructor, without which build() seems to crash.
A. Unique TensorFlower [Tue, 17 Apr 2018 02:51:13 +0000 (19:51 -0700)]
Supply a dtype to super constructor, without which build() seems to crash.

PiperOrigin-RevId: 193139585

6 years agoBoostedTreesEstimator in contrib: train_in_memory works with input_fns returning...
Younghee Kwon [Tue, 17 Apr 2018 02:10:10 +0000 (19:10 -0700)]
BoostedTreesEstimator in contrib: train_in_memory works with input_fns returning data.Dataset.
Only one batch of data is expected, so dataset.batch() is disallowed,
and dataset.repeat() will be ignored (only the first one would be used)

PiperOrigin-RevId: 193137094

6 years agofix typo
manhyuk [Tue, 17 Apr 2018 01:52:16 +0000 (10:52 +0900)]
fix typo

6 years agofix typo
manhyuk [Tue, 17 Apr 2018 01:48:52 +0000 (10:48 +0900)]
fix typo

6 years agofix typo
manhyuk [Tue, 17 Apr 2018 01:46:37 +0000 (10:46 +0900)]
fix typo

6 years agoRemove proto imports in header files for core/kernels/hexagon.
Yifei Feng [Tue, 17 Apr 2018 01:41:28 +0000 (18:41 -0700)]
Remove proto imports in header files for core/kernels/hexagon.

The goal is to make kernels mostly independent of proto headers, which will let us lock down our .so imports.

PiperOrigin-RevId: 193134710

6 years agoAdd a simple Profiler and instrument operator invocations in Interpreter.
Shashi Shekhar [Tue, 17 Apr 2018 01:31:22 +0000 (18:31 -0700)]
Add a simple Profiler and instrument operator invocations in Interpreter.

PiperOrigin-RevId: 193133955

6 years agoSanitize with clan-format -i --style=Google
Yong Tang [Tue, 17 Apr 2018 01:32:41 +0000 (01:32 +0000)]
Sanitize with clan-format -i --style=Google

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd shape check for buffer_size with TFRecordDataset
Yong Tang [Tue, 17 Apr 2018 01:31:54 +0000 (01:31 +0000)]
Add shape check for buffer_size with TFRecordDataset

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd shape check for compression_type in TFrecordDataset
Yong Tang [Tue, 17 Apr 2018 01:30:42 +0000 (01:30 +0000)]
Add shape check for compression_type in TFrecordDataset

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd shape check to TFRecordDataset
Yong Tang [Tue, 17 Apr 2018 01:28:30 +0000 (01:28 +0000)]
Add shape check to TFRecordDataset

The inputs of TFRecordDataset have the requirements for shapes.
However, the check was not done in the shape function. This fix
adds shape checks whenever possible.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoSanitize with clang-format -i --style=Google
Yong Tang [Tue, 17 Apr 2018 01:15:00 +0000 (01:15 +0000)]
Sanitize with clang-format -i --style=Google

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd test case for axis and shift shape equal check for tf.roll
Yong Tang [Tue, 17 Apr 2018 01:14:25 +0000 (01:14 +0000)]
Add test case for axis and shift shape equal check for tf.roll

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoCheck in shape function that axis and shift are same size
Yong Tang [Tue, 17 Apr 2018 01:14:03 +0000 (01:14 +0000)]
Check in shape function that axis and shift are same size

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd test case for shape check with shift in tf.roll
Yong Tang [Tue, 17 Apr 2018 01:05:17 +0000 (01:05 +0000)]
Add test case for shape check with shift in tf.roll

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd shape check for shift of tf.roll
Yong Tang [Tue, 17 Apr 2018 01:04:40 +0000 (01:04 +0000)]
Add shape check for shift of tf.roll

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd test case for axis shape check with tf.roll
Yong Tang [Tue, 17 Apr 2018 01:02:03 +0000 (01:02 +0000)]
Add test case for axis shape check with tf.roll

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