platform/upstream/tensorflow.git
6 years agoMerge pull request #16928 from rongjiecomputer/shapeutil
Martin Wicke [Mon, 12 Feb 2018 23:51:50 +0000 (15:51 -0800)]
Merge pull request #16928 from rongjiecomputer/shapeutil

[MSVC] Use explicit func pointer to static method instead of lambda func

6 years agoMerge pull request #16945 from yongtang/02122018-keep_dims
Martin Wicke [Mon, 12 Feb 2018 23:49:23 +0000 (15:49 -0800)]
Merge pull request #16945 from yongtang/02122018-keep_dims

Fix some warnings with keep_dims in `tf.contrib.distributions`

6 years agoMerge pull request #16958 from nfelt/tb-nightly-1.7.0a0
Martin Wicke [Mon, 12 Feb 2018 23:48:04 +0000 (15:48 -0800)]
Merge pull request #16958 from nfelt/tb-nightly-1.7.0a0

Update tb-nightly dep to >= 1.7.0a0, < 1.8.0a0

6 years agoAdd documentation for s3 usage with TensorFlow (#16923)
Yong Tang [Mon, 12 Feb 2018 23:29:07 +0000 (15:29 -0800)]
Add documentation for s3 usage with TensorFlow (#16923)

* Add documentation for s3 usage with TensorFlow

This fix adds a very priliminary documentation for s3 usage
with TensorFlow, as an attempt to address the comment 11089.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add s3 documentation to index page for deployment.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add left navigation link for s3 docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Change example to use tf.data instead of old input style

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdate tb-nightly dep to >= 1.7.0a0, < 1.8.0a0
Nick Felt [Mon, 12 Feb 2018 22:11:03 +0000 (14:11 -0800)]
Update tb-nightly dep to >= 1.7.0a0, < 1.8.0a0

6 years agoMerge pull request #16952 from yifeif/branch_185398372
Martin Wicke [Mon, 12 Feb 2018 20:28:17 +0000 (12:28 -0800)]
Merge pull request #16952 from yifeif/branch_185398372

Branch 185398372

6 years agoMerge commit for internal changes
Yifei Feng [Mon, 12 Feb 2018 18:49:56 +0000 (10:49 -0800)]
Merge commit for internal changes

6 years agoAdd support for scalars in `tf.contrib.all_reduce`.
A. Unique TensorFlower [Mon, 12 Feb 2018 18:34:20 +0000 (10:34 -0800)]
Add support for scalars in `tf.contrib.all_reduce`.

PiperOrigin-RevId: 185398372

6 years ago[TF:XLA] Add additional test case for tf.gather.
Peter Hawkins [Mon, 12 Feb 2018 18:34:18 +0000 (10:34 -0800)]
[TF:XLA] Add additional test case for tf.gather.

PiperOrigin-RevId: 185398368

6 years agoFix shape inference bug in tensorlist
Alexandre Passos [Mon, 12 Feb 2018 18:27:18 +0000 (10:27 -0800)]
Fix shape inference bug in tensorlist

PiperOrigin-RevId: 185397219

6 years agoUpdate bazel version in docker (#16880)
Yifei Feng [Mon, 12 Feb 2018 18:09:20 +0000 (10:09 -0800)]
Update bazel version in docker (#16880)

6 years agoUpdate `tf.contrib.data` API docstring.
Derek Murray [Mon, 12 Feb 2018 17:57:40 +0000 (09:57 -0800)]
Update `tf.contrib.data` API docstring.

PiperOrigin-RevId: 185392564

6 years agoParseNodeName fix.
Jacques Pienaar [Mon, 12 Feb 2018 17:28:47 +0000 (09:28 -0800)]
ParseNodeName fix.

ParseNodeName was skipping ops that started with an underscore, leading to warnings that input of an op was undefined and stopping grappler optimizations from being run on the graph.

PiperOrigin-RevId: 185388749

6 years agoInternal Change
A. Unique TensorFlower [Mon, 12 Feb 2018 16:38:17 +0000 (08:38 -0800)]
Internal Change

PiperOrigin-RevId: 185382594

6 years agoFor debugging purposes, it can be useful to know which ops are considered non-pure...
Brian Patton [Mon, 12 Feb 2018 14:40:26 +0000 (06:40 -0800)]
For debugging purposes, it can be useful to know which ops are considered non-pure / non-constant.

PiperOrigin-RevId: 185371882

6 years ago[XLA] Support generating tuple shaped fake data in client testing
A. Unique TensorFlower [Mon, 12 Feb 2018 13:34:05 +0000 (05:34 -0800)]
[XLA] Support generating tuple shaped fake data in client testing

The previous implementation failed over in case of a tuple shaped input
what broke the replay computation tool for the case where the input is a
tuple.

PiperOrigin-RevId: 185366228

6 years agoFix some keep_dims warnings in math_ops_tests
Yong Tang [Mon, 12 Feb 2018 12:07:24 +0000 (12:07 +0000)]
Fix some keep_dims warnings in math_ops_tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix some warnings with keep_dims in `tf.contrib.distributions`
Yong Tang [Mon, 12 Feb 2018 12:04:41 +0000 (12:04 +0000)]
Fix some warnings with keep_dims in `tf.contrib.distributions`

This fix fixes some warnings with keep_dims in `tf.contrib.distributions`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix warning about keep_dims. keep_dims -> keepdims for tf.reduce_sum(). (#16876)
Yukun Chen [Mon, 12 Feb 2018 07:05:37 +0000 (02:05 -0500)]
Fix warning about keep_dims. keep_dims -> keepdims for tf.reduce_sum(). (#16876)

* Fix warning about keep_dims. keep_dims -> keepdims for tf.reduce_sum().

* fix test failure.

6 years agoImprove formatting of shapes in tf.losses documentation (#16921)
Christopher Yeh [Mon, 12 Feb 2018 07:05:17 +0000 (23:05 -0800)]
Improve formatting of shapes in tf.losses documentation (#16921)

6 years agoCMAKE: optionally link to ZLIB as systemlib / shared objects. (#15382)
MyungJoo Ham [Mon, 12 Feb 2018 07:04:43 +0000 (16:04 +0900)]
CMAKE: optionally link to ZLIB as systemlib / shared objects. (#15382)

If the user has ZLIB (and devel pkg) installed at the system
and the user wants to keep using that ZLIB for tensorflow,
the cmake option "-Dsystemlib_ZLIB=ON" will allow to do so.

Another option "-Dsystemlib_ALL=ON" will turn on every
"systemlib_*" options.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years agoProvide more diagnostic shape information in output window error message.
Vijay Vasudevan [Mon, 12 Feb 2018 05:19:37 +0000 (21:19 -0800)]
Provide more diagnostic shape information in output window error message.

PiperOrigin-RevId: 185331713

6 years agoAutomated g4 rollback of changelist 185233116
Guangda Lai [Mon, 12 Feb 2018 02:09:11 +0000 (18:09 -0800)]
Automated g4 rollback of changelist 185233116

PiperOrigin-RevId: 185324160

6 years ago[TPUEstimator] Automatically detect the TPU system information, including topology...
Jianwei Xie [Sun, 11 Feb 2018 23:54:39 +0000 (15:54 -0800)]
[TPUEstimator] Automatically detect the TPU system information, including topology for model parallelism.

PiperOrigin-RevId: 185318852

6 years agoDisable flaky halton_sequence_test
A. Unique TensorFlower [Sun, 11 Feb 2018 11:44:24 +0000 (03:44 -0800)]
Disable flaky halton_sequence_test

PiperOrigin-RevId: 185294455

6 years ago[MSVC] Use explicit func pointer to static method instead of lambda func
Loo Rong Jie [Sun, 11 Feb 2018 08:41:35 +0000 (16:41 +0800)]
[MSVC] Use explicit func pointer to static method instead of lambda func

6 years agoAdd support for kConditional to the module group scheduler.
A. Unique TensorFlower [Sun, 11 Feb 2018 04:48:19 +0000 (20:48 -0800)]
Add support for kConditional to the module group scheduler.

PiperOrigin-RevId: 185279412

6 years agotypo fix (#16903)
DylanDmitri [Sun, 11 Feb 2018 03:17:13 +0000 (21:17 -0600)]
typo fix (#16903)

Copied the new description from docstring on line 37. Used the phrase "spectogram timeslice" rather than "frequency window" for consistency with the tooltip on ```--window_size_ms```.

6 years agoFix typo (#16908)
ManHyuk [Sun, 11 Feb 2018 03:17:00 +0000 (12:17 +0900)]
Fix typo (#16908)

* fit typo

* fix typo

6 years ago[MSVC] Workaround MSVC template/lambda parsing bug (#16904)
Loo Rong Jie [Sun, 11 Feb 2018 03:16:47 +0000 (11:16 +0800)]
[MSVC] Workaround MSVC template/lambda parsing bug (#16904)

6 years agoFix the profiler python docstring link (#16916)
Yong Tang [Sun, 11 Feb 2018 03:15:12 +0000 (19:15 -0800)]
Fix the profiler python docstring link (#16916)

This fix fixes the python docstring link of the profiler:
`profilerg3doc` -> `profiler/g3doc`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd S3 plugin to the list of file system plugin in doc (add_filesys.md) (#16920)
Yong Tang [Sun, 11 Feb 2018 03:14:41 +0000 (19:14 -0800)]
Add S3 plugin to the list of file system plugin in doc (add_filesys.md) (#16920)

This fix adds S3 plugin to the list of file system plugin in
doc (add_filesys.md).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoGetting rid of unnecessary GPUDevice typedef.
A. Unique TensorFlower [Sat, 10 Feb 2018 20:45:12 +0000 (12:45 -0800)]
Getting rid of unnecessary GPUDevice typedef.
Passing DepthwiseArgs by reference in host code.

PiperOrigin-RevId: 185263307

6 years agoAdd python/util/is_in_graph_mode.py
A. Unique TensorFlower [Sat, 10 Feb 2018 19:22:55 +0000 (11:22 -0800)]
Add python/util/is_in_graph_mode.py

PiperOrigin-RevId: 185260675

6 years agoImprove shape function of NonMaxSuppression (#16890)
Yong Tang [Sat, 10 Feb 2018 12:00:39 +0000 (04:00 -0800)]
Improve shape function of NonMaxSuppression (#16890)

* Improve shape function of NonMaxSuppression

In the docs for `tf.image.non_max_suppression`, the shapes
of the args `boxes` and `scores` are `[num_boxes, 4]` and `[num_boxes]`
respectively.

This fix improve the shape function of NonMaxSuppression so that
`boxes_shape[0] = scores_shape[0] = num_boxes`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add additional test case for shape function of NonMaxSuppression

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAutomated g4 rollback of changelist 185073515
A. Unique TensorFlower [Sat, 10 Feb 2018 11:47:15 +0000 (03:47 -0800)]
Automated g4 rollback of changelist 185073515

PiperOrigin-RevId: 185246348

6 years agoDo not convert layout for Select if condition input is of unknown shape.
Yao Zhang [Sat, 10 Feb 2018 09:45:11 +0000 (01:45 -0800)]
Do not convert layout for Select if condition input is of unknown shape.

PiperOrigin-RevId: 185242138

6 years agoFix grappler to use CudaGpuId instead of TfGpuId to query device states.
Guangda Lai [Sat, 10 Feb 2018 06:47:30 +0000 (22:47 -0800)]
Fix grappler to use CudaGpuId instead of TfGpuId to query device states.

PiperOrigin-RevId: 185233116

6 years agoAdd a test that exhaustively checks Log/Exp/Tanh
Sanjoy Das [Sat, 10 Feb 2018 01:30:03 +0000 (17:30 -0800)]
Add a test that exhaustively checks Log/Exp/Tanh

PiperOrigin-RevId: 185216684

6 years agoimport_graph_def: support "absolute" names with the C API enabled.
Skye Wanderman-Milne [Sat, 10 Feb 2018 01:14:30 +0000 (17:14 -0800)]
import_graph_def: support "absolute" names with the C API enabled.

Passing a name with a trailing '/' to import_graph_def causes that
name to be used as-is (i.e. it is not appended to the existing name
scope and not de-duped with any existing name scopes. This is in order
to re-use an existing name scope). This didn't work with the C API
enabled because it was set to always have the C API uniquify the
prefix.

The fix is to not uniquify the prefix, since calling name_scope in
import_graph_def already has the logic to uniquify the prefix if
necessary. I'm not sure why I thought we needed the C API to do this
to being with.

In addition, this changes the graph_constructor.cc logic to uniquify
names if the prefix cannot be guaranteed unique (see the new test case
in graph_constructor_test.cc for why/when this is necessary).

PiperOrigin-RevId: 185215326

6 years ago[XLA:Tool] Make Hlo parser report the location of the already defined instrucion...
A. Unique TensorFlower [Sat, 10 Feb 2018 00:57:14 +0000 (16:57 -0800)]
[XLA:Tool] Make Hlo parser report the location of the already defined instrucion/computation.

PiperOrigin-RevId: 185213461

6 years ago[XLA] Implement GeneralDot semantics in HloEvaluator.
Kay Zhu [Sat, 10 Feb 2018 00:39:48 +0000 (16:39 -0800)]
[XLA] Implement GeneralDot semantics in HloEvaluator.

Also:
- add a general matmul test, enable interpreter to run dot_operation_test.
- remove now redundant/obselete CHECKS for HandleDot in HloEvaluator.
- improve documentation for DotGeneral a bit.
PiperOrigin-RevId: 185211512

6 years agoUse x*x instead of x^2 to calculate square in huber loss implementation. The reason...
Yuefeng Zhou [Sat, 10 Feb 2018 00:14:00 +0000 (16:14 -0800)]
Use x*x instead of x^2 to calculate square in huber loss implementation. The reason is d(x^y)/dy = x^y * log(x) and when x is zero, it becomes NaN. Even if y is constant, the check op would still report failure.

PiperOrigin-RevId: 185208180

6 years agoDisable flaky spinn_test
Gunhan Gulsoy [Sat, 10 Feb 2018 00:10:34 +0000 (16:10 -0800)]
Disable flaky spinn_test

PiperOrigin-RevId: 185207742

6 years agoAdd pylint check for W0622 redefined-builtin in ci_sanity.sh and fix existing pylint...
Yifei Feng [Sat, 10 Feb 2018 00:02:24 +0000 (16:02 -0800)]
Add pylint check for W0622 redefined-builtin in ci_sanity.sh and fix existing pylint errors.

PiperOrigin-RevId: 185206494

6 years agoAdd delegate API to tflite.
Andrew Selle [Fri, 9 Feb 2018 23:45:00 +0000 (15:45 -0800)]
Add delegate API to tflite.

- Context gets GetNodes, num_nodes and PartitionNodesIntoSubgraphs.
- TfLiteDelegate provides one function that need be implemented
- Delegates choose nodes and those nodes are all compacted into
  a new macro kernel.

PiperOrigin-RevId: 185204338

6 years ago[XLA] Use a real priority queue in list scheduling
A. Unique TensorFlower [Fri, 9 Feb 2018 23:26:13 +0000 (15:26 -0800)]
[XLA] Use a real priority queue in list scheduling

PiperOrigin-RevId: 185201882

6 years agoMerge pull request #16858 from case540/branch_184929151
Michael Case [Fri, 9 Feb 2018 23:16:01 +0000 (15:16 -0800)]
Merge pull request #16858 from case540/branch_184929151

Branch 184929151

6 years agoRecursively creating directories in CreateSummaryFileWriter
Alexandre Passos [Fri, 9 Feb 2018 23:08:24 +0000 (15:08 -0800)]
Recursively creating directories in CreateSummaryFileWriter

PiperOrigin-RevId: 185199219

6 years ago[tf.data] Remove deprecated `tf.contrib.data.Dataset` class.
Derek Murray [Fri, 9 Feb 2018 22:52:24 +0000 (14:52 -0800)]
[tf.data] Remove deprecated `tf.contrib.data.Dataset` class.

This change removes the following class:
* `tf.contrib.data.Dataset`.

IF THIS BREAKS YOU: Replace `tf.contrib.data.Dataset` with `tf.data.Dataset`
when constructing a dataset. Note that you may have to modify downstream
transformations to use the core API. See "tensorflow/contrib/data/README.md" for
details of how to update your code to use the core API.

PiperOrigin-RevId: 185197005

6 years agoUse TFLite CocoaPod in iOS Simple Demo app
Yu-Cheng Ling [Fri, 9 Feb 2018 22:52:15 +0000 (14:52 -0800)]
Use TFLite CocoaPod in iOS Simple Demo app

PiperOrigin-RevId: 185196984

6 years agoRemove header dependence on cuda_config.h to fix opensource custom op support.
Gunhan Gulsoy [Fri, 9 Feb 2018 22:37:24 +0000 (14:37 -0800)]
Remove header dependence on cuda_config.h to fix opensource custom op support.
Fixes #14454
Fixes #12860

PiperOrigin-RevId: 185194924

6 years agoFix read_variable_op GPU test
Akshay Modi [Fri, 9 Feb 2018 22:36:17 +0000 (14:36 -0800)]
Fix read_variable_op GPU test

PiperOrigin-RevId: 185194768

6 years agoEnabled XLA for TF C API.
Mingsheng Hong [Fri, 9 Feb 2018 22:27:03 +0000 (14:27 -0800)]
Enabled XLA for TF C API.

Summary of changes:

1. Set MarkForCompilationPassFlags::tf_xla_cpu_global_jit default to true in
C_API unit test env when XLA-execute is intended. Together with setting session
config config.graph_options.optimizer_options.global_jit_level to > 0, this
turns on XLA for the entire graph (eligible nodes only, with _Arg and _RetVal
nodes excluded).

We decided against defaulting MarkForCompilationPassFlags::tf_xla_cpu_global_jit
to true, due to performance concerns with the single-threaded nature of the XLA
CPU backend (see
https://www.tensorflow.org/performance/xla/jit#turning_on_jit_compilation).

2. In FindCompilationCandidates() during MarkForCompilationPass, skip compiling
any '_Arg'-typed nodes. This is necessary to avoid hitting a "Invalid argument
number" error during MarkForCompilationPass.

3. Extended C API based build rules to link in XLA libraries, and added unit
test "CAPI.Session_Min_XLA_CPU".

Also added some misc improvements and debugging aids.

PiperOrigin-RevId: 185193314

6 years agoMake import_graph_def add default attr values with the C API enabled.
Skye Wanderman-Milne [Fri, 9 Feb 2018 22:25:28 +0000 (14:25 -0800)]
Make import_graph_def add default attr values with the C API enabled.

It turns out that the original Python code modifies the graph_def argument
to add default attr values. I'm not sure if the behavior is covered by
our API guarantees since it's not documented, but let's keep the behavior
consistent for now.

PiperOrigin-RevId: 185193037

6 years agoTEST: test of kernel_results added to hmc_test.py
Ian Langmore [Fri, 9 Feb 2018 22:17:47 +0000 (14:17 -0800)]
TEST:  test of kernel_results added to hmc_test.py
PiperOrigin-RevId: 185191871

6 years agoRemoves const qualifier from ListWorkers
Noah Eisen [Fri, 9 Feb 2018 22:07:40 +0000 (14:07 -0800)]
Removes const qualifier from ListWorkers

PiperOrigin-RevId: 185190346

6 years agoUpdate llvm revision to r324720. This is needed because r324700 introduces an Orc...
A. Unique TensorFlower [Fri, 9 Feb 2018 21:30:40 +0000 (13:30 -0800)]
Update llvm revision to r324720. This is needed because r324700 introduces an Orc API change.

PiperOrigin-RevId: 185185088

6 years agoFixes issue with tfe.make_template when function objects don't have names
Alexandre Passos [Fri, 9 Feb 2018 21:07:00 +0000 (13:07 -0800)]
Fixes issue with tfe.make_template when function objects don't have names

PiperOrigin-RevId: 185181846

6 years agoSplit gpu_id.h and GpuIdManager out from build target //tensorflow/core:gpu_runtime...
Guangda Lai [Fri, 9 Feb 2018 20:20:38 +0000 (12:20 -0800)]
Split gpu_id.h and GpuIdManager out from build target //tensorflow/core:gpu_runtime, to reduce the size of dependencies, so when other lightweight libraries like grappler utils needs the TfToCudaGpuId translation function it doesn't need to depend on things like stream executor and cuda libraries.

PiperOrigin-RevId: 185175757

6 years ago[XLA] Add a test for reduce window with large minor dimension.
A. Unique TensorFlower [Fri, 9 Feb 2018 20:19:29 +0000 (12:19 -0800)]
[XLA] Add a test for reduce window with large minor dimension.

PiperOrigin-RevId: 185175593

6 years agoAdd dynamic_rnn support for CloudTPU Magenta RNN
A. Unique TensorFlower [Fri, 9 Feb 2018 19:33:00 +0000 (11:33 -0800)]
Add dynamic_rnn support for CloudTPU Magenta RNN

PiperOrigin-RevId: 185169370

6 years agoSimplify and extend the management of input-conditional losses and updates.
Francois Chollet [Fri, 9 Feb 2018 19:28:21 +0000 (11:28 -0800)]
Simplify and extend the management of input-conditional losses and updates.

Instead of keeping track of dependencies manually, we rely on the TF graph structure to find dependencies. The resulting implementation is cleaner and more robust.

This does not change any existing behavior. It extends the current behavior by allowing `get_updates_for(inputs)` and `get_losses_for(inputs)` to be called from *any* tensors upstream of the layer, not just the immediate layer's inputs.

PiperOrigin-RevId: 185168680

6 years agoFix lint warnings. NFC
Jacques Pienaar [Fri, 9 Feb 2018 19:17:51 +0000 (11:17 -0800)]
Fix lint warnings. NFC

PiperOrigin-RevId: 185167035

6 years agoAdd export calls for protos.
Anna R [Fri, 9 Feb 2018 19:16:01 +0000 (11:16 -0800)]
Add export calls for protos.

PiperOrigin-RevId: 185166764

6 years agoRemove the unneeded "tf" argument for utility functions.
A. Unique TensorFlower [Fri, 9 Feb 2018 19:14:03 +0000 (11:14 -0800)]
Remove the unneeded "tf" argument for utility functions.

PiperOrigin-RevId: 185166507

6 years agoFix some doc strings that were accidentally removed.
Suharsh Sivakumar [Fri, 9 Feb 2018 19:01:07 +0000 (11:01 -0800)]
Fix some doc strings that were accidentally removed.

PiperOrigin-RevId: 185164375

6 years ago regression_head accepts link_fn as parameter, so the use can use self defined link fn
A. Unique TensorFlower [Fri, 9 Feb 2018 18:45:56 +0000 (10:45 -0800)]
  regression_head accepts link_fn as parameter, so the use can use self defined link fn

PiperOrigin-RevId: 185161896

6 years agoTFTS: Better handling of exogenous features
Allen Lavoie [Fri, 9 Feb 2018 18:13:05 +0000 (10:13 -0800)]
TFTS: Better handling of exogenous features

Adds (dummy) exogenous features to the LSTM model-building example, and adds some small methods needed to support that (fetching the shape of embedded exogenous features).

Also makes it more automatic to export a SavedModel with exogenous features (placeholder shapes will be inferred from the given FeatureColumns), which makes the LSTM example friendlier.

PiperOrigin-RevId: 185157085

6 years agoTFTS: Add exporting to SavedModel to the LSTM example
Allen Lavoie [Fri, 9 Feb 2018 17:25:10 +0000 (09:25 -0800)]
TFTS: Add exporting to SavedModel to the LSTM example

Was previously not using a state manager, which among other issues prevented
exporting.

Fixes #16590.

PiperOrigin-RevId: 185150900

6 years agoUpdate for LLVM API change r324700
A. Unique TensorFlower [Fri, 9 Feb 2018 17:12:19 +0000 (09:12 -0800)]
Update for LLVM API change r324700

PiperOrigin-RevId: 185149198

6 years agoComment update.
Sukriti Ramesh [Fri, 9 Feb 2018 15:55:46 +0000 (07:55 -0800)]
Comment update.

PiperOrigin-RevId: 185141668

6 years agoOnly convert format if input is of layout-agnostic type.
Yao Zhang [Fri, 9 Feb 2018 07:17:54 +0000 (23:17 -0800)]
Only convert format if input is of layout-agnostic type.

PiperOrigin-RevId: 185103227

6 years agoAdd tf_export decorators back to gen_*_ops.py files.
Anna R [Fri, 9 Feb 2018 01:02:48 +0000 (17:02 -0800)]
Add tf_export decorators back to gen_*_ops.py files.

PiperOrigin-RevId: 185075262

6 years agoExtended the Halton sequences to support randomization. Implemented the randomization...
A. Unique TensorFlower [Fri, 9 Feb 2018 00:47:58 +0000 (16:47 -0800)]
Extended the Halton sequences to support randomization. Implemented the randomization scheme described in arXiv:1706.02808.

PiperOrigin-RevId: 185073515

6 years agoAutomated g4 rollback of changelist 185006374
A. Unique TensorFlower [Fri, 9 Feb 2018 00:39:42 +0000 (16:39 -0800)]
Automated g4 rollback of changelist 185006374

PiperOrigin-RevId: 185072479

6 years agoFix bug in checkpointing DT_VARIANT tensors.
Saurabh Saxena [Fri, 9 Feb 2018 00:31:20 +0000 (16:31 -0800)]
Fix bug in checkpointing DT_VARIANT tensors.
Also add an integration test that runs and checkpoints multiple input pipelines in one graph.

PiperOrigin-RevId: 185071397

6 years agoImprove the flow to build TFLite iOS demo app
Yu-Cheng Ling [Fri, 9 Feb 2018 00:15:41 +0000 (16:15 -0800)]
Improve the flow to build TFLite iOS demo app

PiperOrigin-RevId: 185069356

6 years agoAdd our own "global step" called quantization_step to avoid needing to reset the...
Suharsh Sivakumar [Fri, 9 Feb 2018 00:11:03 +0000 (16:11 -0800)]
Add our own "global step" called quantization_step to avoid needing to reset the global step before running the graph rewrite.

PiperOrigin-RevId: 185068631

6 years agoAllow C64 infeeds.
Brian Patton [Fri, 9 Feb 2018 00:09:05 +0000 (16:09 -0800)]
Allow C64 infeeds.

PiperOrigin-RevId: 185068327

6 years agoMake SavedModelTest.testStripDefaultAttrsInconsistentConsumerDefaults work with C...
Skye Wanderman-Milne [Fri, 9 Feb 2018 00:05:31 +0000 (16:05 -0800)]
Make SavedModelTest.testStripDefaultAttrsInconsistentConsumerDefaults work with C API.

The test originally altered the Python version of the op registry,
which is not reflected in the C API. This changes the test to alter
the serialized node def instead of the op def, and renames the test to
testInconsistentConsumerDefaultAttrs.

PiperOrigin-RevId: 185067838

6 years agoChanges behavior of optimizer.minimize(loss) when loss is a function.
Alexandre Passos [Thu, 8 Feb 2018 23:36:04 +0000 (15:36 -0800)]
Changes behavior of optimizer.minimize(loss) when loss is a function.

Now supports both eager and graph mode, and loss is always a callable
with no arguments. Supports variables and non-variables in var_list.

PiperOrigin-RevId: 185063691

6 years agoAdding tf_export decorators/calls to TensorFlow functions and constants.
Anna R [Thu, 8 Feb 2018 23:28:30 +0000 (15:28 -0800)]
Adding tf_export decorators/calls to TensorFlow functions and constants.

PiperOrigin-RevId: 185062323

6 years agoUpdate fake quant op to support bitwidths in the range 2 to 16, from 2 to 8.
Raghuraman Krishnamoorthi [Thu, 8 Feb 2018 23:21:22 +0000 (15:21 -0800)]
Update fake quant op to support bitwidths in the range 2 to 16, from 2 to 8.

PiperOrigin-RevId: 185061307

6 years agoObject based saving prototype: create ResourceVariables directly by default.
Allen Lavoie [Thu, 8 Feb 2018 23:18:31 +0000 (15:18 -0800)]
Object based saving prototype: create ResourceVariables directly by default.

This avoids variable reuse errors when building a graph. Where necessary for compatibility, we can still use get_variable.

PiperOrigin-RevId: 185060891

6 years agoAdd memory usage report to cost analyzer tool; run all default optimizations.
Yao Zhang [Thu, 8 Feb 2018 23:06:57 +0000 (15:06 -0800)]
Add memory usage report to cost analyzer tool; run all default optimizations.

PiperOrigin-RevId: 185058999

6 years agoAdd more vlogging to op level estimator.
Yao Zhang [Thu, 8 Feb 2018 23:06:54 +0000 (15:06 -0800)]
Add more vlogging to op level estimator.

PiperOrigin-RevId: 185058989

6 years ago[TF contrib RNN] Expose some rnn classes and functionality in contrib.
Eugene Brevdo [Thu, 8 Feb 2018 23:01:49 +0000 (15:01 -0800)]
[TF contrib RNN] Expose some rnn classes and functionality in contrib.

PiperOrigin-RevId: 185057994

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Thu, 8 Feb 2018 22:57:46 +0000 (14:57 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 185057233

6 years agoAdd a _TensorProcessor for computing gradients but not applying them.
A. Unique TensorFlower [Thu, 8 Feb 2018 22:55:09 +0000 (14:55 -0800)]
Add a _TensorProcessor for computing gradients but not applying them.

PiperOrigin-RevId: 185056764

6 years agoUpdated API for quantize_graph: Programmable quant_delay to determine start of quanti...
Raghuraman Krishnamoorthi [Thu, 8 Feb 2018 22:50:54 +0000 (14:50 -0800)]
Updated API for quantize_graph: Programmable quant_delay to determine start of quantization in training.
Remove delay_requested parameter in _InsertQuantOp, presence or absence of quant_delay
is directly inferred from value of quant_delay. Any positive value causes insertion of
delayed quantization into the graph.

Experimental APIs for quantization with more programmability, including bitwidths for weights and activations.

PiperOrigin-RevId: 185056081

6 years agoAdding tf_export decorators/calls to TensorFlow functions and constants.
Anna R [Thu, 8 Feb 2018 22:47:28 +0000 (14:47 -0800)]
Adding tf_export decorators/calls to TensorFlow functions and constants.

PiperOrigin-RevId: 185055497

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Thu, 8 Feb 2018 22:27:03 +0000 (14:27 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 185052000

6 years agoUpdates to fastpath execution code
Akshay Modi [Thu, 8 Feb 2018 22:23:25 +0000 (14:23 -0800)]
Updates to fastpath execution code

- Add default value shape handling
- Add default value func handling (including adding a new function for this in
  the eager C API)
- Update callback execution interface to match record_gradient call

PiperOrigin-RevId: 185051447

6 years agoObject-based saving prototype: allow only named edges
Allen Lavoie [Thu, 8 Feb 2018 22:19:23 +0000 (14:19 -0800)]
Object-based saving prototype: allow only named edges

Simplifies the logic a bit, and removes one source of potential checkpoint
incompatibilities.

Classes like Sequential which need anonymous references to other objects may
generate string names containing numbers.

PiperOrigin-RevId: 185050714

6 years agoDon't fail if control dependency is on an input of the function.
Akshay Modi [Thu, 8 Feb 2018 22:10:51 +0000 (14:10 -0800)]
Don't fail if control dependency is on an input of the function.

PiperOrigin-RevId: 185049319

6 years agoAdding tf_export decorators/calls to TensorFlow functions and constants.
Anna R [Thu, 8 Feb 2018 21:43:20 +0000 (13:43 -0800)]
Adding tf_export decorators/calls to TensorFlow functions and constants.

PiperOrigin-RevId: 185044705

6 years agoPrototype object-based save/restore syntax sugar
Allen Lavoie [Thu, 8 Feb 2018 21:38:50 +0000 (13:38 -0800)]
Prototype object-based save/restore syntax sugar

- Overrides __setattr__ to allow implicit dependencies
- Supports any valid Python 2 identifier as a Checkpointable dependency name (was messing with underscore prefixes)

PiperOrigin-RevId: 185044022

6 years agoPlumbs a variable from the batching function decorator to the queue depth control...
A. Unique TensorFlower [Thu, 8 Feb 2018 21:37:48 +0000 (13:37 -0800)]
Plumbs a variable from the batching function decorator to the queue depth control option in the underlying BatchingQueue. It defaults to 10 if not set, which was the original default value in the BatchingQueue options struct.

PiperOrigin-RevId: 185043844

6 years agoInternal functional _If and _While ops.
Alexandre Passos [Thu, 8 Feb 2018 21:30:17 +0000 (13:30 -0800)]
Internal functional _If and _While ops.

PiperOrigin-RevId: 185042663